Name the dominant cost driver of GPT-5.5 latency at a 200k-token input
A team is benchmarking GPT-5.5 at 200,000 input tokens and 500 output tokens. End-to-end latency is dominated not by the 500 output tokens but by the prompt itself, with TTFT in the multi-second range and decode steps that get measurably slower than at a 2k-token context. Identify the two distinct cost drivers and explain why one shows up in TTFT and the other in per-token decode time.
At 200k input the bill is paid by prefill compute (which sets TTFT) and by the resulting KV cache size (which slows every decode step). Output tokens are a rounding error on this profile.
Imagine you walk into a library and hand the librarian a 200-page document and ask for a one-paragraph summary. Before the librarian can write a single word, they have to read all 200 pages. That reading time is what you wait for at the very beginning, even though no answer has appeared yet. Now while they write the paragraph, every sentence has to be checked against what they remember from the 200 pages, which is a huge stack of notes. So each sentence comes out a bit slower than if the document had been 2 pages. The summary itself is short and cheap; what is expensive is the original reading and the constant flipping through notes.
Detailed answer & concept explanation~7 min readEverything 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. 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.
4 min: name both phases (prefill drives TTFT, KV-amplified decode drives TPOT), quantify both for a 70B model at 200k, explain why output cost is small here, and rank the mitigation stack (prompt caching first, then KV quant).
| Latency component | Dominant driver at 200k | What surfaces it | Top mitigation |
|---|---|---|---|
| TTFT (prefill) | Per-token MLP + attention compute over 200k positions | Multi-second wait before first token | Prompt caching of stable prefix |
| TPOT (decode) | Per-step weight + KV bytes loaded from HBM | Each decode step ~45% slower than at 2k | FP8 KV cache, GQA/MLA, TP |
| Output token cost | Small share of bill at 200k:500 ratio | Routine decode latency for 500 tokens | Speculative decoding (weak lever here) |
| Dollar bill | Input tokens (volume) + KV-amplified decode time | Input share dominates total spend | Prompt caching (cuts input cost by ~90%) |
Real products, models, and research that use this idea.
- Anthropic Claude Opus 4.7 at 200k context shows TTFT in the 5-15 second range and per-token decode about 40-60 percent slower than at 4k; the same prompt with cache hit returns the first token in under a second.
- GPT-5.5 long-context benchmarks at 200k routinely report 80-95 percent of cost going to prefill input tokens, even though output is billed at higher per-token rate, simply because there are 400x more input tokens.
- NVIDIA's TensorRT-LLM ships FP8 KV cache as a switch; teams that flip it on for long-context workloads see decode TPOT drop 30-50 percent at 100k+ contexts with imperceptible quality impact.
- Mooncake disaggregates prefill and decode pools for Kimi's long-context serving, with the prefill pool sized for compute throughput and the decode pool sized for KV-cache HBM capacity, the two profiles being so different they justify separate hardware tiers.
- DeepSeek V4 with Multi-head Latent Attention compresses KV to a low-rank latent, dropping the per-token KV bytes by roughly 90 percent versus standard MHA, which is what makes its 128k context serve at competitive per-token decode latency.
What an interviewer would ask next. Try answering before peeking at the approach.
QHow does FlashAttention change the prefill cost at 200k?
QIf you had to pick one optimization for this exact workload, what would it be and why?
Don't say thisRed flags and common mistakes that signal junior thinking. Click to expand.
Red flags and common mistakes that signal junior thinking. Click to expand.
Thinking the output token count drives long-context latency. At 200k input and 500 output, the prompt processing and the KV-amplified decode dominate; the 500 output tokens contribute single-digit percent of wall-clock and bill.
The night-before-the-interview bullets. Scan these on the way to the call.
Primary sources. Skim if you want the original framing.
Same topic, related formats. Practice these next.