internalsGet Pro

Module 17 · Lesson 5 of 11Pro

Communication costs in distributed training

Level
Advanced
Topic
Distributed training and scalable ML systems
Reading time
18 min

When you finish this page you can

  1. Estimate how long a gradient all-reduce takes from its start-up cost, its bytes and the bandwidth of the slowest link.
  2. Explain why a hierarchical all-reduce sends only one eighth of the gradient over the network, and when that matters.
  3. Work out whether the all-reduce hides behind the backward pass, and how much of it sticks out.
  4. Choose between bigger buckets, 16-bit gradients, gradient accumulation and compression, and name what each one costs.

Builds on 3 lessons

Start with lesson 217 min
  1. Data parallel training: same model, many GPUs17 min
  2. Sharded training: ZeRO and FSDP17 min
  3. Checkpoints, mixed precision and gradient accumulation17 min

Video lesson · coming soon

Twice the GPUs for twice the data

is an online store with 5 million customers a day and 20 million products. A sequence model picks the products each customer sees on the home page, and Farah, an ML engineer, retrains it every night. Today it learns from one year of events on 40 GPUs, 5 machines of 8, in about 4.8 hours. The overnight window is 6 hours.

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

Choose a plan