#

JAX Programming Tutorials & Engineering Articles

156 JAX tutorials, guides, and engineering insights from Google and NVIDIA

Companies Using This

JAX Articles & Tutorials

Filter:
Google logo
Google
Advanced
HeyGen ported their 18B+ parameter Avatar IV video generation model to Google Cloud's Trillium (v6e) TPUs via torchax and XLA, utilizing FSDP and Ulysses sequence parallelism across an eight-chip mesh. To achieve a 1.86x speedup for real-time streaming, the engineering team pipelined exposed all-to-all collectives, aligned sparse attention block sizes to eliminate mask padding, and bypassed softmax serial dependencies using a precomputed Cauchy-Schwarz upper bound. These custom Pallas kernel and compiler optimizations were deployed only after passing rigorous two-tier quality gates to guarantee byte-identical or mathematically equivalent pixel outputs.
13 min read
Includes Code
--
GitHub logo
GitHub
Advanced
Enterprise Java developers have a new superpower—drive GitHub Copilot from idiomatic Java code with annotations, virtual threads, and more.
Edward Burns
10 min read
Includes Code
--
Google logo
Google
Advanced
Google's open-source TPU microbenchmark suite provides developers with granular performance metrics across Network, Compute, HBM, Host Transfer, and Attention components to validate real-world hardware capabilities. By leveraging these benchmarks to establish a Roofline model, engineers can accurately diagnose whether their machine learning workloads are compute-, memory-, or network-bound. This empirical baseline directly guides targeted software optimizations—such as kernel tuning, mesh sharding, and rematerialization—to maximize hardware utilization for large-scale model deployments.
Junjie Qian, Chi Shuen Lee, Yu-Hsuan (Amy) Lin, Haixiong (Sean) Wang
6 min read
Includes Code
--
Google logo
Google
Intermediate
This second installment explores how Ray’s higher-level libraries—Serve, Data, and Train—abstract the complexities of running AI workloads on Google's TPU slices. Ray Serve uses a simple topology configuration to correctly gang-schedule large multi-host models, while Ray Data eliminates data-loading bottlenecks by feeding accelerators directly with native JAX batches. Finally, JaxTrainer streamlines distributed training across TPUs by automatically handling cross-slice coordination, checkpointing, and fault tolerance.
Ivan Nardini, Spencer Peterson
7 min read
Includes Code
--
NVIDIA logo
NVIDIA
Advanced
Frontier model pre-training has converged on mixture of experts (MoE), which is fundamentally changing what limits large-scale AI training. As compute per token…
Kirthi Devleker
7 min read
--
Google logo
Google
Advanced
Tunix is Google’s new JAX-native post-training library designed to eliminate TPU idling bottlenecks when training multi-turn, tool-using LLM reasoning agents. It maximizes hardware throughput by combining highly concurrent, asynchronous rollouts with a decoupled producer-consumer pipeline, ensuring the trainer is constantly fed even while agents wait on network I/O or environment steps. Additionally, Tunix provides plug-and-play abstractions and continuous macro-level profiling, allowing developers to easily integrate custom open-source environments and optimize complex distributed workflows without massive code rewrites.
Haoyu Gao, Lance Wang, Shadi Noghabi, Tianshu Bao, Weiren Yu
10 min read
Includes Code
--
NVIDIA logo
NVIDIA
Intermediate
Large language model (LLM) training workloads increasingly run into GPU memory limits before compute is fully used. Model weights, gradients, optimizer states…
Tanya Lenz
9 min read
Includes Code
--
Google logo
Google
Intermediate
Distributed AI training is notoriously fragile because losing a single machine typically crashes the entire multi-node job, forcing a time-consuming, full-workload infrastructure restart. To address this, Google’s JAX ecosystem utilizes elastic training via Pathways, which converts a hardware failure into a catchable Python exception so the running process can survive. When an unplanned failure occurs, the system automatically replaces only the broken worker, restores the last viable checkpoint from Cloud Storage, and resumes training in place—minimizing total downtime to under two minutes without ever restarting the main controller process.
Luke Baumann, Abhinav Singh, Ivan Nardini
24 min read
Includes Code
--
NVIDIA logo
NVIDIA
Advanced
Mixture-of-experts (MoE) models have quickly become a foundational component of modern, large-scale AI systems. They are widely adopted because they enable…
Rachit Garg
9 min read
Includes Code
--
Google logo
Google
Intermediate
DiffusionGemma is an experimental text-generation model built on the Gemma 4 architecture that uses diffusion-based parallel generation instead of token-by-token autoregression, enabling much faster inference, bidirectional context awareness, and real-time self-correction while remaining deployable on consumer GPUs. Its architecture generates and refines 256-token blocks in parallel through iterative denoising, allowing it to handle complex constraint-based tasks such as Sudoku more effectively than traditional language models and demonstrating strong gains from fine-tuning. The model integrates with vLLM and other popular inference frameworks, giving developers access to a new non-autoregressive approach that combines high performance, efficient long-context scaling, and straightforward customization and deployment.
Ian Ballantyne, Omar Sanseviero
6 min read
Includes Code
--
NVIDIA logo
NVIDIA
Intermediate
Pre-training frontier LLMs comes down to throughput. When training spans trillions of tokens across thousands of accelerators, every percentage point of step…
Max Xu
6 min read
Includes Code
--
NVIDIA logo
NVIDIA
Advanced
NVIDIA CUDA 13.3 brings new capabilities and performance optimizations to developers across the CUDA ecosystem. The launch of NVIDIA CUDA Tile programming in…
Jonathan Bentz
13 min read
Includes Code
--
Google logo
Google
Advanced
Researchers at UCSD have successfully implemented DFlash, a block-diffusion speculative decoding method, on Google TPUs to bypass the sequential bottlenecks of traditional autoregressive drafting. By "painting" entire blocks of candidate tokens in a single forward pass rather than predicting them one-by-one, the system achieved average speedups of 3.13x, with peak performance nearly doubling that of existing methods like EAGLE-3. This open-source integration into the vLLM ecosystem optimizes TPU hardware by leveraging "free" parallel verification and high-quality draft predictions for complex reasoning tasks.
Weiren Yu, Yarong Mu, Lihao Ran, Zhaoxiang Feng, Yiming Zhao, Hao Zhang
11 min read
--
Google logo
Google
Intermediate
MaxText has introduced new support for Supervised Fine-Tuning (SFT) and Reinforcement Learning (RL) on single-host TPU configurations, leveraging JAX and the Tunix library for high-performance model refinement. These features enable developers to easily adapt pre-trained models for specialized tasks and complex reasoning using efficient algorithms like GRPO and GSPO. This update streamlines the post-training workflow, offering a scalable path from single-host setups to larger multi-host configurations.
Wei Wei, Weiren Yu
3 min read
Includes Code
--
NVIDIA logo
NVIDIA
Advanced
For decades, computational chemistry has faced a tug-of-war between accuracy and speed. Ab initio methods like density functional theory (DFT) provide high…
Erica Tsai
13 min read
Includes Code
--
NVIDIA logo
NVIDIA
Advanced
Proteins rarely function in isolation as individual monomers. Most biological processes are governed by proteins interacting with other proteins…
Christian Dallago
10 min read
Includes Code
--
Google logo
Google
Advanced
TorchTPU is a new engineering stack designed to provide a native, high-performance experience for running PyTorch workloads on Google’s TPU infrastructure with minimal code changes. It features an "Eager First" approach with multiple execution modes and utilizes the XLA compiler to optimize distributed training across massive clusters. Moving into 2026, the project aims to further reduce compilation overhead and expand support for dynamic shapes and custom kernels to ensure seamless scalability for the next generation of AI.
Claudio Basile, Kat Ko, Ben Wilson, Lee Howes, Bill Jia, Joe Pamer, Michael Voznesensky, Robert Hundt
8 min read
--
NVIDIA logo
NVIDIA
Advanced
Computer-aided engineering (CAE) is shifting from human-driven workflows toward AI-driven ones, including physics foundation models that generalize across…
Google logo
Google
Intermediate
Google has introduced Finish Changes and Outlines for Gemini Code Assist in IntelliJ and VS Code to reduce developer friction and eliminate the need for long, manual prompting. Finish Changes acts as an AI pair programmer that completes code, implements pseudocode, and applies refactoring patterns by observing your current edits and context. Meanwhile, Outlines improves code comprehension by generating interactive, high-level English summaries interleaved directly within the source code to help engineers navigate and understand complex files.
Divyansh Chaturvedi, Nikhil Kapoor, Kensen Shi
4 min read
Includes Code
--
NVIDIA logo
NVIDIA
Intermediate
CUDA 13.2 arrives with a major update: NVIDIA CUDA Tile is now supported on devices of compute capability 8.X architectures (NVIDIA Ampere and NVIDIA Ada)…
Jonathan Bentz
14 min read
Includes Code
--
Google logo
Google
Intermediate
Google has officially launched LiteRT, the successor to TFLite, which offers significantly faster GPU and NPU acceleration alongside seamless support for PyTorch and JAX. The update also introduces lower-precision data type support for increased efficiency and a commitment to more frequent security and dependency updates across the TensorFlow ecosystem. This transition solidifies LiteRT as Google's primary high-performance framework for deploying GenAI and advanced on-device inference.
Pradeep Kuppala, Rodney Witcher
2 min read
--
NVIDIA logo
NVIDIA
Advanced
The article discusses the integration of the NVSHMEM communication library into the Accelerated Linear Algebra (XLA) compiler to optimize long-context model training in JAX.
Sevin Fide Varoglu
9 min read
Includes Code
Has Summary
--
Google logo
Google
Advanced
This tutorial demonstrates how to fine-tune FunctionGemma, a small language model for translating natural language into API calls, using Google's Tunix library on TPUs.
Wei Wei
4 min read
Includes Code
Has Summary
--
Google logo
Google
Advanced
LiteRT has evolved from its TensorFlow Lite foundation into a universal on-device AI inference framework, now offering production-ready GPU acceleration across six platforms and streamlined NPU int...
Lu Wang, Chintan Parikh, Jingjiang Li, Terry Heo
9 min read
Includes Code
Has Summary
--
Google logo
Google
Intermediate
This article demonstrates how to fine-tune FunctionGemma, a specialized 270M parameter Gemma 3 model designed for function calling in agentic AI systems.
Juyeong Ji
5 min read
Includes Code
Has Summary
--
NVIDIA logo
NVIDIA
Advanced
The article discusses the NVIDIA Rubin platform, which introduces six new chips designed to create a powerful AI supercomputer.
Google logo
Google
Advanced
This article serves as a practical guide for developers working with JAX on Cloud TPUs, focusing on essential tools and techniques for debugging and profiling machine learning workflows.
Zhenzhen (Jen) Tan, Brian Kang, Ashish Narasimham
5 min read
Includes Code
Has Summary
--
NVIDIA logo
NVIDIA
Advanced
The article discusses the NVIDIA ALCHEMI Toolkit-Ops, a specialized toolkit designed to accelerate AI-powered atomistic simulations in chemistry and materials science.
Justin S. Smith
10 min read
Includes Code
Has Summary
--
Google logo
Google
Beginner
The article introduces A2UI, an open-source project designed for agent-driven interfaces that allows agents to generate contextually relevant user interfaces.
Google A2UI Team
13 min read
Includes Code
Has Summary
--
Google logo
Google
Intermediate
The article discusses the advancements in on-device AI powered by MediaTek's Neural Processing Unit (NPU) and the introduction of the LiteRT NeuroPilot Accelerator.
Lu Wang, Arian Arfaian, Luke Boyer
10 min read
Includes Code
Has Summary
--
Google logo
Google
Intermediate
The article discusses optimizing performance on Qualcomm's Neural Processing Unit (NPU) using LiteRT, Google's high-performance on-device ML framework.
Lu Wang, Weiyi Wang, Andrew Zhang
9 min read
Includes Code
Has Summary
--
Google logo
Google
Advanced
The article discusses the JAX AI Stack, a modular framework for building production AI models on Google Cloud TPUs.
Rakesh Iyer, Srikanth Kilaru
6 min read
Includes Code
Has Summary
--
Google logo
Google
Advanced
Metrax is a high-performance library designed for efficient and robust model evaluation metrics in JAX, addressing the need for standardized metrics during the migration from TensorFlow.
Yufeng Guo, Jiwon Shin, Jeff Carpenter
5 min read
Includes Code
Has Summary
--
Google logo
Google
Beginner
Agent Garden is a platform designed to facilitate the development and deployment of AI agents, making it accessible to all users, not just those on Google Cloud.
Kanchana Patlolla, Tamás Mágedli
3 min read
Has Summary
--
Google logo
Google
Intermediate
The article introduces Coral NPU, a full-stack, open-source platform designed to enhance Edge AI capabilities on low-power devices.
Billy Rutledge
8 min read
Has Summary
--
Google logo
Google
Advanced
The article discusses building high-performance data pipelines using Grain, a data loading library for JAX, and ArrayRecord, an efficient file format.
Jiyang Kang, Shivaji Dutta, Ihor Indyk, Felix Chern
10 min read
Includes Code
Has Summary
--
Google logo
Google
Advanced
The article introduces Tunix, a new open-source, JAX-native library designed for post-training of large language models (LLMs).
Srikanth Kilaru, Tianshu Bao
7 min read
Includes Code
Has Summary
--
Anthropic logo
Anthropic
Intermediate
The article provides a detailed postmortem of three infrastructure bugs that affected the response quality of Claude between August and early September.
10 min read
Includes Code
Has Summary
--
NVIDIA logo
NVIDIA
Advanced
The article discusses Autodesk Research's development of the Accelerated Lattice Boltzmann (XLB) library, which enhances computational fluid dynamics (CFD) performance using NVIDIA's Warp and GH200...
Mehdi Ataei
7 min read
Has Summary
--
Google logo
Google
Advanced
The article discusses how JAX, a popular framework for AI model development, is being increasingly adopted in scientific computing, particularly for solving complex Partial Differential Equations (...
Srikanth Kilaru, Zekun Shi, Min Lin
6 min read
Has Summary
--
NVIDIA logo
NVIDIA
Advanced
The article discusses how NVIDIA's hardware innovations, particularly the Blackwell architecture and NVFP4 precision, along with their open source contributions, are driving advancements in AI.
George Chellapa
8 min read
Has Summary
--
Google logo
Google
Intermediate
The article introduces Gemma 3 270M, a compact AI model designed for hyper-efficient task-specific fine-tuning.
Olivier Lacombe, Kathleen Kenealy, Kat Black, Ravin Kumar, Francesco Visin, Jiageng Zhang
5 min read
Has Summary
--
NVIDIA logo
NVIDIA
Intermediate
The article discusses the introduction of Wheel Variants, a new Python packaging standard aimed at improving the installation and packaging workflows for CUDA-accelerated Python packages.
Jonathan Dekhtiar
15 min read
Includes Code
Has Summary
--
Google logo
Google
Advanced
This article provides a comprehensive guide on how to train a GPT-2 model using JAX on TPU, highlighting the ease of leveraging Google TPUs for free.
Google logo
Google
Advanced
The article discusses the increasing adoption of JAX in robotics, highlighting its efficiency in optimal control and simulation. It features insights from Max Muchen Sun, a Robotics Ph. D.
Srikanth Kilaru, Max Muchen Sun
6 min read
Has Summary
--
NVIDIA logo
NVIDIA
Advanced
The article discusses techniques for optimizing low-latency communication in inference workloads using JAX and XLA, particularly focusing on the decode phase of large language models (LLMs).
Jaya Shankar
6 min read
Includes Code
Has Summary
--
Google logo
Google
Advanced
Stanford's Marin project introduces the first fully open foundation model developed using JAX, emphasizing transparency in the scientific process behind AI models.
Srikanth Kilaru, David Hall
8 min read
Includes Code
Has Summary
--
NVIDIA logo
NVIDIA
Advanced
NVIDIA cuQuantum is an SDK designed to accelerate quantum computing emulations significantly. The latest update, cuQuantum 25.
Tom Lubowe
4 min read
Includes Code
Has Summary
--
Google logo
Google
Intermediate
The article discusses how to use KerasHub for loading model weights from SafeTensors into Keras, enabling flexible end-to-end machine learning workflows across different frameworks like JAX, PyTorc...
Yufeng Guo, Divyashree Sreepathihalli, Monica Song
8 min read
Includes Code
Has Summary
--
Google logo
Google
Advanced
The article introduces Keras Recommenders, a new library designed to simplify the creation of state-of-the-art recommendation systems using Keras with JAX, TensorFlow, or PyTorch.
Yufeng Guo, Monica Song
3 min read
Includes Code
Has Summary
--