Module 5 of 5

ML systems and interviews

  • Production
  • 3 lessons
  • 5 h 10 min

What you will be able to do

  • Frame an ML system design from a business goal, a metric and constraints, and size it with back-of-envelope capacity arithmetic and percentile latency budgets whose assumptions you state.
  • Design a retrieve, rank and re-rank system and measure each stage with recall@k and NDCG@k, serve it with caching, batching, quantisation or distillation, roll it out through shadow, canary and A/B, and monitor it for drift, feedback loops and fallbacks.
  • Account for training memory at 16 bytes per parameter for mixed-precision Adam, decide whether a model fits on one device, and choose between DDP, ZeRO or FSDP sharding, and tensor and pipeline parallelism, using their memory, communication and pipeline-bubble costs.
  • Scale batch size and learning rate with the linear rule and warmup, use gradient accumulation without changing the gradient (including token-level losses), and train in mixed precision with loss scaling and master weights.
  • Estimate training compute with about 6ND and turn it into days, say what compute-optimal training implies for model and data size, and plan activation checkpointing, checkpoints and reproducibility for a long run.
  • Answer an open ML question with the ten-step method, debug a model symptom in a sensible order, check a claim with a base rate, a baseline, a shuffled-label check and an interval, and defend a past project with measured numbers.

Lessons