Google adds long-context training methods to MaxText
The update adds four ways to distribute long sequences across chips. Google says they enabled Llama 3.1 8B training with contexts up to 14 million tokens on Cloud TPUs.

Google has added four context-parallelism strategies to MaxText, its open-source JAX training framework. The methods distribute sequences across chips and stream key-value data between them, addressing memory, compute and communication demands in long-context training.
In tests with Llama 3.1 8B, Google reported support for context lengths up to 14 million tokens on TPU 5p and TPU 7. It reported 70% model FLOPs utilization for sequences up to 4 million tokens on TPU 5p, and about 50% utilization below 6 million tokens. Google identifies P2P, also called Ring Attention, as its preferred method for very long contexts; All-Gather is a baseline when key-value data fits. MaxText 0.2.4 is available.