Google
Google logoGoogle · Feature trail

AI Agent Codebase Navigation and Distraction Mitigation

2 posts · Nov 2026

What this trail covers

This post introduces long-context training support in MaxText, Google Cloud's open-source JAX training framework, enabling efficient training of large language models (LLMs) with multi-million-token sequence lengths. It details four context-parallel strategies (All-gather, A2A/Ulysses, P2P/Ring Attention, and A2A+P2P/USP) implemented on Cloud TPUs, combined with load balancing and sequence packing, all utilizing the Tokamax Splash Attention kernel. These strategies address bottlenecks in attention compute and memory/communication by splitting long sequences across chips, preventing activation materialization on every chip. Benchmarks show significant Model FLOPs Utilization (MFU) on TPU 5p and TPU 7 for sequence lengths up to 14 million tokens. The post also provides guidance on choosing the appropriate strategy based on KV fit in HBM and model head count, and discusses offloading strategies for memory constraints. Future work includes broader model coverage and support for linear attention mechanisms.

All Google trails