GGUF quantization levels, weighed live: Q4_K_M vs Q8_0 on size, VRAM and quality
Q4_K_M runs ~4.85 bits per weight for ~1% perplexity and 30% of full precision; Q8_0 lands ~0.02% off full at ~8.5 bpw. Size: size_GB ≈ bits_per_weight × params / 8.
GGUF quantization levels are arithmetic, not taste. Q4_K_M: ~4.85 bits per weight, ~1% perplexity, ~30% of full precision. Q8_0: ~0.02% off full.
bits per weight at the default rung: 4.85 GB at 8B vs 16.0 GB at fp16.
Same model, different coats: Q4 and Q8.
How do GGUF quantization levels compare on size and quality?
size_GB ≈ bits_per_weight × params / 8 8B at Q4_K_M: 4.85 × 8 / 8 = 4.85 GB; fp16 = 16.0 GB; crate leaves at 30% # flash-attention + KV-cache quant keep a 16k window on that 6 GB card
| rung | bpw | quality — the verdict | reach for it |
|---|---|---|---|
| Q2_K · the ration | ~3.4 | severe on sub-13B — an emergency ration | Nothing else fits, large models only. Test before trusting. |
| Q3_K_M · the squeeze | ~3.9 | noticeable loss — only for tight VRAM on ≥14B | Tight VRAM, ≥14B models only. |
| Q4_K_S · the fallback | ~4.6 | small loss | When Q4_K_M won't fit and it's close. |
| IQ4_XS · the i-quant | ~4.3 | ≈ Q4_K_M quality, smaller | Backend supports i-quants. Slightly slower on some backends. |
| Q4_K_M · the default | ~4.85 | ~1% perplexity — THE default; best quality-per-gigabyte | The default. Best quality-per-gigabyte trade there is. |
| Q5_K_M · the headroom | ~5.7 | ~0.5% perplexity — near-nil loss, still comfortable | Quality mattered more than the last gigabyte. |
| Q6_K · the workhorse | ~6.6 | near-indistinguishable | Code, math, extraction — anything that punishes noise. |
| Q8_0 · the reference | ~8.5 | effectively none (~0.02% vs full) | Reference runs, A/Bs, fine-tune bases — not a daily driver. |
Weights only: a "4.9 GB" model wants a 6 GB card at 4k; at 128k the cache alone wants ~16 GiB.
What does the stamp remove?
Block scaling packs 2-byte weights into blocks of 32 with one scale factor each. k-quants treat attention and feed-forward layers differently. Architecture, tokenizer and context handling stay untouched.
measure the damage yourself
# perplexity = next-token surprise on one fixed dataset git clone https://github.com/ggml-org/llama.cpp && cd llama.cpp cmake -B build && cmake --build build --config Release -j huggingface-cli download bartowski/Meta-Llama-3.1-8B-Instruct-GGUF \ Meta-Llama-3.1-8B-Instruct-Q4_K_M.gguf Meta-Llama-3.1-8B-Instruct-Q8_0.gguf ./build/bin/llama-perplexity -m models/Meta-Llama-3.1-8B-Instruct-Q4_K_M.gguf -ngl 99 ./build/bin/llama-perplexity -m models/Meta-Llama-3.1-8B-Instruct-Q8_0.gguf -ngl 99 ./build/bin/llama-bench -m models/Meta-Llama-3.1-8B-Instruct-Q4_K_M.gguf -ngl 99
A proxy, not a grade — your real task can disagree. Q4_K_M lands a few hundredths worse; the file is ~40% smaller.
Which rung holds which job?
- Context + KV budget first, weights second. At long context the cache can outweigh the model.
- Default to Q4_K_M. ~1% perplexity for ~30% of the size.
- Step up to Q6_K when the task punishes noise — code, math, extraction, anything unattended.
- Q8_0 for reference only — A/B tests, damage measurement, fine-tune bases.
- Below Q4 only under duress, large models only — and test with a known-hard prompt first.
- quality verdicts from perplexity runs, not vibes · llama.cpp llama-perplexity · llama-bench
- GGUF Q2_K → Q8_0 · Hugging Face files · ladder numbers are llama.cpp's own measurements on Llama-family reference models
- first published 2026-09-13; size math is the one line, every readout computes it live