Spot the errors in this 'API is slow because of network and tokenizer' explanation
Same topic, related formats. Practice these next.
Same topic, related formats. Practice these next.
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.
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.
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.
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.