Module 17 · Lesson 4 of 11Pro
Sharded training: ZeRO and FSDP
- Level
- Advanced
- Reading time
- 17 min
When you finish this page you can
- Work out the training memory per GPU for data parallel training and for ZeRO stages 1, 2 and 3 from a model’s parameter count.
- Explain why sharding optimizer state and gradients costs no extra communication, and why sharding the parameters too costs about 50% more.
- Describe what FSDP does around each wrapped module in one training step, and what sets its peak memory.
- Choose how far to shard a model, and name what would change that choice.
Builds on 2 lessons
Start with lesson 217 minVideo lesson · coming soon
Forty GPUs and still out of memory
Our biggest sale ever · Black Friday
Flat 50% Off
Pro
Continue reading
Unlock every course, now and later
- System Design, live
- AI Engineering, live
- Data Engineering, live
- Machine Learning Engineering, live
- Inference Engineering, coming soon
- AI Research, coming soon
- Performance Engineering, coming soon
- Agent & Harness Engineering, coming soon
- LLM Fine-tuning, coming soon
- LLM Pre-training & Post-training, coming soon
- Reinforcement Learning, coming soon
- AI Infrastructure & Platform Engineering, coming soon
- AI Evaluation & Safety, coming soon
- Forward Deployed Engineering, coming soon
- Cloud Computing, coming soon
- DevOps, coming soon
50% off · Annual and Lifetime
BLACKFRIDAY50Applied at checkout
View all plansAlready Pro? Sign in