How does Sarathi-Serve's chunked prefill change the latency profile of a serving system?
Same topic, related formats. Practice these next.
Same topic, related formats. Practice these next.
Explain Sarathi-Serve's chunked prefill: what it does, what it solves on a co-located prefill/decode system, and what it costs.
Chunked prefill slices a long prompt into fixed-size pieces and interleaves them with running decodes in one batch, so decode never stalls; the cost is slightly higher TTFT for the chunked prompt.
Imagine a kitchen with one chef and one stove. A huge banquet order (a long prompt) arrives. If the chef cooks the whole banquet in one uninterrupted block, every other diner waiting for one more bite of their meal sits hungry for minutes. Chunked prefill tells the chef to cook the banquet in small batches, and between each batch, plate one more bite for every waiting diner. The banquet finishes a touch later overall, because it was sliced up. But nobody else ever waits a long, unpredictable time for their next bite. The stove stays busy the whole time, and everyone gets steady, predictable service instead of one person hogging the kitchen.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example.
Everything important, quickly.
3 min: prefill stalls decode on a shared pool, chunk the prefill, piggyback decodes into a hybrid batch, stall-free decode, the TTFT versus TPOT trade, and chunking versus disaggregation.
Real products, models, and research that use this idea.
What an interviewer would ask next. Try answering before peeking at the approach.
Red flags and common mistakes that signal junior thinking. Click to expand.
Saying chunked prefill speeds up the prefill itself. It does not. It slices prefill so decode is not starved, trading a little extra TTFT for far steadier per-token latency.
The night-before-the-interview bullets. Scan these on the way to the call.
Primary sources. Skim if you want the original framing.