ZeRO and FSDP
Watch ZeRO split the training memory of one model over several GPUs.
Pro lesson. Stage 1 is free to watch. Pro opens all 6 stages, 3 controls and 3 checks, in this lesson and every other.
Go Pro · $8.25/moExplain it simply
Training keeps three things per parameter: the parameter, its gradient and the optimizer states. They take 12 bytes: a 4-byte parameter copy and Adam's two averages. ZeRO cuts the optimizer states, the gradients and the parameters into three shards, one per GPU. 2, 3 or 6 GPUs split each layer's 6 numbers evenly. Each GPU holds 128 B.
3 GPU columns and a one-GPU column. Each column has a parameter grid, a gradient grid and an optimizer grid. ZeRO-3 keeps 128 B per GPU.
Memory per GPU counts 2, 2 and 12 bytes per number kept.
- 5 more stages and 3 live controls
- 2 mix-up cards and 3 predict-then-reveal checks
- Watch it as a narrated video, in three voices
- Every Pro lesson and capstone · 656 in total
$99 a year, or $15 a month. Cancel any time.