Batching, decoding and serving caches
hard 7 minServing combines admission control, prefill, autoregressive decoding and memory management.
Trace the example
Follow the evidence through each stage, then test a change in the case.
A second request arrives while the first is decoding
Request queue
A needs 3 steps · B needs 1
The scheduler can admit and retire requests at different times. Prefill builds a prefix cache while decode extends each active sequence.