🖥️ AI InfrastructureID:
zero-memory-offloadZeRO-1/2/3 & Offload
ZeRO-1/2/3 显存切分
🎯Core Interview Exam Points
Fundamentals · Production Scenarios · Deep DiveCore Def
Explain the core definition, underlying mechanism/math, and key principles of ZeRO-1/2/3 & Offload.
Use Cases
In production engineering, what are the primary use cases for ZeRO-1/2/3 & Offload and what core pain points does it solve?
🔥 High-Frequency Deep-Dive Questions
1
By hand, compute the per-rank static memory for training a 70B model (Adam + FP16/FP32 mixed precision): write , name each term (FP16 params / FP16 grads / FP32 master weights + first + second moments), arrive at 1120 GB, and explain why naive DDP still costs 1120 GB per rank (N redundant copies).
2
Write the per-rank memory formulas for ZeRO-1/2/3: , , ; state what each stage shards and what remains replicated.
3
What does ZeRO-2 save over ZeRO-1, and by how much (gradients drop from to per rank)? Why can gradients be sharded — Reduce-Scatter right after backprop instead of a full All-Reduce.
4
Why is ZeRO-3's communication ~1.5× DDP (forward All-Gather Φ + backward Reduce-Scatter Φ + a second All-Gather for recompute Φ ≈ 3Φ, vs DDP's 2Φ), and is the memory win worth it?
5
What does ZeRO-Offload move to the CPU and at what cost: optimizer states and the Adam step run on the CPU while the GPU keeps only the layer's param shard ; memory drops dramatically at the price of PCIe-bound, slower steps; how does ZeRO-Infinity extend to NVMe?
📖 In-depth Guide:📄 distributed-parallelism →
Updated 2026-08-12🎯
🚀 Start Card Practice ➔Test Your Knowledge: Practice Questions for "ZeRO-1/2/3 & Offload"
Single choice pitfall questions with instant feedback and mistake tracking.