Backward: every GPU computes gradients on its micro-batch
Reduce-Scatter gradients ($\Psi$ bytes): each rank receives only its owned gradient slice
Stage 2: reduce-scatter layer by layer during backward and immediately free unowned gradients
Local optimizer step: each rank updates only its $1/N_d$ slice of master weights and moments
All-Gather parameters ($\Psi$ bytes): collect updated weights onto every rank
Method
Collectives per Step
Comm Volume
Memory per GPU
Naïve DDP
1 All-Reduce (grads)
$2\Psi$
$(4 + K)\Psi$
ZeRO-1
1 Reduce-Scatter + 1 All-Gather
$2\Psi$ (free!)
$(4 + K/N_d)\Psi$
ZeRO-2
Per-layer Reduce-Scatter + All-Gather
$2\Psi$ (almost free)
$(2 + (2+K)/N_d)\Psi$
Because Reduce-Scatter + All-Gather matches All-Reduce bandwidth, ZeRO-1 should almost always replace plain DDP.
ZeRO Stage 3 (FSDP): Shard Parameters Too
Full static memory scaling: parameters, gradients, and optimizer states all shrink as $1/N_d$
Total communication: $3\Psi$ per step ($1.5\times$ DDP) — weights are gathered once for forward and again for backward
Wrap each Transformer layer as an FSDP block so peak materialized weight memory stays bounded to one layer
Hiding FSDP Communication via Prefetching
For $(W_1 W_0 + W_2 W_0)x = y$, separate compute and communication streams overlap parameter prefetches with GEMMs.
While the compute stream runs layer $i$, the comm stream prefetches layer $i{+}1$ (forward) or reduces layer $i{+}1$'s gradients (backward)
Only the first All-Gather and final Reduce-Scatter are exposed when compute time $\ge$ comm time
ZeRO in Practice: Will It Fit on 8× B300?
Assume 12 B/param (2 B params + 2 B grads + 8 B opt state) on 8× NVIDIA B300 (288 GB HBM each), ignoring activations:
Strategy
Formula (B/param)
B/param ($N_d=8$)
Max Model on 8× B300
Historical 8× A100 (80 GB)
Baseline DDP
$12$
$12.00$
24 B ($288/12$)
6.7 B
ZeRO Stage 1
$2 + 2 + 8/8$
$5.00$
57.6 B ($288/5$)
16 B
ZeRO Stage 2
$2 + 10/8$
$3.25$
88.6 B ($288/3.25$)
24.6 B
ZeRO Stage 3
$12/8$
$1.50$
192 B ($288/1.5$)
53.3 B
Still too small for frontier MoEs: neither earlier DeepSeek-V3 (Dec 2024, 671B) nor 2026 frontier Kimi K3 (July 2026, 2.8T) fits on 8× B300
ZeRO-3 does not shard activations: peak memory grows with sequence length and micro-batch size, and pure ZeRO-3 degrades at large GPU counts with fixed global batch size
Before adding model parallelism, low-precision formats offer a direct lever on both memory and communication.
Low-Precision Training as a Parallelism Lever
Lower precision accelerates Tensor Core GEMMs and halves memory and collective communication bytes:
Format
Era / Hardware
Key Mechanism
BF16
Standard (recap Lec. 5)
Matches FP32 exponent range, eliminating FP16 loss scaling (2 B/param)
Hardware microscaling FP8 with shared block exponents
NVFP4
Blackwell native (2025–26)
4-bit GEMMs + block scales, random Hadamard & stochastic rounding
Parallelism win: keeping working parameters in FP8 (1 B/param vs. 2 B) cuts FSDP / ZeRO All-Gather bytes by 2× and reduces per-parameter static memory directly
High-precision islands: keep the router, norms, embeddings, LM head, and first/last layers in BF16/FP32 for numerical stability
Blackwell NVFP4 Pretraining Recipe
$16\times 16$ 2D weight blocks ensure forward and backward GEMMs see identical quantized weights
12B / 10T token test: 62.58 MMLU-Pro vs. 62.62 for FP8
Pretrained Nemotron 3 Super & Ultra; Kimi K3 (July 2026) trains MoE experts with MXFP4 QAT
Beyond Data Parallelism: Model Parallelism
Model parallelism shards parameters across GPUs (like ZeRO-3), but communicates activations instead of weights — scaling memory without growing global batch size.
Plus Context Parallelism (CP), which shards the sequence dimension across GPUs for long contexts (up to 1M tokens).
Pipeline Parallelism: Micro-Batches and the Bubble
Bubble-to-compute ratio: $\dfrac{p - 1}{m}$ — hiding the bubble requires many micro-batches ($m \gg p$)
Why PP shines across racks: shards weights by $1/p$ and sends only point-to-point activations ($bsh$ per micro-batch) over slower RDMA links
Next: better schedules shrink both in-flight activation memory and the bubble itself.
Cutting Memory and Bubbles: 1F1B & Virtual Stages
1F1B alternates one forward and one backward in steady state, capping in-flight micro-batches at $p$ instead of $m$
Virtual pipeline stages (Interleaved 1F1B) shrink the bubble to $\dfrac{p-1}{v\cdot m}$ by trading $v\times$ P2P bandwidth for higher utilization
Zero-Bubble Pipelining and DualPipeV
Zero-bubble (ZB-H1 / ZB-H2): decoupling $\nabla_x L$ ($B$) from $\nabla_W L$ ($W$) lets $W$ fill idle bubbles without delaying upstream stages
DualPipe & DualPipeV: bidirectional schedules overlap forward and backward; DualPipeV cuts DualPipe in half to need half the devices
Key regime variable: batch size per GPU ($B/N$) — pure FSDP becomes comm-bound at small $B/N$, where adding model parallelism keeps compute above communication.
Minimize model parallelism, maximize DP: shard optimizer state first, adding TP/PP/EP only as needed to fit memory and hit target batch size
Keep bandwidth-heavy axes inside the NVLink domain: place TP, EP, and Ulysses CP inside the 72-GPU NVL72 rack (900 GB/s uni-di)
Use PP (+ virtual stages) across domains: low-volume P2P fits inter-rack RDMA links
Prefer EP over TP for MoE layers: decouple attention and experts via MoE Parallel Folding
Enable CP for long contexts ($\ge 8\text{K}$ to 1M tokens); order groups fastest-to-slowest link: [TP, CP, PP, DP]
When global batch size is small relative to cluster size, gradient accumulation increases micro-batches to amortize communication.
Real-World Training Layouts: Historical to 2026
Model (Era)
Hardware
TP
PP
CP
EP
DP / Notes
Llama 3 405B (2024, dense)
16,384 H100
8
16
1→16
–
DP 128→8; 8K→131K ctx; 38–43% BF16 MFU
DeepSeek-V3 (Dec 2024, 671B)
H800 (8-GPU nodes)
1
16
1
64
ZeRO-1; EP across 8 nodes + 1F1B A2A overlap
Qwen3 235B-A22B (May 2025)
512 GPUs
2
8
1
32
Qwen3 30B-A3B: TP1/PP1/EP8 (single 8-GPU node)
Nemotron 3 Super (early 2026, LC)
GB200 NVL72
2
–
64
64
120B-A12B long-context stage; folded CP64 & EP64
Wide-EP Blackwell shape (2026)
GB200/GB300 NVL72
1
4
var
64
EP64 inside 1 NVL72 rack via HybridEP; PP across racks
2026 architectural shift: 72-GPU NVLink domains let EP expand to 64 inside one rack while TP shrinks to 1–2 (larger GEMMs, fewer blocking syncs)
Long-context stages trade DP for large CP (16–64) on the same GPU count
Keeping Long Runs Alive: Failures & Fault Tolerance
Async reshardable checkpoints
Snapshot to host RAM & flush in background; restore into a different TP/PP/DP layout
Hangs, stragglers & in-process restart
Detect slow/hung ranks and swap faulty nodes without relaunching the job
Replica-level fault tolerance
torchft / FT-HSDP isolate failures to one DP replica; FT-HSDP lifts effective training time from 44% to 80% at $O(100\text{K})$ GPUs
Silent Data Corruption (SDC)
Re-run a suspect step to separate bad hardware from bad data; AEGIS (OSDI '26) found 18 SDCs / 13 faulty GPUs over 35M GPU-hours at 0.86% overhead
Worked Layout 1: Dense 70B Model on 64 GPUs
Target: 70B dense Transformer at 12 B/param (2 B params + 2 B grads + 8 B opt state) on 64 Blackwell GPUs (GB200 192 GB or B300 288 GB).
Trades DP for CP=4 to cut sequence activations & KV 4× without adding PP
Why static memory stays 78.75 GB in long context: Megatron Core's distributed optimizer shards optimizer state across $\text{DP} \times \text{CP} = 16$, not just $\text{DP} = 4$
Remaining HBM (>110 GB on GB200; >200 GB on B300) easily fits activations with selective recomputation
Overlap & stability: overlap All-to-All with 1F1B compute + shared expert; keep router in FP32 and replicate hot experts for static CUDA-graph shapes
Scaling to 2.8T (Kimi K3, 896 experts): keep EP=64 inside each NVL72 rack (14 experts/GPU), add PP across racks over RDMA, and DP across replicas
Recap: Parallelism Basics
Match parallelism to the interconnect: keep bandwidth-heavy TP, EP, and Ulysses CP inside the NVLink domain (72 GPUs, 900 GB/s uni-di on GB200/GB300 NVL72); push PP and DP across racks
Exploit the collective identity: All-Reduce = Reduce-Scatter + All-Gather gives ZeRO-1/2 and Sequence Parallelism memory scaling at zero extra bandwidth
Stack precision & activation levers: MXFP8 / NVFP4 halve memory and comm bytes; SP + selective recomputation + CP keep activation memory linear