Skip to content
Learn with AlakhSharma

C29

Distributed Training

8 lessons4 hoursPlannedFree

Outcome

Train models that don’t fit on one GPU, choose a parallelism strategy, and measure scaling efficiency.

Prerequisites

Lessons

  1. L01Memory math: parameters, gradients, optimizer states, activations · coming soonExercise: Estimate GPU memory to train a 7B model with Adam in mixed precision.
  2. L02Collective communication: all-reduce, all-gather, reduce-scatter · coming soonExercise: Simulate ring all-reduce and compute its communication cost.
  3. L03Data parallelism with PyTorch DDP · coming soonExercise: Train with DDP on two processes and verify the weights stay identical.
  4. L04Sharding with ZeRO and FSDP · coming soonExercise: Compare per-GPU memory for DDP vs. FSDP on the same model.
  5. L05Tensor and pipeline parallelism · coming soonExercise: Split an MLP across two devices column-wise and row-wise and check outputs match.
  6. L06Activation checkpointing and gradient accumulation · coming soonExercise: Trade compute for memory and measure both.
  7. L07Checkpointing, fault tolerance, and elastic training · coming soonExercise: Kill a worker mid-run and resume from the last checkpoint.
  8. L08Measuring scaling efficiency and MFU · coming soonExercise: Compute MFU and scaling efficiency from a multi-GPU run.