Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Long-context MoE training guidance for Megatron Bridge. Covers CP sizing, selective recompute, dispatcher choices, and practical patterns from DSV3, Qwen3, and Qwen3-Next long-context experiments.
| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-03 | ✗→✓ | ▲ Improved | 12% | 0% |
| case-01 | ✗→✓ | ▲ Improved | -15% | 0% |
| case-02 | ✗→✓ | ▲ Improved | -26% | 0% |
| case-04 | ✗→✓ | ▲ Improved | -19% | 0% |
| case-05 | ✗→✓ | ▲ Improved | 7% | 0% |
Stable docs: @docs/training/moe-optimization.md Card: @skills/nemo-mbridge-perf-moe-long-context/card.yaml
Once sequence length moves well past the 4K-class regime, attention memory and activation residency become the dominant constraints. For MoE models, that usually means you need some combination of:
The DSV3 long-context runs show a stable pattern:
shortest contexts
contexts if CP is increased appropriately
In other words, long context does not immediately collapse utilization if the layout is chosen well, but it does consume the DP budget very quickly.
Qwen3-Next behaves more like a memory-sensitive medium-scale model:
much tighter
Qwen3 235B shows that long context can still be efficient on NVL72 systems when TP, CP, and HybridEP are coordinated. The best 128K-class configurations are not just "fit-only" recipes; they can remain highly efficient if routing, parallelism, and recompute are balanced.
CP ~= seq_len / 4096, then round to a practical power-of-two layout.
EP, TP, and PP together squeeze DP down to the floor.
up_proj, norm,moe, moe_act, or mlp before reaching for full recompute.
internals can add a lot of work for less memory benefit than recomputing smaller MoE and MLP-side modules.
sometimes trade some CP for TP while still staying efficient.
to reduce global batch size or accept higher GA.
textTP=1 CP=32 EP=32 PP=8 VPP=4 Precision: FP8-class Dispatcher: DeepEP Recompute: up_proj, norm, moe, mlp Extra memory help: optimizer CPU offload
textTP=1 CP=64 EP=32 PP=8 EDP=2 VPP=4 Precision: FP8-class Dispatcher: DeepEP Recompute: up_proj, norm, moe, mlp Extra memory help: optimizer CPU offload
textTP=4 CP=4 EP=32 PP=4 VPP=12 Precision: BF16 or MXFP8 Dispatcher: HybridEP Recompute: moe_act, norm CUDA Graph: attn + moe_router + moe_preprocess
For long-context MoE training:
Useful references:
the others disappear.
recompute choice, and offload strategy often need to change.
look fine in a single recipe, then become impossible once EP and PP are added honestly across the full model.
padding strategies can silently break the path.
tend to rely on newer kernels and bug fixes than short-context bring-up does.
Other measured skills in the registry, with their headline benchmark lift.