internalsGet Pro

Module 17 · Lesson 3 of 11Pro

Model, pipeline and expert parallel training

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

When you finish this page you can

  1. Split a recommender’s embedding table by rows across GPUs, and trace the all-to-all exchanges one training step needs.
  2. Explain how tensor parallelism cuts a layer’s weights, and check in PyTorch that the split gives the same output and gradients.
  3. Compute the pipeline bubble from the number of stages and microbatches, and pick enough microbatches to keep it small.
  4. Choose a split for each part of a model: rows for tables, tensor inside a server, pipeline across servers, experts for mixture-of-experts layers.

Builds on 3 lessons

Start with lesson 217 min
  1. Data parallel training: same model, many GPUs17 min
  2. Generative recommenders: semantic IDs and sequences18 min
  3. The transformer, layer by layer18 min

Video lesson · coming soon

Every GPU keeps a full copy of the catalogue

is an online store with 20 million products and 5 million customers a day. Its home page recommends products to each customer, and the model behind it is retrained every night. The retrain must finish inside a 6-hour overnight window.

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