All glossary terms

Efficiency

Quantization error

The accuracy a model gives up when weights or cache move to fewer bits. Calibrated scales and an eval-set re-run keep the loss measured instead of assumed.

Every quantization step trades memory for representable range. Storing weights in fewer bits means fewer distinct values each weight can take, so the model answers slightly differently than it did in full precision. Whether that difference matters is a question an eval set answers - a fixed list of prompts with known expected answers, re-run before and after the precision change - and the honest deployment treats the eval delta as part of the migration, not an afterthought.

The error is not spread evenly. A few sensitive layers or channels carry most of it, which is why calibrated methods that measure real activations and set per-channel scales often land close to full precision at 8 bits, while a naive per-tensor scale at 4 bits can move eval pass rates visibly. Attention internals are a known risk area for cache quantization for the same reason: attention scores come from small inner products, and narrowing the range of the elements feeding them shifts the scores.

The arithmetic is cheap and it frames the negotiation. Each halving of precision halves the weight bytes, which halves the memory bill and raises the memory-bound decode ceiling for the same card. The negotiation is in eval points: a step that buys a doubling of seats and concurrency at an unmeasured quality cost is a bet, and a step that buys it with a flat eval set is a decision. Production quantization is mostly the paperwork around that distinction.

A worked example

One 70B model on a 160 GB two-card node moves down the precision ladder, with the decode ceiling read from the 3.35 TB/s card at each step.

  1. fp16: 70B parameters x 2 bytes = 140 GB of weights, 160 - 140 = 20 GB left for the cache, and a decode ceiling of 3.35 TB/s / 140 GB = about 23.9 tok/s.
  2. fp8 with calibrated scales: 70 GB of weights, 90 GB left, and the ceiling doubles to 3.35 TB/s / 70 GB = about 47.9 tok/s - the memory bill halved.
  3. 4-bit: 35 GB of weights, 125 GB left, and the eval-set re-run is the step that decides whether this migration ships, because the memory savings are already certain.

Each precision step halves weights - 140, 70, 35 GB - and doubling decode ceilings along the way; the eval delta is the only part of the trade that is not arithmetic.

Where this shows up

Related terms