What problem does it solve?
It solves the problem of unstable and memory-bound MoE training when sequence length moves far beyond the 4K regime, causing long-context OOMs or major throughput drops.
Core Features & Use Cases
- CP sizing for long sequences: Establishes a practical starting point (CP ≈ seq_len / 4096) and explains how CP changes the memory/throughput trade-offs for MoE.
- Selective recompute guidance: Recommends recomputing MoE/MLP-side modules (and avoiding SDPA-heavy recompute at very long context) to preserve memory headroom.
- Dispatcher and parallelism patterns: Provides dispatcher choices (e.g., DeepEP vs HybridEP) and representative TP/CP/EP/PP/VPP layouts drawn from DSV3, Qwen3, and Qwen3-Next long-context runs.
- Practical pitfalls and batching/graph constraints: Highlights why GPU-count feasibility becomes the real constraint, and why CUDA graphs require static shapes.
Quick Start
Use the perf-moe-long-context skill to pick a CP-first layout, apply selective recompute for MoE-side modules, and choose a dispatcher strategy when training an MoE model at 128K tokens with an NVIDIA Megatron-Bridge setup.