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
ML system design: framing, budgets, two-stage retrieval, serving, rollout and monitoringCompleted
Read first: Evaluation, leakage and imbalance: validation design, metrics, thresholds and rare classes, Statistics and experimentation: intervals, tests, power, A/B tests and fair model comparison, Data, features and production ML: preprocessing, encodings, point-in-time features, skew, drift and operations
Training at scale: memory arithmetic, parallelism, mixed precision and scaling lawsCompleted
Read first: Training deep networks: normalisation, regularisation, AdamW and debugging, Transformers, large language models, sampling and fine-tuning, ML system design: framing, budgets, two-stage retrieval, serving, rollout and monitoring
The ML interview playbook: structure, answer method, debugging procedures, estimates and project defenceCompleted
Read first: The learning problem: generalization, bias-variance and regularization, Training deep networks: normalisation, regularisation, AdamW and debugging, Evaluation, leakage and imbalance: validation design, metrics, thresholds and rare classes, Statistics and experimentation: intervals, tests, power, A/B tests and fair model comparison, Data, features and production ML: preprocessing, encodings, point-in-time features, skew, drift and operations, ML system design: framing, budgets, two-stage retrieval, serving, rollout and monitoring