ELLMEngineering Large
Language Models
Download PDF

Part introduction

Part V - Distributed ML Systems

The single-device memory ledger eventually reaches a limit. Our illustrative training policy needs 112 GB for weights, gradients, and optimizer arrays before activations; an inference service can also exhaust one device through weights or concurrent request state. Dividing those allocations across devices creates a new cost: values must move between the devices that own them.

This part follows that exchange. Communication models explain the transfer cost. Data, tensor, context, pipeline, and expert parallelism place different computations and state on different workers. The later chapters combine these choices into serving and training plans, then examine what must be saved and restored when a worker fails. Part IV's kernels still execute the local work; the distributed schedule determines when their inputs arrive and which results other workers need.

Chapters in this part

  1. 38Communication Models, Collectives, and Topology
  2. 39Data Parallelism, ZeRO, and Fully Sharded Training
  3. 40Tensor, Sequence, and Context Parallelism
  4. 41Pipeline Parallelism and Hybrid Plans
  5. 42Mixture-of-Experts and Sparse Communication
  6. 43Distributed Inference and Stateful Placement
  7. 44Distributed Reinforcement Learning and Policy Freshness
  8. 45Distributed Checkpoints, Recovery, and Elasticity
  9. 46Cluster Scheduling, Observability, and Distributed Diagnosis