IN THIS BREAKDOWN · 10 SECTIONS
You can read 22% of this breakdown.
The paper in one minute
The simplest way to compress a model's weights is to round each one to the nearest value on a 4- or 3-bit grid. For 8 bits, that works. For 4 and 3 bits on very large models, it does not: rounding OPT-175B to 4 bits made its perplexity worse than a full-precision model ten times smaller, and at 3 bits the model produced nonsense. Methods that rounded more carefully existed, but they were built for vision models of around 100 million parameters and would have taken far too long at 175 billion.
GPTQ makes careful rounding fast enough. It works one linear layer at a time, with a goal: after quantizing the layer's weights W, the layer's outputs on a small calibration set X should change as little as possible. That is a least-squares problem whose curvature is the matrix H = 2XXᵀ, computed from the calibration inputs. GPTQ rounds the weights one column at a time, in the same order for every row, and after each column it nudges all the not-yet-rounded weights to cancel the error that column introduced. Correlated inputs mean another weight can often absorb most of the damage.
Three engineering changes make it scale. A fixed column order lets every row share one inverse-Hessian computation. Updates are batched in blocks of 128 columns so the GPU is busy rather than waiting on memory. And the needed rows of the inverse Hessian are taken from a Cholesky decomposition, which stays numerically stable where repeated matrix updates did not.
The results: OPT-175B and BLOOM-176B quantized in about four GPU-hours with 128 sequences of generic web text. At 4 bits, perplexity barely moved; at 3 bits it rose a fraction of a point. The 3-bit OPT-175B fit in a single 80 GB A100, and custom kernels that read 3-bit weights and dequantize them on the fly made generation 3.24 times faster than fp16 spread over five GPUs.
Research notes: the problem, approach and results
to quantize OPT-175B on one NVIDIA A100 80GB (Table 2)
OPT-175B WikiText2 perplexity, fp16 to 4-bit GPTQ; round-to-nearest gave 10.54 (Table 3)
faster per-token generation for 3-bit OPT-175B on 1 A100 than fp16 on 5 (Table 6)
Rounding every weight to the nearest 4- or 3-bit level (RTN) works for small models but breaks large ones: OPT-175B at 4 bits lost 2.2 perplexity points and at 3 bits collapsed. Accurate post-training methods existed but took hours for 100M-parameter models and could not reach 175B.
Solve layer-wise reconstruction, minimizing the change in each layer's output on 128 calibration sequences, with a fast approximation of Optimal Brain Quantization: quantize columns in a fixed order, update the remaining weights using the inverse Hessian, apply updates in blocks of 128 columns, and compute what is needed with a Cholesky decomposition for numerical stability.
GPTQ quantized OPT-175B and BLOOM-176B in about four hours on one A100. At 4 bits OPT-175B's WikiText2 perplexity rose from 8.34 to 8.37 (RTN: 10.54); at 3 bits to 8.68 (RTN: 7,300). The 3-bit model fit one 80 GB A100 and generated tokens 3.24x faster than fp16 on five.
Why it matters to an FDE
GPTQ is one of the formats you will meet most when someone downloads a "4-bit" open model, and its lessons apply to any weight-only quantization.
Fewer GPUs, faster tokens at batch 1. Generation at small batch sizes is limited by how fast weights stream from memory. A 3- or 4-bit model reads a quarter or less of the bytes per token, so it can be both cheaper to host and faster per user, unlike int8 with outlier handling, which mainly saves memory.
Calibration data is small but not free. GPTQ needs a few hundred calibration sequences and an hour or a few on one GPU per model. The paper uses generic web text and reports results on standard benchmarks. If a customer's domain is unusual, quantize with representative domain text and check.
4 bits is the safe default; 3 bits needs testing. At 4 bits the paper's largest models lost under 0.25 perplexity points; at 3 bits up to about one point on some tests. Smaller models lose more. Test on the customer's task before going below 4 bits.
Understand the mechanism. Try it on a real problem.
Unlock this breakdown and 290 more papers.
Premium opens every paper in full, plus every answer, concept, course and guide on the site. One payment for six months of access.
6 months · One payment · No auto-renewal
- ◇1 architecture diagram
- </>1 runnable code experiment
- ▦2 results tables
- ?5 interview questions with answers
- 03Key takeaways
The layer-wise objective, the three speedups, grouping, the speed result and two misreadings
Free account - 04How it works
The objective, OBQ, the three changes, the full algorithm and the inference kernel
Premium - 05The numbers that matter
Perplexity by model and bit width, runtime, the 175B summary, speed and 2-bit results
Premium - 06Try it yourself
Implement GPTQ's core loop, check the memory and speed numbers, and audit the prose
Premium - 07Where it breaks
Weight-only scope, smaller models, perplexity-only evaluation, kernel dependence and slips
Premium - 08Using it on a deployment
Choosing bits and groups, calibrating on domain data, and checking quality and latency
Premium - 09Interview angles
Five questions this paper prepares you for, with answer hints
Premium - 10Read next
Where to go from here on this site
Premium
