You already know: LLM serving (prefill and decode, batching, the KV cache) and prefix caching. This case adds speculative decoding. During decode, a large model generates one token per step, and each step reads all of its weights from GPU memory. At small batch sizes, the GPU spends most of each step waiting for memory, not computing. Speculative decoding uses that idle compute: a cheap draft proposes several tokens, and the large target model checks all of them in one step. The design questions: where drafts come from, how verification guarantees identical output, when speculation helps and when it hurts, and how to keep the draft aligned with the target.
How to read this lesson. No code, on purpose. Numbers marked assumed are assumptions you state out loud.
1. The prompt, and the questions that change the design
A mid-level answer: "add a small draft model; it's about twice as fast". A staff candidate asks why it can be faster (decode is limited by memory bandwidth, so compute is spare), when that stops being true (at large batch sizes the compute is no longer spare), and what "without changing outputs" means precisely (the same output distribution as the target alone, guaranteed by the acceptance rule, and checked by parity tests).
Assumptions you state: