When designing a 1,024-GPU training fabric, match TP=8 to NVLink, use 1F1B to bound activation memory to O(PP), and shard optimizer states with ZeRO-1.
TL;DR30-second simplified summary▾
Mapping TP=8 inside 900 GB/s NVLink, PP=8 with 1F1B scheduling (9.86% bubble at M=64), and DP=16 with ZeRO-1 drops static per-GPU memory to ~2.7 GB while overlapping gradient AllReduce and async NVMe-to-S3 checkpoints.
R & E · Requirements, Memory Math & 3D Topology Sizing.
Before picking parallelism dimensions, do the memory math: 70B parameters in BF16 weights (2B) + BF16 gradients (2B) + FP32 master weights (4B) + AdamW m & v (8B) = 16 bytes/parameter = 1.12 TB of static state before a single token's activations are stored.
With 1,024 GPUs (128 nodes x 8 GPUs), map TP=8 to the 8 GPUs inside each NVLink node. That gives 640 GB HBM per TP group. Adding PP=8 creates a 64-GPU model replica (80 layers / 8 = 10 layers per stage), leaving DP = 1024 / (8 * 8) = 16 data-parallel replicas. With ZeRO-1, each GPU holds 1/64 of weights/grads (1.09 GB each) and 1/(64*16) of optimizer states (~0.55 GB)—leaving >70 GB of HBM per GPU for activations and large microbatches.
Unsharded 1.12 TB State vs. TP=8 · PP=8 · DP=16 + ZeRO-1
- 1.12 TB static state > 80 GB HBM
- Immediate OOM on step 0
- Cross-node TP stalls on IB
- ~2.7 GB static state per GPU
- 9.86% pipeline bubble at M=64
- TP stays 100% inside NVLink
S · Storage & Asynchronous Two-Tier Checkpointing.
At 1,024 GPUs, a GPU or NIC fails roughly once every 12–24 hours. If you pause all 1,024 GPUs to stream 1.12 TB directly to S3 every 30 minutes, you burn ~15% of cluster GPU-hours on storage I/O.
Use a two-tier asynchronous checkpoint pipeline: (1) Copy sharded weights/optimizer tensors from GPU HBM to pinned host DRAM (~1.5s over PCIe Gen5), then resume training immediately; (2) A background CPU thread flushes host DRAM to local PCIe Gen4/5 NVMe (~3s) and streams shards to global S3/Ceph object storage in parallel.
HBM Snapshot -> Pinned DRAM -> Local NVMe -> Async S3
H & A · High-Level Fabric & 1F1B Pipeline Schedule.
In naive GPipe, all M=64 forward microbatches run before any backward pass starts, forcing Stage 0 to store 64x activations in HBM and causing OOM.
A 1F1B (One-Forward-One-Backward) schedule runs PP warmup forward passes, then alternates 1 forward and 1 backward microbatch per stage. Stage 0 never holds more than PP=8 in-flight microbatch activations in HBM—cutting peak activation memory by 8x while keeping the exact same 9.86% bubble ratio.
NVLink TP=8 Rings + IB PP=8 Stages + IB DP=16 Gradient Rings
D · Detailed Design: Gradient Bucketing & Fault Recovery.
Waiting until the entire backward pass finishes before starting the DP=16 AllReduce leaves all GPUs idle during network transfer.
Register autograd backward hooks that group gradients into 25 MB–50 MB contiguous buckets. As soon as the last microbatch finishes computing gradients for Stage 7's layers, NCCL launches an asynchronous DP AllReduce on that bucket while backward compute continues on earlier layers.
1F1B Pipeline & Overlapped DP Gradient Bucketing
- Problem
- How to minimize pipeline bubbles and checkpoint stalls across 1,024 GPUs.
- Naive Solution
- Use GPipe (all forwards then all backwards) and synchronous S3 checkpointing.
- Why It Fails
- GPipe holds O(M) activations in HBM (OOM), and synchronous S3 writes freeze 1,024 GPUs for 10+ minutes.
- Alternatives
- GPipe vs. 1F1B vs. Interleaved 1F1B; ZeRO-1 vs. ZeRO-3.
- Engineering Decision
- Use 1F1B (or Interleaved 1F1B for even smaller bubbles) + ZeRO-1 + async pinned-DRAM -> NVMe -> S3 checkpointing.
- Trade-Offs
- Interleaved 1F1B shrinks pipeline bubbles by ~v-fold in exchange for v-fold more point-to-point activation sends.
Your 1,024-GPU training run (TP=8, PP=8, DP=16) shows 38% MFU instead of >50%. Profiling reveals Stage 0 is running out of memory with M=64 microbatches under GPipe, forcing m_bs=1 and M=16. What change recovers >50% MFU?
E & D · Evaluation, Assumptions, Limitations & Glossary.
Every distributed training number depends on cluster fabric symmetry: non-blocking fat-tree InfiniBand, healthy NVLink bridges, and balanced microbatch lengths.
Assumptions & Limitations: Calculations assume a 70B dense Transformer (80 layers, h=8192) on 1,024x 80 GB H100s with 900 GB/s NVLink and 400 Gbps InfiniBand per GPU, homogeneous BF16 mixed precision, and non-blocking fat-tree rail-optimized routing. Variable-length unpadded batches can introduce stragglers across DP ranks unless sequence packing is used.
Training -> Node Fault -> Hot-Spare Swap -> Ckpt Resume (<5 min)
Practice: Make the trade-off yourself.
In a 1,024-GPU cluster (128 nodes x 8 GPUs) configured with TP=8, PP=8, DP=16 and M=64 microbatches per step, what is the approximate pipeline bubble fraction?