Quantization explained for builders
Quantization stores a model's weights using fewer bits. That shrinks the file and the VRAM needed, and usually speeds up generation because less data is read per token. The cost is some loss of accuracy, which varies by model, method and task.
The size math
Weights take about parameters times bits per weight divided by 8. See the VRAM guide for worked sizes. A 4-bit model is roughly a quarter of the size of its 16-bit original, plus a little for scale data.
Common formats
- GGUF is the file format used by llama.cpp and tools built on it. It has many quantization types. Names like
Q4_K_Mencode the bits (4), the method family (K-quants, which use block-wise scales) and a size variant (S, M, L). Q8_0 is close to the original quality; Q4_K_M is a widely used balance; Q2 and Q3 types are noticeably lossier. Importance-matrix ("imatrix") variants use calibration data to protect important weights and tend to help at low bit counts. - GPTQ and AWQ are GPU-oriented 4-bit methods commonly used with engines such as vLLM and Hugging Face Transformers.
- EXL2 / EXL3 formats are used by ExLlama engines on NVIDIA GPUs and allow fractional bits per weight.
- FP8 and similar low-precision floats need hardware and engine support; check your GPU generation.
- bitsandbytes (8-bit, NF4) is common for loading and fine-tuning in the Hugging Face stack.
Engines and formats are tied together: a GGUF file will not load in an engine that only reads GPTQ. Pick the engine first.
Choosing a level
- If it fits at Q8 or FP16 and you want maximum fidelity, use it. The cost is VRAM and speed.
- Q4_K_M is a common default when VRAM is the constraint. Many users find the loss acceptable for chat and general tasks, but this is a judgment about your workload, not a universal fact.
- A common rule of thumb is that a larger model at 4-bit often beats a smaller model at higher precision with the same memory. It is a heuristic and not true for every model or task.
- Below about 3 bits, degradation tends to become more obvious, especially in smaller models, code and math.
- Quality is task-dependent. Reasoning, coding and non-English text can degrade differently. Test on your own prompts.
KV cache quantization is separate
Weights and the KV cache are quantized independently. Quantizing the cache saves memory at long context but can affect quality; treat it as a second dial.
How to evaluate
Compare perplexity or KL divergence against the unquantized model when the tool reports it, and run a handful of real prompts side by side. Published numbers from other people's hardware and prompts are only a guide.
The picker lets you choose the quantization per model and shows the resulting VRAM fit. Speed estimates labeled "formula-derived" scale with the bytes read per token; see the data notice.
Disclosure: some links on this site may be affiliate links, and we may earn a commission if you buy. It never changes how builds are ranked. See the affiliate disclosure.
Ready to check a specific model? Pick a model and quantization and see compatible builds with estimated VRAM fit.