[NVIDIA Tech Report] Breaking the "Three Walls" of Trillion-Parameter MoE Training

Scalable Training of Mixture-of-Experts Models with Megatron Core

Zijie Yan (NVIDIA), Hongxiao Bai (NVIDIA), Xin Yao (NVIDIA), Dennis Liu (NVIDIA), Tong Liu (NVIDIA), Hongbin Liu (NVIDIA), Pingtian Li (NVIDIA), Evan Wu (NVIDIA), Shiqing Fan (NVIDIA), Li Tao (NVIDIA), Robin Zhang (NVIDIA), Yuzhong Wang (NVIDIA), Shifang Xu (NVIDIA), Jack Chang (NVIDIA), Xuwen Chen (NVIDIA), Kunlun Li (NVIDIA), Yan Bai (NVIDIA), Gao Deng (NVIDIA), Nan Zheng (NVIDIA), Vijay Anand Korthikanti (NVIDIA), Abhinav Khattar (NVIDIA), Ethan He (NVIDIA), Soham Govande (NVIDIA), Sangkug Lym (NVIDIA), Zhongbo Zhu (NVIDIA), Qi Zhang (NVIDIA), Haochen Yuan (NVIDIA), Xiaowei Ren (NVIDIA), Deyu Fu (NVIDIA), Tailai Ma (NVIDIA), Shunkang Zhang (NVIDIA), Jiang Shao (NVIDIA), Ray Wang (NVIDIA), Vasudevan Rengasamy (NVIDIA), Rachit Garg (NVIDIA), Santosh Bhavani (NVIDIA), Xipeng Li (NVIDIA), Chandler Zhou (NVIDIA), David Wu (NVIDIA), Yingcan Wei (NVIDIA), Ashwath Aithal (NVIDIA), Michael Andersch (NVIDIA), Mohammad Shoeybi (NVIDIA), Jiajie Yao (NVIDIA), June Yang (NVIDIA)
Summary
Problem
Method
Results
Takeaways
Abstract

NVIDIA's technical report introduces Megatron-Core MoE, a comprehensive open-source framework designed to scale Mixture-of-Experts models to trillion-parameter levels. It achieves state-of-the-art throughput (e.g., 1,233 TFLOPS/GPU for DeepSeek-V3 on GB300) through a co-designed stack of memory, communication, and compute optimizations.

TL;DR

NVIDIA’s Megatron-Core MoE is a production-ready framework that solves the fundamental scaling paradox of Mixture-of-Experts (MoE) models. By introducing Parallel Folding, Sync-Free execution, and FP8/FP4 optimization, it achieves record-breaking throughput on Blackwell and Hopper architectures, enabling the training of models like DeepSeek-V3 and Qwen3 with unprecedented efficiency.

The Problem: The Sparsity Paradox & The Three Walls

In dense models, parameters and computation scale in lockstep. MoE models break this: they offer massive capacity with sub-linear compute. However, this sparsity introduces a Parameter-Compute Mismatch. Training a 1-trillion parameter MoE might only activate 30B parameters per token, yet the system must store and manage the full 1T. This leads to:

  1. The Memory Wall: Parameters and optimizer states for "idle" experts still consume VRAM.
  2. The Communication Wall: Expert Parallelism (EP) requires intensive all-to-all collectives that often saturate inter-node bandwidth.
  3. The Compute Wall: Small expert GEMMs underutilize Tensor Cores, while dynamic routing forces frequent CPU-GPU synchronizations.

Methodology: High-Dimensional Parallelism & Parallel Folding

The most significant architectural shift is MoE Parallel Folding. Traditional frameworks force Expert Parallelism (EP) to be a subset of Data Parallelism (DP). Megatron-Core decouples these, allowing Attention layers to use high Tensor Parallelism (TP) for large matrices while MoE layers use high EP for expert distribution.

Parallel Folding Strategy

Overcoming the Walls

1. Breaking the Memory Wall: Fine-Grained Offloading

To fit massive models like DeepSeek-V3 into GPU memory, Megatron-Core employs Fine-grained Activation Offloading. Unlike traditional methods, it identifies specific modules (like Expert MLP inputs) to move to CPU memory during the forward pass and prefetches them just in time for the backward pass, hiding PCIe latency behind computation.

2. Breaking the Communication Wall: DeepEP & HybridEP

Expert Parallelism suffers from the bottleneck of cross-node all-to-all communication. The report introduces HybridEP, which exploits hardware primitives (TMA and IBGDA) to maximize bandwidth on NVLink-rich topologies like NVL72. By overlapping backward weight gradients with forward computation through a specialized 1F1B schedule, EP communication overhead is reduced from ~40% to under 5%.

MoE Data Flow

3. Breaking the Compute Wall: Sync-Free MoE & CUDA Graphs

One of the boldest moves is the Sync-Free MoE design. Dropless MoE models typically require the CPU to wait for the GPU to report how many tokens each expert received before launching kernels. Megatron-Core eliminates this "Host-Device Synchronization" using:

  • Device-Initiated Kernels: Kernels that read their own problem size from GPU memory.
  • ECHO (Elastic Cloning for Hot Experts): Dynamically cloning popular experts to balance load.
  • Paged Stashing: A paging memory manager within CUDA Graphs to handle dynamic activations without over-allocating for the "worst-case" scenario.

Experiments: Performance on the Frontier

The results on Blackwell (GB200/GB300) are transformative. The native support for MXFP8 and NVFP4 formats allows for higher arithmetic intensity.

Performance Comparison

Key Benchmarks:

  • DeepSeek-V3 (685B): Sustains 1,233 TFLOPS on GB300.
  • Qwen3 (235B): Sustains 974 TFLOPS on GB300.
  • Long Context: At 128k sequence length, Qwen3 still maintains over 1,150 TFLOPS, proving the effectiveness of the Context Parallelism (CP) integration.

Critical Insight & Conclusion

This report proves that the future of scaling isn't just "more GPUs," but more intelligent distribution. By treating the CPU as a latency-bound controller and moving shape-dispatch logic directly onto the GPU (Sync-Free), NVIDIA has bypassed the traditional "Host-Boundedness" of MoE.

The takeaway for the industry is clear: as we move toward RL-heavy models (like OpenAI o1 or R1) that require long-context and variable-length sequences, the ability to manage Dynamic Context Parallelism and Optimizer Offloading within a unified stack like Megatron-Core is no longer an "optimization"—it is a necessity.

Find Similar Papers

Try Our Examples

  • Search for recent papers or technical reports that implement "Parallel Folding" or similar heterogeneous parallelism strategies for Mixture-of-Experts models.
  • Which original research introduced the concept of "Sync-Free" or device-initiated kernels for dynamic shape processing in deep learning, and how does Megatron-Core's implementation evolve it?
  • Find studies comparing the convergence stability of FP4/NVFP4 training versus BF16 in large-scale MoE models like DeepSeek or Qwen.
Contents
[NVIDIA Tech Report] Breaking the "Three Walls" of Trillion-Parameter MoE Training
1. TL;DR
2. The Problem: The Sparsity Paradox & The Three Walls
3. Methodology: High-Dimensional Parallelism & Parallel Folding
4. Overcoming the Walls
4.1. 1. Breaking the Memory Wall: Fine-Grained Offloading
4.2. 2. Breaking the Communication Wall: DeepEP & HybridEP
4.3. 3. Breaking the Compute Wall: Sync-Free MoE & CUDA Graphs
5. Experiments: Performance on the Frontier
6. Critical Insight & Conclusion