Why it matters
Gradient memory doubles param memory. Understanding shapes reduction techniques.
Advertisement
The architecture
Grads: 2 bytes (bf16) or 4 (fp32) per param.
Or shard across GPUs.
Advertisement
How it works end to end
bf16 grads: 2 bytes.
FP32 grads: 4 bytes.
ZeRO-2: 1/N grads per GPU.
ZeRO-3 / FSDP: 1/N params too.