Module 14 of 15
Inference engineering
- Production
- 7 lessons
- 5 h 5 min
Chapter 14 · The Support Desk
The team will run the model on its own servers, and the queue is already long. Ananya asks one question before anything is started: how fast could this possibly go? You will predict the speed before anyone measures it, and see what each speed-up costs.
What you will be able to do
- Predict how fast and how cheaply a model can serve before measuring it, using FLOPs, bytes, the roofline and the KV-cache.
- Choose and sequence the levers (quantization, kernels, batching, scheduling, parallelism, engine) by the bottleneck each attacks and the price each adds.
- Plan capacity, benchmark honestly and operate an inference service, and defend a serving design in an interview with numbers.
Lessons
Request lifecycle, metrics and the rooflineCompleted
Read first: LLM inference and serving, How LLMs work
Memory and the KV-cacheCompleted
Read first: Request lifecycle, metrics and the roofline
Model and kernel optimizationCompleted
Read first: Memory and the KV-cache
Scheduling and decodingCompleted
Read first: Model and kernel optimization
Distributed serving, engines and hardwareCompleted
Read first: Scheduling and decoding
End of chapter 14 · The Support Desk
Latency the cat reached the far door a full minute after the reply did. Ananya wrote it down.