TTFT is the user-perceived latency floor for interactive surfaces, dominated by prefill; tokens per second is the wall-clock metric for non-interactive workloads, dominated by decode batching.
Picture two diners at the same restaurant. One is hungry and just wants the bread to land at the table so they know food is coming. They will happily wait for the rest as long as something arrives quickly. The other is at a takeout window placing a big catering order; they do not care when the first dish is ready, only when the whole order is bagged and they can leave. The hungry diner cares about how fast the bread shows up (time to first token); the takeout customer cares about total prep time (tokens per second over the whole order). The kitchen configures itself differently for each: small fast batches for the bread crowd, large efficient batches for the takeout.
Concept explanation~2 min read
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
Concept explanation~2 min read
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
LLM serving SLOs split along two metrics that look similar at first glance but measure different parts of the request lifecycle and respond to different optimizations. Confusing them leads to serving configurations that fail one SLO while optimizing the other, often without the operator realizing why. The TTFT versus TPS distinction is foundational for any production LLM serving decision in 2026.
This card walks through what each metric measures, what dominates it, how the serving-runtime configuration affects the trade-off, and why mature deployments often run separate fleets for interactive and batch workloads.
TTFT: the prefill-dominated metric
Time to first token measures the gap from request submission to the first emitted output token. The components are queue wait, prefill (forward pass over the full input prompt to populate the KV cache), and scheduling overhead.
For typical interactive inputs (1k-4k tokens including system prompt) prefill is a meaningful fraction of total request latency, often the dominant component. Larger inputs (8k+ tokens in long-context RAG or agent loops) make prefill the overwhelming TTFT cost.
The user-perception story. In an interactive surface, the user is staring at the screen between submitting and seeing the first character. That gap is the perceived latency of the system, regardless of how fast tokens stream after. A 2-second TTFT followed by 50 tok/s streaming feels slow; a 300 ms TTFT followed by 20 tok/s streaming feels snappy. Streaming hides total generation time from the user; it cannot hide TTFT.
Optimizations that help TTFT. Chunked prefill interleaves prefill and decode work so a new request can start streaming its first tokens before its full prefill has finished, lowering effective TTFT under concurrency. Prefix caching (RadixAttention-style sharing of KV across requests with shared prefixes) eliminates redundant prefill on the shared portion, which is huge for agent workloads with long system prompts. Smaller batch sizes reduce queue wait. Faster prefill kernels (FlashAttention v3) cut the raw prefill compute time.
Situations where this technique stops working.
2–4 min · Everything important, quickly.
Real products, models, and research that use this idea.
- ChatGPT's interactive surface runs serving configurations tuned for sub-500 ms TTFT, with chunked prefill and prefix caching to absorb long system prompts.
- Anthropic's batch API trades TTFT for half-price token costs, optimized for throughput-per-GPU on workloads where latency does not matter.
What an interviewer would ask next. Try answering before peeking at the approach.
QHow would you choose batch size for an interactive fleet?
Red flags & common mistakes
The phrases that signal junior thinking. Click to expand.
Red flags & common mistakes
The phrases that signal junior thinking. Click to expand.
Tuning one fleet for both SLOs. Large continuous batches help throughput but hurt TTFT; the production answer is usually two fleets with different configurations when both workloads are heavy.
60 second bullets to scan on the way to the call.
Primary sources. Browse if you want the original framing.
Same topic, related formats. Practice these next.