Spot the errors in this 'optimize decode by reducing FLOPs' proposal
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.
Single-batch decode is HBM-bandwidth-bound, not compute-bound, so cutting FLOPs by pruning or sparse heads barely helps; the real levers are quantization, KV compression, and batching.
Imagine a chef who can chop ingredients incredibly fast but works in a kitchen with one narrow doorway. Every dish needs ingredients carried in through that doorway. The chef's knife speed is not the bottleneck, the doorway is. If you make the chef chop 30 percent faster, dinner does not come out 30 percent sooner, because they still wait at the door. Decode is like this. The GPU's math units are the fast knife. The memory bus that carries the model weights and the cache into the chip is the narrow doorway. A sharper knife does not widen the doorway. To speed things up you either carry smaller ingredients each trip or cook many dinners per trip through the door.
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 decode as bandwidth-bound, sketch the roofline, do the 70B-on-H100 byte math, then list the real levers (quantize, batch, KV compress) and explain why pruning and sparse heads fail.
| Optimization | Cuts FLOPs? | Cuts bytes read? | Helps batch-1 decode? |
|---|---|---|---|
| Magnitude pruning (dense store) | Yes | No | Barely |
| Sparse attention heads | Yes | No | No |
| Quantization (fp8, int4) | Some | Yes | Yes |
| Batching | No | Amortizes | Yes (throughput) |
| KV compression (GQA, MLA) | Some | Yes | Yes |
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.
Treating decode as compute-bound and chasing FLOP reductions. At batch 1 the GPU streams every weight from HBM per token, so latency tracks bytes moved, not arithmetic performed.
The night-before-the-interview bullets. Scan these on the way to the call.
Primary sources. Skim if you want the original framing.