Four schedules push MoE training to 1M-token context

Four schedules push MoE training to 1M-token context

Training a Mixture-of-Experts (MoE) model at long context or large batch size fails as soon as any single component's peak memory allocation exceeds device memory. The authors argue the real target is every peak at once, not the average memory footprint, and identify four components left unbounded by the parallelism plans in common use, each growing on its own dimension: expert dispatch scales with the routing matrix, the vocabulary projection scales with tokens times vocabulary size, gradient-checkpoint boundaries scale with depth times sequence length, and optimizer state scales with parameter count. Which one runs out first shifts with the model, the context length and the device count, so lowering only the current largest peak simply exposes the next one.

To fix this, the authors introduce four schedules that keep the GPU working set fixed at launch. PipelinedLLEP extends least-loaded expert parallelism with a cap on how many tokens each source can contribute to a dispatch chunk. Ring-DTP circulates activations or weight shards around a ring during the vocabulary projection and folds each block of logits into an online log-sum-exp. Selective Checkpoint Offload (SCO) keeps the one long-lived tensor from each checkpoint boundary in CPU memory. OffloadStreamAdamW turns the serial CPU Adam update used in optimizer offload into a bucketed pipeline. All four only change the order and granularity of computation and data movement, so the loss and gradients stay exact: no approximation is introduced to buy the memory savings.

In matched component-level tests, the schedules cut the MoE dispatch peak by up to 59.3% without losing throughput, cut the vocabulary-projection peak by 86.6%, and made the offloaded optimizer step 2.05 times faster. Composed together on MoE models ranging from 120B to 667B parameters, they let training reach a 1M-token context length, 8 to 32 times the context reach of a tuned FSDP2 baseline, and up to 10.4 times its throughput.

Key facts

  • Training an MoE model at long context or large batch size fails as soon as any single component's peak memory allocation exceeds device memory; the fix targets every peak at once, not the average footprint.
  • Four components are left unbounded by common parallelism plans: expert dispatch, the vocabulary projection, gradient-checkpoint boundaries, and optimizer state, each scaling on a different dimension.
  • Four new schedules, PipelinedLLEP, Ring-DTP, Selective Checkpoint Offload, and OffloadStreamAdamW, bound all four peaks while keeping the loss and gradients exact.
  • In matched component tests, the methods cut the MoE dispatch peak by up to 59.3%, the vocabulary-projection peak by 86.6%, and made the offloaded optimizer step 2.05 times faster.
  • Composed on MoE models from 120B to 667B parameters, the schedules reach 1M-token context length, 8 to 32 times the reach of a tuned FSDP2 baseline, and up to 10.4 times its throughput.

Why it matters

Long-context MoE training keeps hitting a wall that isn't about total memory but about the worst single peak: as soon as one component's peak allocation exceeds the device's memory, training fails, no matter how much headroom every other component has. This work treats that peak, not the average footprint, as the real budget to manage, and brings all four previously unbounded components, expert dispatch, the vocabulary projection, checkpoint boundaries, and optimizer state, under a GPU working set fixed at launch. That closes a real gap: existing parallelism plans manage the average case but leave each of these four to grow unchecked as the model, the context length or the device count changes.

Who it affects

Anyone training MoE models at long context, large batch size, or both, on a fixed GPU budget, without buying more hardware. The reported gains hold across a wide span of model sizes, from 120B to 667B parameters, so both mid-scale and larger MoE training runs see the same class of benefit.

How to use it

The four schedules are meant to be composed together rather than used individually: PipelinedLLEP caps the tokens each source contributes to an expert-dispatch chunk, Ring-DTP folds the vocabulary projection into an online log-sum-exp as activations or weight shards circulate a ring, Selective Checkpoint Offload moves the one long-lived tensor per checkpoint boundary to CPU memory, and OffloadStreamAdamW turns the serial CPU Adam update into a bucketed pipeline. The text does not say whether code or model weights have been released, so applying the schedules directly would require information beyond what's stated here.

How solid is it

The headline numbers come from two different kinds of tests: matched component-level tests (the 59.3%, 86.6% and 2.05 times figures) and a composed run measured against a tuned FSDP2 baseline (the 1M-token context, the 8 to 32 times reach, and the up to 10.4 times throughput). The authors state that all four schedules only change the order and granularity of computation and data movement, so the loss and gradients stay exact, meaning the memory savings aren't bought with any approximation to model quality. The text does not name the institution, lab or individual authors behind the work, nor the hardware or cluster configuration used, nor a publication venue or date, so independent verification is limited to what is stated here.

Risks and caveats

The comparison baseline is described only as "a tuned FSDP2 baseline"; no other baseline is named, so the text does not show how these gains compare with other memory-optimization approaches. Because the bottleneck component shifts with the model, context length and device count, a team adopting this should expect to find its own dominant peak rather than assume the same one will dominate in every setup. No release details for code or model weights are given in the text.