Inference, Serving & Production·Question 3 of 76BasicAI-75

Define TTFT, TPOT, and tokens/sec. What drives each one, and what are reasonable targets for a chat product?

Type it the way you would explain it to an interviewer. A few sentences is enough; you can't break anything.

Model answer: the part to lead with

  • TTFT (time to first token): request arrival → first generated token. Driven by queue wait + prefill time, so it scales with prompt length and system load. This is the "is it responsive?" metric.
  • TPOT (time per output token), a.k.a. inter-token latency (ITL): average gap between subsequent tokens during decode. Driven by memory bandwidth, model size, batch contention, and interference from other requests' prefills. This is the "does the stream feel smooth?" metric.
  • Tokens/sec comes in two flavours people conflate: per-request decode speed (≈ 1/TPOT) and aggregate system throughput (all tokens across all requests - the capacity/cost number). A system can have great aggregate throughput and terrible per-request speed simultaneously.
Full worked answer with diagram
  • TTFT (time to first token): request arrival → first generated token. Driven by queue wait + prefill time, so it scales with prompt length and system load. This is the "is it responsive?" metric.
  • TPOT (time per output token), a.k.a. inter-token latency (ITL): average gap between subsequent tokens during decode. Driven by memory bandwidth, model size, batch contention, and interference from other requests' prefills. This is the "does the stream feel smooth?" metric.
  • Tokens/sec comes in two flavours people conflate: per-request decode speed (≈ 1/TPOT) and aggregate system throughput (all tokens across all requests - the capacity/cost number). A system can have great aggregate throughput and terrible per-request speed simultaneously.

Total request latency ≈ TTFT + TPOT × output_tokens. That formula is worth internalising: for a 500-token answer, shaving TPOT from 50 ms to 30 ms saves 10 s - far more than any TTFT optimisation - while for a 20-token classification, TTFT dominates.

Reasonable chat targets (order-of-magnitude, product-dependent): P50 TTFT a few hundred ms, P99 under ~1-2 s; streaming rate comfortably above reading speed - people read at roughly 5 words/s, so ~15-30+ tokens/s per request feels fluid, and 50+ feels instant. Autocomplete-style features are different: tiny outputs, total-latency budget of a few hundred ms. Long agentic workflows care more about aggregate completion time and cost than ITL.

Always report percentiles (P50/P95/P99) per metric, segmented by prompt-length bucket - averages hide exactly the failures users notice.

Worth sketching. A latency waterfall shows which term each metric owns, which stops the conversation drifting into "latency" as one blurred number.

flowchart LR
    A["Request arrives"] --> Q["Queue wait"]
    Q --> P["Prefill, scales with prompt length"]
    P --> F["First token: TTFT"]
    F --> D["Decode steps"]
    D -->|"gap between tokens = TPOT"| D
    D --> L["Total = TTFT + TPOT x output tokens"]

What a good answer covers

  • TTFT (time to first token): request arrival → first generated token
  • TPOT (time per output token), a.k.a
  • Tokens/sec comes in two flavours people conflate
  • Total request latency ≈ TTFT + TPOT × output_tokens
  • That formula is worth internalising

Key terms: TTFT (time to first token) · TPOT (time per output token) · Tokens/sec

Interviewer follow-ups to expect

  1. Your P99 TTFT doubled but P50 is flat - what are your top hypotheses?

  2. Which metric does speculative decoding improve, and which can it hurt?

Worked answer from AI-Engineer-Interview-Questions by Om (MIT), reformatted for LLM Prep · answer text last updated 6 November 2026 · scoring and review schedule by LLM Prep