Spot the errors in this 'API is slow because of network and tokenizer' explanation
Click any words you think contain an error. Click again to unmark.
The latency is dominated by token-by-token decode, which is memory-bandwidth-bound at 50-150 tok/s per request. Network and tokenizer overhead are three orders of magnitude smaller.
Imagine ordering a 500-word letter to be written and mailed to you. Blaming the slowness on the mail truck (network) or the envelope-stuffing (tokenizer) misses the point. Those steps take seconds combined. The real cost is the writer, who can only pen one word at a time and pauses to reread their notes before each word. Five hundred words at a few words per second is several minutes of writing. The truck ride was always trivial by comparison. For an LLM, decode is that one-word-at-a-time writer, and it reads a huge cache from memory before every single token. That sequential, memory-bound writing is where almost all of the eight to twelve seconds actually goes.
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.
3 min: order of magnitude each cost (network ms, tokenizer microseconds, decode seconds) + why decode is bandwidth-bound + latency versus throughput + the tokens divided by tok/s estimate + real levers.
Real products, models, and research that use this idea.
- vLLM serving traces show per-request decode at 50-150 tok/s while aggregate batched throughput reaches thousands per second: exactly the conflation this question targets.
- Anthropic and OpenAI both stream tokens in their APIs precisely because per-token decode latency, not network, sets the user-perceived speed.
- DeepSeek V4 and Llama 4 ship speculative decoding and GQA to attack the sequential, bandwidth-bound decode cost rather than network overhead.
- NVIDIA TensorRT-LLM benchmarks report tokens-per-second-per-request separately from aggregate throughput on H100 and B200 to avoid this exact mistake.
- Groq markets its LPU hardware around raising single-stream decode tok/s, a direct acknowledgment that decode bandwidth, not network, is the bottleneck.
What an interviewer would ask next. Try answering before peeking at the approach.
QWhy is per-request decode capped near 50-150 tok/s while servers advertise thousands?
QIf decode is memory-bandwidth-bound, why does adding more compute not help?
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.
Blaming wall clock latency on network RTT or tokenizer overhead. Both are milliseconds or microseconds. The dominant cost is sequential decode at 50-150 tokens per second per request.
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.