Match TTFT and TPOT to the latency they measure during streaming
Same topic, related formats. Practice these next.
Same topic, related formats. Practice these next.
TTFT is wall-clock to the first content token (dominated by prefill); TPOT is the inter-token gap during streaming (dominated by decode). Total latency is TTFT + N * TPOT.
Imagine ordering a coffee. TTFT is how long you wait from the moment you order until the first drop hits the cup. TPOT is how steadily the rest of the coffee streams in after that. Two cafes might both deliver a full cup in thirty seconds, but the one with a five-second TTFT feels much faster than the one that takes twenty-five seconds to start pouring. LLM serving is the same: users do not care about total time as much as how quickly something starts arriving and how smoothly the rest follows.
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: TTFT = first content token, dominated by prefill + TPOT = per-token gap, dominated by decode + total = TTFT + N * TPOT + different optimizations for each + measurement pitfalls.
| Metric | What it measures | Bound by | Scales with |
|---|---|---|---|
| TTFT | Request to first content token | Prefill compute, HBM bandwidth for KV write | Prompt length |
| TPOT | Inter-token gap during streaming | HBM bandwidth for weights and KV reads | Roughly flat per token, slight growth with context |
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.
Treating TTFT and TPOT as the same metric, or measuring them at the wrong event. TTFT ends at the first content delta, not the first SSE event.
The night-before-the-interview bullets. Scan these on the way to the call.
Primary sources. Skim if you want the original framing.