01Prefill and decode are different
Prefill processes the prompt in parallel and creates KV state; it drives time to first token and grows with input length. Decode generates sequentially and drives inter-token latency and total completion time.
A request first waits for admission and scheduling. Prefill then processes the input and constructs state used for generation. Decode repeatedly computes the next token, selects it, and extends the sequence. Time to first token includes queueing, prefill, and first-token work; inter-token latency describes subsequent delivery. Time to complete also depends strongly on how many output tokens are generated.
A large prompt can have slow TTFT even with a short answer. A short prompt with a long answer can start quickly yet occupy a slot for a long time. Benchmark both shapes and their mix. If you report only total tokens/s, you cannot tell whether a throughput improvement preserved the interactive latency contract or simply admitted more concurrent work.
- Large prompts compete for memory and prefill capacity
- Long outputs occupy decode slots
- Track latency by stage and token count