The Quant Decoder
Quantization stores model weights with fewer bits. This reduces memory use and file size at some cost to quality. This guide explains the labels used by GGUF files.
The short answer
Start at Q4_K_M. It keeps ~96% of quality at ~55% of the size. Go Q6 if you have room to spare. Go Q3 only to squeeze onto smaller cards. Expect visible degradation below that.
Beaker's longer explanation follows. The box is the answer.
Quality kept vs size on disk
Quality stays close to the full precision model through Q4_K_M in the published measurements. Loss increases faster below Q4. Each point links to its source.
Quality kept = FP16 perplexity ÷ quant perplexity (wikitext), from the measurements published in the llama.cpp k-quants PR. KL divergence studies show the same knee. Artefact2's measurements.
32B class: published per-quant coverage is thin. The same source measures the trend that quantization loss shrinks as models grow. Treat the 14B curve as the floor, not the ceiling, for a 32B.
Quant names, decoded
| Quant | In plain English | GB for a 14B* | When to pick it |
|---|---|---|---|
| Q8_0 | 8-bit, plain rounding. The near-archival jar. Practically the full model. | 14.9 GB | Memory is no object, or you're comparing quants and want a reference. |
| Q6_K | 6-bit K-quant. Near-lossless in the published measurements. | 11.5 GB | You have room to spare and want the quality question gone. |
| Q5_K_M | 5-bit K-quant, medium mix. A small quality margin over Q4. | 10.0 GB | Q4 fits with a few GB left over and you'd rather spend them on quality. |
| Q4_K_M | 4-bit K-quant, medium mix. The house default. The knee of the quality curve. | 8.5 GB | Start here. Move only when a measurement gives you a reason. |
| Q3_K_M | 3-bit K-quant. Degradation is measurable and starts to be noticeable. | ≈6.3 GB | Squeezing onto a smaller card when Q4 won't fit and offload is too slow. |
| Q2_K | 2-bit K-quant. The smallest jar. Expect obvious quality loss. | ≈5.5 GB | Last resort. A smaller model at Q4 usually beats a big one at Q2. |
* weights only, via the site's shared fit math (running needs KV cache + overhead on top. full formula). Q3/Q2 figures scale the published 13B file sizes.
The rest of the alphabet soup
- K (K_S / K_M / K_L)
- K-quants: bits are mixed per layer block. Important tensors get more, filler gets less. S/M/L are small/medium/large mixes of the same bit level.
- IQ2 / IQ3 / …
- i-quants: importance-weighted packing that holds up better at very low bits, at some CPU-speed cost. Same idea, finer scales.
- imatrix
- An importance matrix used while quantizing. A calibration pass, not a format. Any quant can be made 'with imatrix'. Quality usually improves a little.
- Q4_0 / Q4_1 / Q5_0 …
- The legacy round-to-nearest quants that predate K-quants. Superseded: at the same size, the K-quant measures better.
- UD (dynamic)
- Per-layer dynamic bit allocation (e.g. Unsloth Dynamic): sensitive layers keep more bits. Different labels, same trade as imatrix. Better quality per GB.
- bpw
- Bits per weight. Exl2's dial. Where GGUF names steps (Q4, Q5…), exl2 quantizes to any fraction, so "4.25 bpw" ≈ a Q4-class build.
The same quant across runtimes
Same contents, four labeling systems. Beaker finds this personally offensive, so here's the translation table.
| Class | llama.cpp / GGUF | Ollama tag | MLX | exl2 |
|---|---|---|---|---|
| 4-bit | Q4_K_M | :q4_K_M. This is the usual default when a tag names no quant | 4-bit (…-4bit builds) | ~4.0 to 4.5 bpw |
| 5-bit | Q5_K_M | :q5_K_M | . (no 5-bit. MLX jumps 4 to 6) | ~5.0 bpw |
| 6-bit | Q6_K | :q6_K | 6-bit | ~6.0 bpw |
| 8-bit | Q8_0 | :q8_0 | 8-bit | ~8.0 bpw |