SShortSingh.
Back to feed

Developer ports Gemma 4 to pure JAX, exposes key GPU-TPU compatibility limits

0
·2 views

A developer has built a pure JAX port of Google's Gemma 4 language model and tested it across Cloud TPU v5e, v6e, and an NVIDIA T4G GPU on AWS, aiming to verify how truly portable JAX code is across accelerators. The project found that Gemma 4's irregular architecture — including two attention head dimensions and a complex KV-cache sharing scheme — caused failures in other frameworks like vLLM but was handled cleanly by JAX's XLA compiler. One critical portability issue discovered was silent performance degradation: using bfloat16 on pre-Ampere NVIDIA GPUs causes XLA to silently emulate it via fp32, severely hurting decode speed without any error or warning. To address this, the port now automatically detects GPU compute capability at runtime and selects float16 on older Turing GPUs and bfloat16 on TPUs and newer GPUs. A second limitation involves the fused W4A16 Pallas kernel, which is tiled for TPU memory and does not directly translate to GPU hardware, representing a genuine architectural difference rather than a software bug.

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 ·

Aider 0.86: Open-source terminal AI coding tool compared against 5 rivals

Aider is an open-source command-line tool that enables AI pair programming directly within a project's terminal, reading and editing real files while automatically creating git commits with meaningful messages. Unlike browser-based AI chat workflows that require repeated copy-pasting, Aider builds a map of the entire codebase so the AI understands cross-file context. The tool supports over 100 programming languages and is compatible with multiple LLM providers including Claude, OpenAI, DeepSeek, and local models via Ollama, giving users flexibility over cost and privacy. As of August 2026, the project has accumulated around 44,000 GitHub stars and over 6.8 million installs. When compared to rivals such as Claude Code, OpenAI Codex, Cursor, GitHub Copilot, and Cline, Aider's key differentiator is being the only option that is both open-source and provider-agnostic, though it lacks a graphical editor UI and requires manual API key setup.

0
ProgrammingHacker News ·

StemDeck: Free Open-Source AI Tool Splits Music Into Individual Stems

StemDeck is a newly released, free and open-source application that uses AI to separate audio tracks into individual stems such as vocals, drums, and instruments. The tool runs entirely locally on a user's machine, meaning no audio data is sent to external servers. It was shared on Hacker News, where it garnered early community attention. The project is hosted on GitHub, making its source code publicly accessible for contributions and self-hosting. Local processing ensures privacy while offering musicians and audio engineers a no-cost stem separation solution.

0
ProgrammingDEV Community ·

Codex vs CodeRabbit: Pick by Ownership Scope, Not Bug-Catch Count

A developer analysis argues that comparing OpenAI's Codex and CodeRabbit by bug-detection accuracy misses the more practical question of what unit of work each tool should own end-to-end. Codex, described as a full coding agent, can investigate a repository, edit files, run tests, and return a verified result, making it suited for delegating complete implementation tasks. CodeRabbit centers on continuous PR review, incremental re-review after new pushes, and maintaining feedback tied to the PR lifecycle. Both tools have expanded beyond their original categories, with Codex now supporting code review and CodeRabbit offering a local CLI, suggested fixes, and agent integrations. The author recommends using both only when they are deliberately assigned different failure modes, and cautions against assuming a second AI reviewer automatically doubles assurance.

0
ProgrammingDEV Community ·

Practical Container Security Checklist for Site Reliability Engineers

A site reliability engineer has published a practical container security checklist aimed at SREs, framing security breaches as a category of reliability incident. The guide covers minimizing attack surfaces through multi-stage Docker builds that reduce image sizes from hundreds of megabytes to around 50MB. It also recommends scanning images for vulnerabilities in CI pipelines, enforcing non-root execution, and applying strict Kubernetes security contexts and network policies. Proper secrets management using external vaults instead of hardcoded environment variables is highlighted as a critical practice. The checklist concludes with a weekly automated audit script to detect privileged containers, root-running workloads, and missing resource limits across Kubernetes clusters.