4.3.13 · D5Pretraining & Fine-Tuning LLMs

Question bank — Quantization (INT8, INT4, GPTQ)

1,304 words6 min readBack to topic

True or false — justify

Quantization always loses information.
True. Rounding a continuous float onto a finite integer grid is a many-to-one map, so distinct floats collapse to the same integer — information is destroyed. The art is making the lost part the least important.
INT8 post-training quantization usually needs no retraining to stay accurate.
True. With 256 levels the step size is far smaller than typical weight magnitudes, so rounding noise is negligible (<1% quality loss) and plain PTQ works out of the box.
Halving the bit-width from INT8 to INT4 roughly doubles the output error.
False. Each dropped bit doubles the step , but the effect on model output is nonlinear and depends on which weights are hit — that is exactly why INT4 needs GPTQ compensation while INT8 does not.
Symmetric quantization forces the zero-point to 0.
True. Symmetric mode assumes the range is centred at 0 (), so real-value 0 already lands on integer 0 with no offset needed — that is what "" means.
GPTQ retrains the network with backpropagation at 4 bits.
False. GPTQ does no backprop over the net; it solves a closed-form layerwise least-squares using ~128 calibration samples. It is PTQ, not QAT.
Per-group quantization is strictly slower than per-tensor at inference.
Mostly false in practice — the extra scales are tiny and the arithmetic is still integer; the real cost is a slightly larger file and a per-group scale lookup, which memory-bandwidth-bound LLMs barely notice.
Weights and activations should use the same quantization scheme.
False. Weights are tame and near-symmetric (per-channel/per-group symmetric is fine); activations have huge per-channel outliers and need per-token schemes or outlier-preserving tricks.
A model that is 4× smaller in memory is exactly 4× faster.
False. Speedup comes because LLM inference is memory-bandwidth-bound, so moving 4× fewer bytes helps a lot — but compute, kernel overhead, and dequant steps mean the real speedup is under 4×.
The zero-point must itself be an integer.
True. If were fractional, the integer that real-value 0 maps to would not exist, and padding/ReLU zeros would dequantize to a nonzero value — so is rounded to a valid integer.

Spot the error

"I'll compute and store it — done."
You forgot to clamp to . An outlier produces a outside the integer range, causing overflow/garbage. Clamping is what makes the range finite.
"To quantize INT8 asymmetric I set ."
That is the symmetric formula. Asymmetric uses the full spread and a nonzero ; using wastes levels when the distribution is off-centre.
"One big outlier weight is fine — it only affects itself."
A single outlier inflates , stretching the scale so all other weights get a coarser grid. It wastes the integer levels on empty range — the motivation for per-group scales.
"GPTQ's Hessian is ."
It is ; the factor of 2 comes from differentiating the quadratic twice. The scaling matters for the correct per-weight update magnitude.
"GPTQ minimizes the weight error ."
No — it minimizes the output error . Preserving what the layer does matters more than matching individual weights, which is the whole reason it beats naive rounding.
"After quantizing one weight in GPTQ, I move on to the next untouched."
You skipped the correction step. Each snap produces an error that must be pushed into the remaining weights weighted by ; omitting this makes GPTQ collapse to naive rounding.

Why questions

Why is symmetric quantization the default for weights but not activations?
Trained weights cluster symmetrically around 0, so a symmetric range wastes nothing and skips the zero-point add; activations are skewed with wild outliers, so they need asymmetric/per-token handling.
Why does INT4 specifically demand methods like GPTQ or AWQ, while INT8 does not?
With only 16 levels the step is ~16× coarser than INT8, so independent rounding noise becomes large enough to shift layer outputs; GPTQ/AWQ compensate that noise instead of just tolerating it.
Why compute the Hessian from calibration inputs rather than from the loss?
The layerwise objective is a quadratic in the weight error, whose curvature is set entirely by the input correlations ; this gives a closed-form redistribution rule with no gradient training.
Why does quantization make inference faster and not just smaller?
LLM decoding is dominated by streaming weights from memory; fewer bytes per weight means less traffic across the memory bus, which is the actual bottleneck — see Inference Optimization & KV Cache.
Why round the zero-point but not necessarily every intermediate?
indexes an integer position on the grid, so it must be integer for real-0 to map exactly; the scale stays a float because it is a multiplier, applied at dequant time, not stored as a grid index.
Why do per-group scales add "0.5–1 bit" of overhead in real INT4 files?
Each group of ~128 weights carries its own float scale (and maybe zero-point); amortized over the group this is a small fraction of a bit per weight, which is why a real 7B INT4 file sits slightly above the naive 3.5 GB.

Edge cases

What scale do you get if a whole group of weights is exactly 0?
gives , which is undefined division at dequant. Implementations set a tiny floor (or skip the group), so all-zero blocks stay zero.
What happens to real-value 0 under symmetric quantization?
and — zero is represented exactly, which is why symmetric mode is safe for padding and post-ReLU zeros.
In signed INT4 the range is — is that symmetric?
Not perfectly: has no positive twin ( is out of range). Symmetric-weight schemes typically restrict to so and the grid stays balanced around 0.
If the calibration set has zero variance in some input dimension, what breaks in GPTQ?
That column of is zero, making singular and undefined; GPTQ adds a small dampening term (a scalar on the diagonal) so the inverse exists — see Hessian and Second-Order Methods.
What is the largest source of error when a single activation channel is 100× the others?
A per-tensor activation scale stretches to cover that outlier, quantizing every normal channel to almost one level. The fix is to keep outlier channels in higher precision or scale them away — the AWQ (Activation-aware Weight Quantization) idea.
How does QLoRA sidestep the INT4 accuracy loss without retraining full weights?
It keeps the base model frozen in 4-bit and trains only small high-precision LoRA adapters on top, so the coarse grid is compensated by learnable corrections — see LoRA and QLoRA.

Recall One-line self-test

Name the two things you must do after round(x/s) that beginners forget. Answer ::: (1) add the zero-point if asymmetric, and (2) clamp to .