TL;DR
Training trillion-parameter language models across thousands of GPUs usually feels like navigating a soup of conflicting distributed strategies—data, tensor, sequence, context, and pipeline parallelisms. This paper reveals that five of these strategies are actually just special cases of a single unified framework called Generalized Tensor Parallelism (GTP). By rethinking how we gather sharded weights—scheduling them right before individual matrix multiplications rather than whole Transformer blocks—the authors unlock 13.0 exaFLOP/s across 12,288 GPUs without leaving chips idle.
What Problem Does This Paper Address?
Fitting a modern trillion-parameter model onto GPUs is a massive jigsaw puzzle. A single GPU can’t hold the weights, optimizer states, and activations, so we slice the workload across thousands of accelerators. Unfortunately, every standard slicing strategy forces a painful compromise:
- Data Parallelism (DP) copies weights everywhere, eating up memory.
- Tensor Parallelism (TP) slices individual layers, requiring chatty activation syncs on the critical path that only work well over ultra-fast local NVLink connections.
- Pipeline Parallelism (PP) splits layers into stages, leaving GPUs sitting idle during "pipeline bubbles" while stages fill, drain, or wait on an imbalanced, slower peer.
- Fully Sharded Data Parallelism (FSDP) shards weights across GPUs and "re-materializes" (all-gathers) them right before use. However, existing FSDP tools grab weights for an entire Transformer block at once. That spikes peak memory and forces the very first matrix multiplication in a block to wait until the last weight in that block finishes downloading.
Methods
At its heart, nearly all LLM compute boils down to linear layers executing matrix multiplications (GEMMs) between two inputs: activations ($X$) and parameters ($W$).
GTP unifies five parallelisms (DP, TP, Sequence Parallelism, Context Parallelism, and FSDP) into two clean decisions for every GEMM: how to partition $X$ along the token dimension ($c$), how to partition $W$ along the hidden dimension ($t$), and whether to further shard and re-materialize either input right before they multiply.
The magic happens when you treat fetching sharded weights not as a coarse wrapper around a Transformer block, but as a nimble preprocessing step for a single GEMM. GTP introduces per-GEMM scheduling built on three policies:
- Separate Prefetch Chains: Dense weights stay inside fast NVLink domains and prefetch just one GEMM ahead. In Mixture-of-Experts (MoE) models, expert weights are sharded across slower inter-domain networks, so GTP prefetches them a full MoE block ahead, hiding the slow transfer behind other computations.
- Consumer-Specific Waits: Instead of stalling for an entire module's weights, each GEMM waits only for its own specific weight tensor—even reaching inside fused MoE kernels so the first expert layer doesn't wait on the second.
- Coalesced Expert Collectives: Local expert weights used together in a single grouped GEMM are bundled into one network call to avoid latency overhead.
The authors also decouple how weights are grouped from how data sequences are split, allowing 1M-token sequences to stretch across multiple NVLink domains while keeping dense weight communication strictly local. Finally, they adapt the Muon optimizer (which requires whole-matrix orthogonalization) to sharded weights by routing whole matrices to "home" GPUs for updates rather than duplicating the math everywhere.
Datasets
Not discussed in the paper. Performance benchmarks use synthetic/random initialization with forced MoE load balancing, and a 1-trillion-token loss-curve validation on Nemotron-3-Nano does not specify the underlying text corpus. (The authors do evaluate across several major model architectures: Nemotron-3-Nano, DeepSeek-V3, a 1.6T DeepSeek-V4-Pro proxy, and an internal 2T-parameter MoE model.)
Key Insights and Ideas
- Five parallelisms are really one: Viewing DP, TP, SP, CP, and FSDP as simple axes of input sharding and re-materialization strips away years of conceptual clutter in distributed systems.
- Stop waiting on the whole block: Module-level hooks in standard FSDP cannot peer inside fused operators. Moving scheduling down to the individual GEMM level cuts exposed backward-pass communication from 80% down to 20% on DeepSeek-V4-Pro.
- Tokens per expert govern your "hiding budget": Weight size actually cancels out when calculating the ratio of compute time to weight-transfer time! Whether you can hide communication depends purely on tokens per expert—meaning larger microbatches give you free cover for network traffic.
- Ditching pipelines beats stage imbalance: Modern hybrid/MoE models have heterogeneous layers that are notoriously hard to balance across pipeline stages. Dropping Pipeline Parallelism in favor of GTP eliminates pipeline bubbles and stage-waiting entirely.
- Don't shard tiny weights in low precision: Block-quantized formats like MXFP8 require row counts divisible by 32. Sharding a narrow projection layer across 64 GPUs forces up to 300% zero-padding—ballooning network traffic for zero memory gain. Leaving small weights replicated is much smarter.
Key Results
Tested on NVIDIA GB300 GPUs (72-GPU NVLink domains), the open-source Megatron-Core implementation delivers:
- Exascale Training: Reaches 13.0 model EFLOP/s on an internal 2T MoE model across 12,288 GPUs, achieving 98.2% weak-scaling efficiency from 4,096 to 12,288 GPUs.
- Faster than FSDP: Achieves 1.05–1.55× higher throughput and 4–16% lower memory than Megatron-FSDP across three MoE models (256–1,024 GPUs), and 1.04× throughput with 16% less memory than PyTorch FSDP2.
- Faster than 3D Parallelism: Beats a tuned 3D-parallel recipe (with Pipeline Parallelism) by 1.27–1.31× on the DeepSeek-V4-Pro proxy.
- Million-Token Contexts: Trains the full 2T model on 1M-token sequences across 512 GPUs at 883 TFLOP/s/GPU.
- Sharded Muon Speedup: Their hybrid layer-sharded Muon optimizer boosts throughput by 1.15–1.55× over duplicated Newton–Schulz iterations.
Limitations and Future Work
- Memory buffers vs. Pipeline Parallelism: To achieve peak throughput with larger microbatches, GTP uses 29–48% more memory than 3D parallelism due to temporary buffers for prefetched weights and full-partition gradients. When microbatches have too few tokens to hide weight transfers, or global batches are massive and evenly balanced, combining GTP with Pipeline Parallelism is still warranted.
- Long-context bottlenecks: At 1M sequence lengths, quadratic $O(TL)$ softmax attention swells to 64% of GPU activity, and cross-domain Context Parallelism traffic rarely overlaps with compute, causing a 30% drop in TFLOP/s/GPU compared to 8K sequences.
- CUDA Graph constraints: Dynamic MoE token routing requires preallocating fixed token capacities to use full-iteration CUDA graphs; if an unruly batch exceeds capacity, the system must discard the graph and rerun the step eagerly.
Summary updated