AI & ML

Production AI Systems

Part of Systems, level 8. About 20 hours of study across the topics below.

Create free account

Training vs ServingLatency and ThroughputMemory and Model SizeQuantizationCaching and ReuseCompute, Memory, and Cost AccountingAccelerators and the Memory HierarchyDistributed Training and ParallelismMixed-Precision TrainingDistillationInference at ScaleData Pipelines, Feature Stores, and Training-Serving SkewTesting Machine Learning SystemsMonitoring and DriftDeployment PatternsRetraining and Continual Learning in ProductionEvaluation LoopsExperiment Tracking and ReproducibilityKV Caching and Batched LLM ServingSpeculative Decoding

1Regimes

  1. Training vs ServingTwo regimes, flipped constraints: throughput-hungry training vs latency-bound serving. 1–2 h
  2. Latency and ThroughputFast answers vs many answers: batching trades one for the other. 1–2 h
  3. Memory and Model SizeParameters, optimizer state, activations, and precision: where training and serving memory goes. 1–2 h

2Efficiency

  1. QuantizationFewer bits per weight: rounding models smaller with measured quality cost. 1–2 h
  2. Caching and ReuseNever compute twice: the KV cache, shared prompt prefixes, and result reuse at inference. 1–2 h
  3. Compute, Memory, and Cost AccountingCounting FLOPs, parameters, activations, and optimiser state to estimate training and inference cost. 1–2 h
  4. Accelerators and the Memory HierarchyWhy GPUs are fast and when they are not: compute-bound versus memory-bound operations and arithmetic intensity. 1–2 h
  5. Distributed Training and ParallelismData, tensor, pipeline, and sharded parallelism, and the communication each requires. 1–2 h
  6. Mixed-Precision TrainingTraining in 16-bit or lower floating point with loss scaling to prevent underflow. 1–2 h
  7. DistillationTeacher to student: soft targets transfer what hard labels cannot. 1–2 h
  8. Inference at ScaleServing under load: batching, bottlenecks, and reading a serving story. 1–2 h

3Operations

  1. Data Pipelines, Feature Stores, and Training-Serving SkewKeeping features computed identically in training and serving, and what breaks when they drift apart. 1–2 h
  2. Testing Machine Learning SystemsUnit tests for data and code, behavioural tests for models, and the readiness rubric for production. 1–2 h
  3. Monitoring and DriftInputs drift, performance decays: signals, alerts, and honest decay reading. 1–2 h
  4. Deployment PatternsBatch versus online prediction, shadow deployments, canaries, and rollbacks. 1–2 h
  5. Retraining and Continual Learning in ProductionWhen and how to update deployed models as data drifts, without forgetting or breaking downstream consumers. 1–2 h
  6. Evaluation LoopsShadow, A/B, rollback: continuous eval as the deployment safety net. 1–2 h
  7. Experiment Tracking and ReproducibilityVersioning code, data, configs, and seeds so a result can be reproduced and compared. 1–2 h

4Serving

  1. KV Caching and Batched LLM ServingReusing attention keys and values across decoding steps, and batching requests continuously to use hardware well. 1–2 h
  2. Speculative DecodingA small draft model proposes tokens that the large model verifies in parallel, preserving the output distribution. 1–2 h