Google has integrated four context-parallelism strategies into MaxText, its open-source JAX training framework, enabling LLM training with context lengths up to 14 million tokens on Cloud TPUs. Context parallelism splits a sequence across multiple chips and streams keys and values between them, instead of holding the full sequence on every chip.
The four strategies are All-Gather, All-to-All (Ulysses), P2P (Ring Attention) and A2A + P2P (USP). They differ in high-bandwidth memory requirements, in how well they overlap communication with computation, and in how far they scale beyond the number of KV heads. Google describes P2P as the primary option for very long-context training, with All-Gather as the baseline where the KV fits.
Using Llama 3.1 8b on Cloud TPU infrastructure, Google reports about 70% Model FLOPs Utilization up to 4 million tokens on TPU 5p and roughly 50% below 6 million tokens. P2P reached 48.7% MFU on TPU 7 compared with 37.1% on TPU 5p. Planned work includes support for sliding-window and linear attention architectures and further Tokamax kernel optimization. MaxText 0.2.4 is available through PyPI, DockerHub and GitHub.
Why it matters if you build agents
Teams training their own models on TPUs with multi-million-token contexts can select among four built-in context-parallelism strategies in MaxText instead of writing their own. The reported figures make P2P the first option to benchmark for very long sequences on TPU 7. Attention memory is the limit to plan around at these lengths, not raw compute.
Get stories like this every weekday
One short email with the day's agent tooling news.