Training frontier Artificial Intelligence models with tens or hundreds of billions of parameters (Llama, GPT, Gemini) is fundamentally a massive distributed systems problem. A 70-billion parameter model cannot fit into the memory of a single high-end accelerator: storing model parameters, gradients, and Adam optimizer states in mixed precision requires over 1.1 terabytes of high-bandwidth memory (HBM)—far exceeding the 80 GB or 144 GB capacity of an NVIDIA H100 or B200 GPU.

To train these models within realistic timelines, engineering teams distribute computation and state across clusters of thousands of GPUs linked by high-speed interconnects (NVLink, InfiniBand). This module deconstructs the distributed architecture of AI training: memory budgeting, parallelization strategies (DDP, Tensor Parallelism, Pipeline Parallelism), memory optimization frameworks (ZeRO, FSDP), collective communication primitives (Ring All-Reduce, All-Gather), and fault-tolerant checkpointing.

What you will learn

  • Calculate memory footprints of weights, gradients, and optimizer states across FP32, FP16, and BF16 precision formats
  • Deconstruct 3D Parallelism: Data Parallelism (DDP), Tensor Parallelism (Megatron-LM), and Pipeline Parallelism
  • Prove communication and memory bounds of ZeRO stages (ZeRO-1, ZeRO-2, ZeRO-3 / Fully Sharded Data Parallel)
  • Derive Ring All-Reduce network bandwidth utilization and explain intra-node NVLink vs inter-node InfiniBand bottlenecks
  • Diagnose training loss spikes, gradient overflow, GPU stragglers, and checkpoint recovery overhead
STAGE TOPICS

Topics in this chapter