First, Decode the Names
Both are GGUF quantization levels produced by the llama.cpp toolchain. The names tell you how the weights are stored:
- Q4_K_M — weights compressed to ~4-bit precision using k-quantization, with the medium (M) mix of precision levels. K-quants keep the sensitive attention layers at higher precision and compress the tolerant feed-forward layers harder, which is why a Q4 K quant beats a naive 4-bit round.
- Q8_0 — weights stored at ~8-bit precision with the simple, classic per-block scheme (the
0marks the legacy basic quant). No mixed-precision tricks needed — at 8 bits there's very little quality to save.
The practical difference is simple: Q4_K_M packs ~0.56 bytes per parameter; Q8_0 uses ~1.06 bytes per parameter — almost twice the memory for roughly double the precision.
File Size and Memory: The Real Numbers
The table below shows GGUF weights in bytes per parameter and typical sizes for common model families. These are weight sizes — add 1–2GB for the context window (KV cache) and runtime overhead.
| Quant | Bytes/param | 7B model | 14B model | 70B model | Quality |
|---|---|---|---|---|---|
| F16 (baseline) | 2.00 | 14.0 GB | 28.0 GB | 140 GB | Reference |
| Q8_0 | 1.06 | 7.4 GB | 14.8 GB | 74.2 GB | Effectively lossless |
| Q6_K | 0.81 | 5.7 GB | 11.3 GB | 56.7 GB | Very good |
| Q5_K_M | 0.69 | 4.8 GB | 9.7 GB | 48.3 GB | Good |
| Q4_K_M | 0.56 | 3.9 GB | 7.8 GB | 39.2 GB | Acceptable for most tasks |
| Q3_K_M | 0.44 | 3.1 GB | 6.2 GB | 30.8 GB | Noticeable loss |
| Q2_K | 0.31 | 2.2 GB | 4.3 GB | 21.7 GB | Significant loss |
💡 Context matters: a 7B model at Q4_K_M shows 3.9GB of weights, but in practice needs ~5–6GB with context and overhead. A 7B at Q8_0 needs ~8–9GB total. That's why Q8_0 is comfortable on 16GB machines but tight on 8GB ones.
Quality: How Much Do You Actually Lose?
Here's what the benchmarks say (2026 sources):
- Q8_0 — effectively lossless. Perplexity increases roughly 0.1–0.3% versus full precision, which is within measurement noise for most tasks. In blind tests, people generally cannot distinguish Q8_0 from the original model.
- Q4_K_M — keeps roughly 95–97% of full-precision quality at ~35% of the memory cost, with 2–3× the throughput. For chat, summarization, and general assistance, the loss is barely noticeable. The degradation shows up on precision-critical tasks.
But "quality" is not one number — it depends on what you're doing. Task sensitivity is the real deciding factor:
| Task | Sensitivity to quantization | Recommendation |
|---|---|---|
| Coding | Highest — one wrong token breaks the logic | Q5_K_M or higher; Q8_0 if you have the RAM |
| Math & reasoning | High — small errors cascade through long chains | Q5_K_M or Q6_K for chain-of-thought models |
| Creative writing | Moderate — nuance and rhythm degrade | Q4_K_M acceptable; Q5+ for serious work |
| Chat & conversation | Low — language tolerates small variations | Q4_K_M is perfectly adequate |
| Summarization & extraction | Lowest — broad patterns, not fine precision | Q4_K_M handles it well |
The Decision Guide
Use your memory situation, not a fixed rule:
| Your RAM/VRAM situation | Pick |
|---|---|
| Model uses less than ~60% of available memory | Q6_K or Q8_0 — you have headroom, spend it on quality. Q6_K is the better default (marginal gain from Q6→Q8, more room for context) |
| Model uses ~60–80% of available memory | Q5_K_M — the sweet spot between Q4 and Q6 |
| Model uses ~80–95% of available memory | Q4_K_M — the most tested, recommended quant for constrained hardware |
| Model barely fits even at Q4 | Reconsider the model — a smaller model at Q5/Q6 usually beats a bigger one at Q2/Q3 |
🎯 The rule that beats all tables: a smaller model at a higher quant beats a larger model at a low quant. A sharp 8B model at Q6_K will outperform a mediocre 14B model at Q3_K — and run faster doing it. When in doubt, download Q4_K_M first, run it, and only step up if you can name the quality problem you're seeing.
How to Compare on Your Own Machine
- Measure perplexity or speed: llama.cpp ships
llama-benchfor speed and perplexity comparisons between quant levels. - Inspect a GGUF file:
gguf-parsershows exact file metadata, tensor types, and estimated memory use before you commit. - In a GUI: LM Studio shows a color-coded RAM fit indicator per quant; GGUF Loader shows a live RAM/VRAM dashboard as the model loads — no CLI needed.
Need the full setup walkthrough? Our guide to running GGUF models locally covers install, model picks, and troubleshooting, and Ollama vs llama.cpp helps you choose a runtime. For downloads, Local AI Zone lists quantized GGUF files with direct links.
Frequently Asked Questions (FAQ)
Which is better, Q4_K_M or Q8_0?
Q8_0 is higher quality, but Q4_K_M is the better default for most people. Q4_K_M keeps roughly 95–97% of full-precision quality at about a third of the memory cost — the best quality-per-GB trade-off. Choose Q8_0 when you have the RAM/VRAM to spare and the task is sensitive (coding, math, or long structured reasoning).
How much RAM do I need for Q8_0 vs Q4_K_M on a 7B model?
A 7B model at Q4_K_M is about 3.9GB of weights (roughly 5–6GB total with context and overhead), while Q8_0 is about 7.4GB of weights (roughly 8–9GB total). On a 16GB machine, Q8_0 is usually fine; on 8GB, Q4_K_M is the safer choice.
Can you notice the difference between Q4_K_M and Q8_0?
For chat and summarization, most people cannot. For coding, math, and long multi-step reasoning, the difference is measurable: Q8_0 is effectively lossless (within ~0.1–0.3% perplexity of full precision), while Q4_K_M shows more degradation on these precise tasks.
Is Q4_K_M good enough for coding?
Q4_K_M works for simple completions but shows cracks on complex, multi-file coding tasks where a single wrong token breaks the logic. For coding models, Q5_K_M or higher is the community recommendation when your hardware allows it.
Why does Q8_0 exist if Q4_K_M is the default?
Because quality-per-GB is not the only goal. Q8_0 is effectively lossless, so it is the right choice when quality is critical and memory is available — production serving, benchmarking, or tasks where precision errors cascade. Q4_K_M exists to fit more models on modest hardware.
How do I know which quantization to download?
Start with Q4_K_M: it runs almost everywhere and is the default on Ollama and most model hubs. If your RAM/VRAM usage is under ~60%, step up to Q5_K_M or Q6_K. Only use Q8_0 when you have clear headroom and a precision-sensitive task. A smaller model at a higher quant usually beats a larger model at a low quant.
Sources
- GGUF Quantization Guide (2026): Q4_K_M Saves 72% VRAM — Will It Run AI
- LLM Quantization Levels Compared: Q4_K_M vs Q8_0 vs FP16 (July 2026)
- Q4 vs Q6 vs Q8: The Quantization Decision Framework (SitePoint, 2026)
- llama.cpp discussion: difference in quantization methods
- GGUF Loader: What is GGUF? memory-requirement table
- Local AI Zone — GGUF model directory