GO TO A SECTION

↑ ↓ to navigate · Enter to openExplore all sections →
FDEInterviews logo
ICML 2023

The case for 4-bit precision: k-bit Inference Scaling Laws

Given a fixed memory budget, is a bigger model at fewer bits better? Over 35,000 experiments on models from 19M to 176B parameters say yes, down to 4 bits per weight, and no further.

Breakdown by FDE Interviews · 11 min read · Updated

About the original · 2022
AUTHORS
Dettmers, Zettlemoyer
FROM
University of Washington
PUBLISHED
Dec 2022 · ICML 2023
CITED BY
379Semantic Scholar · Nov 2026
IN THIS BREAKDOWN · 10 SECTIONS

You can read 21% of this breakdown.

01

The paper in one minute

Suppose a GPU has room for 30 GB of weights. That holds a 60-billion-parameter model at 4 bits per weight or a 30-billion-parameter model at 8 bits. Which is better? Before this paper, quantization studies asked how much a given model loses when quantized. Dettmers and Zettlemoyer asked the budgeting question instead: for a fixed total number of bits in the model, what precision gives the best accuracy?

They framed it as a scaling law. For five model families (OPT, Pythia/NeoX, GPT-2, BLOOM and BLOOMZ) from 19 million to 176 billion parameters, they quantized weights to every precision from 3 to 8 bits plus 16-bit, measured mean zero-shot accuracy on LAMBADA, PIQA, HellaSwag and WinoGrande, and plotted accuracy against total model bits. The quantization was zero-shot: no calibration data, just a fixed rule applied to the weights, with activations left in 16-bit.

The answer was the same everywhere. Reducing precision from 16 to 4 bits, while spending the saved bits on more parameters, improves accuracy at every budget. At 3 bits the curve turns down; OPT and Pythia become unstable, near chance on their largest models. 4-bit is the best bit-for-bit precision.

Then, across more than 35,000 experiments, they tested what makes low-bit quantization better. Two things helped. Small block size: quantizing groups of 64 weights each with its own scale costs 0.25 extra bits per weight but improved 4-bit about as much as moving to 5 bits. Data type: float and quantile formats beat plain integers. Outlier-aware tricks that rescued 3-bit models did not beat simply using 4-bit with more parameters. The recommendation: use 4 bits with small blocks and a float-like type, and if you need a smaller or larger model, change the parameter count, not the precision.

THE IDEA, VISUALLY
SAME 30 GB OF WEIGHTS, FOUR WAYS (SECTION 1) 15B x 16-bit 30B x 8-bit 60B x 4-bit best accuracy per bit 80B x 3-bit 3 bits: accuracy falls bar length = parameters; every row is 30 GB From 16 to 4 bits, spending saved bits on more parameters raised zero-shot accuracy in every family tested (OPT, Pythia, GPT-2, BLOOM, BLOOMZ, 19M to 176B). At 3 bits it reversed; OPT and Pythia fell near chance at the largest sizes. RECOMMENDATION (SECTION 7) 1 use 4 bits 2 blocks of 64-128 weights per scale (+0.25 bits at 64) 3 float or quantile data type, not integer 4 to change size, change parameters, not precision 4-BIT ERROR BY TYPE AND BLOCK (OUR TOY) relative squared error, synthetic weights with rare spikes block 64 block 256 block 1024 int 0.0138 0.0256 0.0591 float 0.0118 0.0159 0.0283 quantile 0.0092 0.0137 0.0275 stronger color = more error; 4.25-bit block-64 int beats 5-bit int at block 1024 (0.0148) here THE 48 GB EXCEPTION (SECTION 7) 66B at 5-bit 43.3 GB 175B at 4-bit 93 GB 48 GB GPU 48 GB when the next size up does not fit at 4 bits, spend the spare memory on precision arXiv 2212.09720, University of Washington, ICML 2023
Hold the total number of bits in a model's weights fixed and trade parameters against precision. From 16 down to 4 bits, a larger model at lower precision scores better zero-shot; at 3 bits the trend reverses. Small blocks with their own scale and float or quantile data types make 4-bit work best.
Research notes: the problem, approach and results
4 bits

precision that maximizes zero-shot accuracy for a fixed total of model bits, across all families tested (Section 5.1)

35,000+

zero-shot experiments across data types, block sizes and outlier methods (Section 5.2)

+0.25 bits

cost per parameter of a block size of 64 with 16-bit scales, worth about one extra bit of precision (Figure 3)

THE PROBLEM

With a fixed amount of GPU memory, you can run a larger model at lower precision or a smaller one at higher precision. Earlier work measured how much quantization hurts a given model, but not which choice gives the best accuracy per bit of memory.

THE IDEA

Treat total model bits as the budget and fit scaling laws of mean zero-shot accuracy against it, for five model families (OPT, Pythia/NeoX, GPT-2, BLOOM, BLOOMZ) from 19M to 176B parameters at 3 to 16 bits. Vary data type (integer, float, quantile, dynamic exponent), block size and outlier handling to see which choices shift the curve.

THE RESULT

For a fixed number of model bits, accuracy rises as precision falls from 16 to 4 bits and drops at 3 bits, in every family and size tested. Small blocks (64 weights) and float or quantile data types give the best 4-bit results; a block size of 64 adds 0.25 bits per weight but helps about as much as going from 4 to 5 bits.

02

Why it matters to an FDE

This paper is the reason "use the biggest model that fits in 4-bit" became standard advice, and it gives you the reasoning to defend that choice.

Spend memory on parameters, not on precision. When a customer's hardware is fixed, compare candidates by total weight bytes. A 4-bit model twice the size of an 8-bit one typically wins in this paper's measurements. The exception the authors give: a GPU that can hold a model at 5 bits but not the next size up at 4 bits; then use the 5 bits.

Block size and data type are cheap settings that matter. A 4-bit format with blocks of 64 and a float or normal-quantile data type spends a quarter-bit per weight on scales and recovers much of the quantization loss. Formats such as NF4 in QLoRA and group-128 settings in GPTQ and AWQ follow this logic.

Going below 4 bits needs more than rounding. Zero-shot 3-bit quantization breaks some model families. Methods that use calibration data, like GPTQ, can do better at 2 to 3 bits, and the paper shows 2-bit GPTQ with small blocks beating its own 3-bit float. Treat sub-4-bit as an experiment, not a default.

THE FULL BREAKDOWN

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

Get Premium · ₹2,000 / $25
  • ◇1 architecture diagram
  • </>1 runnable code experiment
  • ▦2 results tables
  • ?5 interview questions with answers
  1. 03Key takeaways

    The 4-bit result, what block size and data type buy, what did not help, and two misreadings

    Free account
  2. 04How it works

    The latency argument, the experimental grid, the data types, blocking and the fitted trends

    Premium
  3. 05The numbers that matter

    The scaling result, 3-bit instability, block and data-type effects, and the GPTQ comparison

    Premium
  4. 06Try it yourself

    Bit-budget arithmetic, quantization error by data type and block size, and Table 1 in bits

    Premium
  5. 07Where it breaks

    Zero-shot scope, activations and KV cache, kernel support, model families and gaps

    Premium
  6. 08Using it on a deployment

    A procedure for choosing model size and precision under a memory budget

    Premium
  7. 09Interview angles

    Five questions this paper prepares you for, with answer hints

    Premium
Back to the paper library →