Archive/MODELS

Quantization without tears: what you lose at 8, 4 and 3 bits

Smaller weights, faster inference, and a quality cost that depends far more on the task than on the bit count. A practical guide to choosing a level.

Quantization without tears: what you lose at 8, 4 and 3 bits

Quantization stores a model's weights using fewer bits. It is the reason a model that needs a datacentre GPU at full precision can run on a laptop, and a major reason serving costs keep falling. The trade is always the same: less memory and more speed in exchange for some loss of quality. The interesting part is which quality you lose, and how much it matters for your task.

This guide explains what quantization does, the main methods (GPTQ, AWQ, GGUF k-quants and bitsandbytes), what typically degrades at 8, 4 and 3 bits, and a practical method for choosing a level.

What quantization actually does

Model weights are normally stored as 16-bit floating-point numbers (FP16 or BF16). Quantization maps them onto a smaller set of values: 256 possible values at 8 bits, 16 at 4 bits, 8 at 3 bits. Each group of weights shares a scale (and often an offset) so that the small integer values can be converted back to approximately the original numbers during computation.

Two consequences follow:

The cost is rounding error. Each weight is slightly wrong, and those errors accumulate as signals pass through dozens of layers.

Why some weights are harder than others

Rounding error is not spread evenly. Research on large models found that a small number of outlier features, values much larger than the rest, carry a disproportionate share of the model's behaviour. Dettmers et al. (2022), "LLM.int8()," showed that naive 8-bit quantization broke down for large models because of these outliers, and that keeping them in higher precision solved the problem.

Modern methods all deal with this in some way: by protecting important weights, by choosing scales carefully per small group of weights, or by measuring which weights matter most using sample data.

The main methods

Common quantization methods
MethodTypical useKey idea
bitsandbytes (LLM.int8, NF4)Quick loading in Python, QLoRA fine-tuning8-bit with outlier handling; 4-bit NormalFloat format
GPTQ (Frantar et al., 2022)GPU inference at 4 bitsQuantizes layer by layer, correcting errors using calibration data
AWQ (Lin et al., 2023)GPU inference at 4 bitsProtects the weights that matter most for activations
GGUF k-quants (llama.cpp)CPU, Apple Silicon and mixed inferenceBlock-wise quantization with mixed precision per tensor

GGUF files are named by their scheme, for example Q8_0, Q5_K_M, Q4_K_M and Q3_K_S. The number is the approximate bits per weight; K-variants use smarter block-wise scaling; the S/M/L suffix indicates how many sensitive tensors are kept at higher precision.

What you lose at each level

The figures here are general patterns reported widely across models and methods, not measurements from one benchmark. Larger models usually tolerate quantization better than small ones, because they have more redundancy.

8 bits

For most tasks, 8-bit quantization is very hard to distinguish from 16-bit. It is the safe choice when memory allows and you need maximum fidelity, for example for evaluation baselines or precise extraction.

5 and 6 bits

Very small quality loss for most tasks. Often the best choice when you have a little extra memory and care about exact recall or code.

4 bits

The most popular level for local and cost-sensitive inference. Fluent writing, summarisation and conversation usually survive well. Degradation shows up first in:

3 bits and below

Quality loss becomes visible in everyday use: more repetition, more factual slips, weaker instruction following. Sometimes worthwhile to fit a much larger model into limited memory, because a large model at 3 bits can still beat a small model at 8 bits, but test carefully.

Measure on your task, not on perplexity

Perplexity, a measure of how well the model predicts text, is the standard quick check for quantized models. It is a fine sanity check and a poor decision tool. Two variants with nearly identical perplexity can differ sharply on structured extraction or code, because perplexity averages over all tokens while your task may depend on a few critical ones.

A better method:

  1. Pick 50 to 100 examples of your real task, with automatic checks where possible.
  2. Run them at 16-bit or 8-bit as the reference.
  3. Run the same examples at the candidate levels with identical settings.
  4. Compare pass rates, and read every example where the quantized version fails but the reference passes.
  5. Choose the smallest level whose failures you can accept.

Include several runs per example if you sample at non-zero temperature; otherwise random variation can hide or exaggerate differences.

Quantizing the KV cache and activations

Weights are not the only thing that can be stored with fewer bits. Two other targets matter in production:

If you use a hosted API, you will rarely control these settings directly, but they partly explain why the same open model can behave slightly differently from one provider to another. When results differ between providers, ask which precision they serve the model at.

Quantization, fine-tuning and distillation

Quantization combines well with other efficiency techniques. QLoRA (Dettmers et al., 2023) fine-tunes adapters on top of a 4-bit base model, making fine-tuning possible on a single GPU; see LoRA in plain English. Distillation produces smaller models that are then often quantized for deployment; see distillation explained for builders.

If you are running models locally, our step-by-step guide to running an 8B LLM on a laptop covers memory, tools and speed estimates. And before you squeeze a big model into a small machine, check whether a small model already handles the job.

Frequently asked questions

What is quantization in LLMs?

Quantization stores model weights with fewer bits, for example 4 bits instead of 16, which reduces memory use and speeds up inference at the cost of small rounding errors that can reduce quality.

Is 4-bit quantization good enough?

For many tasks, such as chat, summarisation and rewriting, 4-bit models are close to full precision. Tasks that depend on exact recall, arithmetic or code are more sensitive, so test 4-bit against a higher-precision reference on your own examples.

What is the difference between GPTQ, AWQ and GGUF?

GPTQ and AWQ are quantization methods mainly used for GPU inference at 4 bits; GPTQ corrects errors layer by layer, and AWQ protects activation-sensitive weights. GGUF is the file format used by llama.cpp and related tools, with block-wise "k-quant" schemes suited to CPUs and Apple Silicon.

Should I use a bigger quantized model or a smaller full-precision model?

Often the bigger quantized model wins at the same memory budget, down to around 4 bits. At 3 bits and below the trade-off becomes less predictable, so compare both on your own tasks.

JL
WRITTEN BYJonas LindInfrastructure nerd. Runs the local-model lab and the tokens-per-watt spreadsheet.

Keep reading

Liked this? The Sunday Diff has one like it every week.