End-to-end latency: fill in the queue, prefill and decode components.
Same topic, related formats. Practice these next.
Same topic, related formats. Practice these next.
End-to-end latency decomposes into queue_time + TTFT + (N_out - 1) * TPOT, where TTFT is compute-bound prefill and TPOT is bandwidth-bound decode.
Picture sending a package through a busy mailroom. First it sits in line behind other packages: that is queue time. Then a clerk has to read the whole address (the entire prompt) before anything can move: that is TTFT, paid once. After that, the clerk hand-writes one stamp at a time onto the box, again and again, until it is fully labeled. Each stamp is the same small wait, but you pay it once per stamp. If the package needs hundreds of stamps, that second pile of waits ends up much bigger than the one-time address-reading. End-to-end latency is the sum of all three pieces.
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: three-term decomposition + prefill compute-bound vs decode bandwidth-bound + decode dominates for N_out > 50 + production levers for each term + why TTFT and TPOT need separate SLOs.
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.
Lumping TTFT and per-token decode into one latency number. They move on different axes and need separate SLOs because prefill is compute-bound while decode is bandwidth-bound.
The night-before-the-interview bullets. Scan these on the way to the call.
Primary sources. Skim if you want the original framing.