5400: Distributed Training¶
Module Overview¶
This module covers distributed training techniques for scaling model training across multiple GPUs and nodes.
Why Distributed Training Matters¶
- Scale: Train models that don't fit on one GPU
- Speed: Parallelize computation for faster training
- Large batches: Enable larger batch sizes for better convergence
- Resource utilization: Make full use of available hardware
Learning Path¶
- 5401: Data Parallelism - DP, DDP, FSDP
- 5402: Model Parallelism - Pipeline, tensor parallel
- 5403: Mixed Precision Training - FP16, BF16, automatic mixed precision
- 5404: Distributed Optimization - Gradient synchronization, all-reduce
- 5405: FSDP2 and torchao - Per-parameter sharding, float8/QAT quantized training
- 5406: Distributed LR Scaling - The linear rule, the stability wall, warmup sizing, the critical batch size
Prerequisites¶
Before starting this module, ensure you understand:
- PyTorch basics (from 2200: Frameworks)
- Training loops (from 2400: Pretraining)
- Gradient descent (from 2100: Calculus)
See PREREQUISITES.md for details.
Key Takeaways¶
After this module, you will be able to:
- ✅ Implement data parallel training with DDP
- ✅ Use FSDP for sharding large models
- ✅ Apply model parallelism techniques
- ✅ Use mixed precision training
- ✅ Optimize distributed training performance
- ✅ Shard models with FSDP2's fully_shard and train through torchao quantization
- ✅ Scale the learning rate with world size under the linear rule, the wall, and a correctly sized warmup
Module Duration: 21 hours
Difficulty: ⭐⭐⭐ Advanced
Assessment¶
- Location: 5400: Distributed Training - Practice
- Location: 5400: Distributed Training - Quiz