What does W8A8 vs W4A16 mean and which regime is appropriate for memory-bound decode?
Same topic, related formats. Practice these next.
Same topic, related formats. Practice these next.
Define W8A8 and W4A16 quantization regimes. Explain which one is appropriate for memory-bandwidth-bound LLM decode and why, and which fits compute-bound prefill at large batch.
W8A8 runs INT8 weights and activations on INT8 tensor cores for compute-bound prefill throughput; W4A16 shrinks the weight read 4x for memory-bound decode latency.
Imagine a chef cooking from a giant recipe book. Two things slow them down: running to a far-off shelf to fetch recipe pages, and the actual chopping and stirring. When the kitchen is quiet and one dish is cooking, the slow part is the trip to the shelf for each page. Make the book tiny and those trips get fast. That is W4A16: shrink the recipe (the weights) so fetching is cheap. When the kitchen is slammed with a hundred dishes at once, the shelf trips get shared across dishes, and now the chopping is the bottleneck. So you hire faster hands instead. That is W8A8: keep both ingredients and recipe lean so a faster cooking station can run flat out. The whole trick is matching the fix to whichever cost actually dominates.
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: decode the WxAy notation, classify decode versus prefill on the roofline, map W4A16 to bandwidth and W8A8 to compute, name SmoothQuant and AWQ, then close on routing by batch size.
| Property | W8A8 | W4A16 |
|---|---|---|
| Weight precision | INT8 (1 byte) | INT4 (0.5 byte) |
| Activation precision | INT8 | FP16 |
| Matmul execution | INT8 tensor cores | FP16 after dequant |
| Compute throughput | ~2x FP16 | Same as FP16 |
| Weight bytes read | 2x smaller | 4x smaller |
| Canonical method | SmoothQuant | AWQ or GPTQ |
| Best-fit phase | Compute-bound prefill, large batch | Bandwidth-bound decode |
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 quantization as one knob for speed. The two schemes attack different bottlenecks: W4A16 cuts the HBM weight read for decode, W8A8 feeds INT8 tensor cores for compute-bound prefill.
The night-before-the-interview bullets. Scan these on the way to the call.
Primary sources. Skim if you want the original framing.