Google Enhances its Open-Source MaxText Training Framework
Google added four context-parallelism methods to open-source MaxText 0.2.4, training Llama 3.1 8b up to 14 million tokens with 70% MFU on Cloud TPUs.
By Dillip Chowdary • Nov 28, 2026 • Source: InfoQ

At a glance
- Product
- MaxText
- Version
- 0.2.4
- Framework
- JAX
- Maximum context
- 14 million tokens
- Supported hardware
- Cloud TPU 5p and TPU 7
- Availability
- PyPi, DockerHub, and GitHub
In this post
Google expanded its open-source JAX training framework, MaxText, by integrating four distinct context-parallelism strategies designed to handle multi-million-token sequence lengths on Cloud TPU infrastructure. As detailed in InfoQ's report, the system update enables machine learning teams to train large language models on sequences reaching up to 14 million tokens across TPU 5p and TPU 7 hardware. The release targets the severe memory and computational bottlenecks that emerge when sequence lengths expand past traditional cluster capabilities.
This technical breakdown examines the operational architecture of Google's context-parallelism implementations, their measured utilization benchmarks across Cloud TPU generations, and the configuration tradeoffs engineers face when scaling context windows. Systems engineers, machine learning researchers, and distributed computing teams working with multi-million-token models can use these benchmarks to select context-parallelism mechanisms that avoid cluster out-of-memory faults.
01Sequence growth and hardware memory limits
Context windows in production language models have expanded rapidly across recent training cycles. Over three years, baseline sequence lengths grew from 128K–200K tokens to 1M–2M tokens, while frontier research models designed for 10 million tokens began entering active training pipelines. Expanding these sequences allows systems to ingest entire multi-file software repositories and continuous video streams without chunking artifacts.
Training at such extreme sequence lengths exposes hardware boundaries that do not appear during standard model serving. The primary scaling roadblock is the quadratic growth of attention computations combined with the linear expansion of model activations and key-value caches. When training clusters attempt to materialize full multi-million-token sequences onto single accelerator chips, memory exhaustion halts execution before computation can saturate device cores.
Nathan Beach, a director at Google, noted that attention memory rather than raw compute constitutes the initial wall teams encounter when training multi-million-token models on TPU accelerators. High-bandwidth memory capacity is quickly consumed by stored attention tensors, requiring training frameworks to partition sequence dimensions across networked chips rather than relying solely on standard data or tensor parallelism.
02Four context-parallelism strategies in MaxText
To overcome these memory walls, Google introduced four separate context-parallelism strategies within MaxText: All-Gather, All-to-All (Ulysses), P2P (Ring Attention), and A2A + P2P (USP). Instead of materializing full token sequences on every chip, each strategy partitions sequences across multiple processors and streams intermediate key and value tensors over high-bandwidth inter-chip interconnects.
The four techniques differ fundamentally in their high-bandwidth memory footprints, their capacity to overlap network communication with active matrix computation, and their ability to scale beyond the count of key-value heads. All-Gather acts as a standard baseline configuration for moderate context lengths where key-value tensors comfortably fit within device memory.
| Strategy | Primary mechanism | Scalability scope |
|---|---|---|
| All-Gather | Collects full sequence tensors across chips | Baseline where KV caches fit in HBM |
| All-to-All (Ulysses) | Transposes sequence and head dimensions | Bound by available KV head counts |
| P2P (Ring Attention) | Peer-to-peer ring communication between chips | Workhorse for extreme sequence lengths |
| A2A + P2P (USP) | Hybrid all-to-all and peer-to-peer streaming | Extended scaling across TPU topologies |
P2P (Ring Attention) operates as the primary workhorse implementation for very long-context workloads in production. By circulating key and value states in an asynchronous ring, Ring Attention avoids broadcasting full context states across the whole cluster, allowing context lengths to scale linearly with accelerator counts.
Advertisement
Tech Pulse Daily
Get tomorrow's pulse first
Join engineers who read Tech Pulse before stand-up. Free, weekday mornings.
03Measured model FLOPs utilization on Cloud TPUs
Google evaluated the performance of these context-parallelism strategies using the Llama 3.1 8b model across Cloud TPU 5p and TPU 7 infrastructure. On Cloud TPU 5p clusters, the framework sustained 70% Model FLOPs Utilization (MFU) for sequence lengths reaching up to 4 million tokens. The system maintained approximately 50% MFU across sequence windows below 6 million tokens.
The tests confirmed support for sequence lengths up to 14 million tokens on both Cloud TPU 5p and TPU 7 hardware. Hardware generational improvements yielded higher efficiency under peer-to-peer streaming, with P2P Ring Attention registering 48.7% MFU on TPU 7 compared to 37.1% MFU on TPU 5p.
Note: Extreme long-context scaling to 14 million tokens requires distributed Cloud TPU 5p or TPU 7 hardware topologies capable of sustaining high-throughput peer-to-peer tensor streaming across the context-parallel mesh.
04Attention architectures and Tokamax kernel roadmaps
Google identified two central development tracks for subsequent MaxText updates. The first roadmap track expands architectural support to models that combine sliding-window attention with global attention layers. Engineers also plan to integrate native support for linear attention mechanisms, specifically naming Gated Delta Net (GDN) and Kimi Delta Attention (KDA) architectures.
The second track focuses on kernel-level execution speed and communication efficiency across the distributed mesh. Development efforts target further tuning of Tokamax kernels and performance enhancements inside the P2P backward pass to minimize pipeline stalls during gradient accumulation.
Additionally, the team is compiling architectural training recipes categorized by model architecture and context length. These recipes will provide optimized layout parameters tailored to distinct Cloud TPU chip topologies, minimizing the trial-and-error needed to configure context parallelism for custom models.
05Framework availability and distribution channels
The updated training capabilities are packaged in the MaxText 0.2.4 release. Machine learning teams can integrate the framework directly into existing JAX training workflows or deploy containerized jobs on managed cloud clusters without maintaining custom communication patches.
Software distributions are available through PyPi, DockerHub, and GitHub. The open-source repository provides reference implementations of the All-Gather, Ulysses, Ring Attention, and USP strategies alongside configuration templates for Cloud TPU hardware.
Frequently asked questions
What context length does MaxText 0.2.4 support on Cloud TPUs?
MaxText supports training sequence lengths reaching up to 14 million tokens on Cloud TPU 5p and TPU 7 hardware.
Which context-parallelism strategies are implemented in MaxText?
The framework integrates four strategies: All-Gather, All-to-All (Ulysses), P2P (Ring Attention), and A2A + P2P (USP).
What Model FLOPs Utilization did Google achieve with Llama 3.1 8b?
Google recorded 70% MFU up to 4 million tokens on TPU 5p, approximately 50% MFU below 6 million tokens, and 48.7% MFU for P2P on TPU 7.
How can engineers access MaxText 0.2.4?
MaxText 0.2.4 is open source and available for download via PyPi, DockerHub, and GitHub.
Sources
Author
Dillip Chowdary
Writes Tech Bytes coverage of AI, engineering, and the tools that actually ship. Editor of Tech Pulse Daily.
Related on Tech Bytes
Advertisement