Labs / LLM and RAG Lab
Data parallelism and ZeRO memory
Split weights, gradients, and optimizer state across GPUs with DDP, ZeRO-1/2/3, and FSDP; compare memory per GPU and communication.
Theory and worked examples: ZeRO and FSDP
Data parallelism and ZeRO memory
Synthetic Llama-like model shapes, 2,048 tokens per GPU with gradient checkpointing. Estimates of training state, not measurements.
weightsgradientsoptimizer statesactivations
What each GPU stores under ZeRO-1: a full bar is a replicated copy, a slice is that GPU's 1/8 shard.
GPU 0
GPU 1
GPU 2
GPU 3
GPU 4
GPU 5
GPU 6
GPU 7
DDP1.00× DDP traffic
ZeRO-11.00× DDP traffic
ZeRO-21.00× DDP traffic
ZeRO-3 / FSDP1.50× DDP traffic