AI Cloud Architect

Announcing Long-Context Training on TPUs with MaxText Context Parallelism

GoogleAnnouncement by Michael Tran, Nuojin Cheng and Deepak PatilGoogle Developers Blog

Google Cloud's MaxText framework now supports long-context training up to 14 million tokens on Cloud TPUs by implementing four context-parallel strategies: All-gather, A2A, P2P, and USP. Powered by the Tokamax Splash Attention kernel, these strategies effectively manage attention compute and memory bottlenecks without materializing full key-value sequences in high-bandwidth memory. Developers can adopt these capabilities in MaxText v0.2.4 to achieve high Model FLOPs Utilization (MFU) across…

Read the original (opens the source's page in a new tab)

AI: Summary

What it is

MaxText now supports long-context training with four context-parallel strategies on Cloud TPU, using the Tokamax Splash Attention kernel to handle sequences of up to 14 million tokens.

Who it is for

ML engineers and architects training long-context models on TPU 5p or TPU 7 who need to fit multi-million-token sequences in HBM.

Key points

  • Strategies: All-gather, All-to-All (Ulysses), P2P (ring attention), and A2A + P2P hybrid (USP)
  • Available in MaxText v0.2.4 via PyPI, Docker images and GitHub main
  • Config flag context_parallel_strategy accepts ring, ulysses or usp
  • Google claims 70% MFU on TPU 5p up to 4M tokens, and 48.7% MFU at 14M tokens on TPU 7 chips