internalsGet Pro

Module 17 · Lesson 10 of 11Pro

Case: Meta’s ads model trained on thousands of GPUs

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

When you finish this page you can

  1. Explain why Meta split GEM’s dense layers with hybrid sharding and its embedding tables two ways, and estimate what hybrid sharding saves on the network.
  2. Read the reported gains (16x GPUs, 23x effective FLOPs, 1.43x MFU) as ratios to an unstated baseline, and check that they agree with each other.
  3. Describe how one large teacher model passes its knowledge to hundreds of smaller production models, and why that pays only when there are many students.
  4. Decide which of Meta’s choices a 40-GPU team like Kartly’s should copy, and which only pay at thousands of GPUs.
  1. Generative recommenders: semantic IDs and sequences18 min
  2. Model, pipeline and expert parallel training18 min
  3. Sharded training: ZeRO and FSDP17 min
  4. Communication costs in distributed training18 min

Video lesson · coming soon

Sixteen times the GPUs, twenty-three times the work

is the online store this course uses as its example: 5 million customers a day, 20 million products. Every night Farah, an ML engineer, retrains the sequence model that picks products for each customer’s home page. In the Module 17 scenario, the job runs on 40 H100 , 5 machines of 8, in about 4.8 hours. At an assumed $3.00 per GPU-hour, that is about $576 a night.

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