SShortSingh.
Back to feed

Gemma-4 12B Ported to AWS Inferentia2 With Three Key Compiler Fixes

0
·1 views

A developer has successfully ported Google's Gemma-4 12B instruction-tuned model to AWS Inferentia2 hardware, specifically an inf2.8xlarge instance with tensor parallelism set to 2. The model, classified as Gemma4UnifiedForConditionalGeneration, is an encoder-free multimodal architecture requiring the language model to be extracted from its unified wrapper before compilation. Three non-obvious issues had to be resolved: global attention layers with a single KV head needed correct query-head sharding, the logit softcap operation was safely dropped on-device since it does not affect greedy decode argmax, and a sliding-window attention buffer overflow required forcing eager attention instead of fused kernels. The resulting compiled model achieves token-for-token identical output to a CPU fp32 reference, with a first-token prefill latency of roughly 101 milliseconds and a memory footprint of approximately 12 GB per rank in bf16.

Read the full story at DEV Community

This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)

Log in to join the discussion and vote.

Log in

Related stories

0
ProgrammingDEV Community ·

Developer uses rival AI to review code written by primary AI, catches three critical bugs

A software developer built a dual-AI review system where OpenAI's Codex CLI acts as a read-only second engineer, independently checking code produced by Claude Code before it ships to production. The setup was inspired by the well-established human practice of not reviewing your own pull request, since a single model reviewing its own output tends to share the same blind spots that introduced bugs in the first place. In one instance, Codex flagged a production pipeline change three times with concrete, reproducible bugs before finally approving it on the fourth round, allowing a scheduled nightly cron job to run without issues. Claude is configured to invoke Codex autonomously based on predefined rules — such as after repeated failed debugging attempts or before committing risky, hard-to-reverse changes — with a soft cap of roughly two Codex calls per task to manage API quota. The developer applied this workflow to an Oracle PL/SQL code-review pipeline, where inconsistent AI risk scoring on the same commit had previously varied widely, prompting a more structured, formula-based rebuild of the scoring system.

0
ProgrammingDEV Community ·

Password Alone Is Not Enough: Why Connected Building Devices Need Full Security Architecture

Connected building devices such as heating controllers, water monitors, and smart access panels have become part of the broader cybersecurity landscape, making a simple password screen an insufficient safeguard. For years, many manufacturers treated security as a late-stage addition, but that approach is increasingly untenable under new regulations. The EU Cyber Resilience Act mandates cybersecurity requirements across the full product lifecycle, with key obligations taking effect from December 2027, while the UK's PSTI regime is already enforcing minimum security standards for consumer-connected products. Engineers must address security architecture early in development, covering firmware update mechanisms, credential management, and access controls before a product ships. Legacy software stacks inside HMIs and bootloaders pose hidden risks, as vulnerabilities accumulate over a product's lifespan, making secure over-the-air update capability a critical design requirement rather than an optional feature.

0
ProgrammingDEV Community ·

AWS Brings OpenAI GPT-5.6 to Amazon Bedrock, Enabling Codex CLI Integration

AWS recently made OpenAI's GPT-5.6 available on Amazon Bedrock, allowing developers to access it via the Bedrock API using existing AWS credentials. The Codex CLI includes a built-in Bedrock provider that can be configured with command-line flags or by editing the ~/.codex/config.toml file. Users need the AWS CLI installed and configured with the AmazonBedrockLimitedAccess policy to authenticate and call the Bedrock endpoint. Notably, each Codex request carries approximately 9,400–9,500 tokens of system prompt and tool definition overhead, which developers should factor into cost and context estimates. As an alternative to standard AWS credentials, the Bedrock API Key method is also supported for those who prefer it.

0
ProgrammingDEV Community ·

Developer builds social listening agent in ~200 lines of TypeScript using AWS tools

A developer has published a guide detailing how to build SocialRadar, a lightweight social listening agent written in approximately 200 lines of TypeScript. The agent monitors web mentions of a product or topic across platforms like X, Reddit, and Hacker News, analyzes sentiment per platform, and benchmarks performance against competitors. It is built using the Strands Agents TypeScript SDK, Amazon Bedrock AgentCore Runtime for hosting, Amazon EventBridge Scheduler for automated daily and weekly runs, and Amazon SES for email delivery. The project uses Claude Sonnet on Bedrock as its AI model, paired with a web search tool powered by Exa's MCP server, keeping the entire stack within the AWS ecosystem to minimize third-party service dependencies. The guide positions the build as a cost-effective engineering alternative to enterprise social-listening platforms.

Gemma-4 12B Ported to AWS Inferentia2 With Three Key Compiler Fixes · ShortSingh