# Q4 vs Q8 LLM: What You Actually Lose

> Source: <https://dev.to/wayne_lay_957709c8ebac47a/q4-vs-q8-llm-what-you-actually-lose-2hkg>
> Published: 2026-11-27 14:37:26+00:00

**Recommendation:** Pick the quantization from your VRAM budget first: use Q4_K_M unless the model fits at Q8 with room for the KV cache, since Q4 nearly halves memory traffic and speeds token generation.
More in the playbook "Inference and self-hosting": <https://wpnews.pro/playbooks/inference-serving>

Q4_K_M is the default for most local LLM users. For Llama 3.1 8B, llama.cpp lists **4.58 GiB at 4.89 bits per weight** for Q4_K_M, versus **7.95 GiB at 8.50 bits per weight** for Q8_0. In its published test, Q4_K_M generated **71.9 tokens/s** and Q8_0 **50.9 tokens/s**, while Q8_0 was slightly faster at prompt processing (865.1 vs 821.8 tokens/s).

Q8_0 keeps more precision, but the quality difference is task-dependent and costs roughly twice the memory. Choose Q4 unless you have spare VRAM and a quality-critical task.

This guide compares the two GGUF quantization levels for local inference. The numbers come from llama.cpp's quantization documentation and Ollama model sizes; Q8 figures are approximate. It is not a benchmark of every model or machine.

Q4 and Q8 describe how many bits are used per weight. Q4_K_M averages about 4.89 bits per weight for Llama 3.1 8B; Q8_0 uses about 8.50. Lower precision means a smaller file and less memory traffic, which is why Q4 is faster and fits on smaller cards. Q8 is closer to the original model and is often called near-lossless, but it roughly doubles the file size.

The letter after Q matters too. **Q4_K_M** mixes 4-bit and higher-precision tensors; it is not the same as a flat 4-bit format. The llama.cpp quantize README documents the types and the tradeoffs.

| Model | Q4_K_M | Q8_0 | 
|---|---|---|
| 8B | ~4.9 GB | ~8.5 GB | 
| 14B | ~9 GB | ~15 GB | 
| 32B | ~20 GB | ~35 GB | 
| 70B | ~43 GB | ~75 GB | 

The KV cache is separate and does not shrink with quantization, so a 70B Q8 model at 75 GB will not fit on a 64 GB card even before context.

In llama.cpp's Llama 3.1 8B table, Q4_K_M generated **71.93 tokens/s** and Q8_0 **50.93 tokens/s**. That is the pattern you would expect: token generation is memory-bandwidth-bound, and Q4 reads less data per token.

Q8_0 was slightly **faster at prompt processing** (865.09 vs 821.81 tokens/s) in the same table, so the winner depends on the phase and the machine. Treat these as relative guidance, not a promise for your GPU.

On a card with enough VRAM, Q4 also leaves room for longer context or a second model. On a smaller card, Q8 may not fit at all.

The two phases of inference are bounded by different things, which is why the Q4/Q8 ranking is not the same everywhere.

**Token generation** reads the whole model once per token, so it is bound by memory bandwidth. Q4 moves roughly 4.9 GB per token against 8.5 GB for Q8 on an 8B model — about 1.7× less traffic, and the measured 71.9 vs 50.9 tokens/s is almost exactly that ratio. Nothing about the arithmetic units changes; the smaller file simply streams faster.

**Prompt processing** is bound by compute, because the whole prompt goes through the matmul at once. Q8 can win here because the higher-precision kernels are better optimized on some backends, and the measurement (865 vs 822 tokens/s) is small enough that a different build or driver could flip it.

The practical consequence: if your workload is mostly short prompts with long generations, Q4 is clearly faster. If you are feeding 30K-token documents and reading a short answer, the difference shrinks to noise.

Start from the card, not the quant. A 24 GB card running a 32B model has about 20 GB of weights at Q4, leaving roughly 4 GB for the KV cache, the runtime and the desktop — enough for a moderate context. The same model at Q8 is 35 GB, which does not fit at all, so the discussion ends there.

A 64 GB machine running a 70B model has about 43 GB of weights at Q4 and roughly 21 GB left for context, runtime and headroom; at 75 GB the Q8 file exceeds the machine before any context is allocated. That is why "Q8 if it fits" is the whole rule: on the high end it usually does not.

For a 14B model the numbers are friendlier — 9 GB versus 15 GB — so on a 24 GB card both fit and the choice becomes about quality rather than capacity. That is the only tier where the decision is genuinely close on a single GPU.

Quantization loss is usually measured with perplexity or Kullback–Leibler divergence; llama.cpp's documentation notes that an importance matrix can reduce it.

In practice, Q4_K_M is close for chat, summarization, and many coding tasks, while Q8_0 is closer to the original and a safer choice for evaluation or low-volume quality work. The difference is not uniform: a task with exact numbers, code syntax, or long reasoning chains may notice it more than casual chat.

Do not rely on a generic "Q4 is fine" claim for your own workload. Run the same prompts through both quants and compare the outputs you care about.

Use the same model, prompt set, context length, and sampler for both quants. Log tokens/s and VRAM with `ollama ps` or `nvidia-smi`, then compare the outputs on the tasks you actually run.

If Q8 fits and the difference matters, keep it; if not, Q4 is the practical default. Change one variable at a time, otherwise the comparison tells you nothing.

**Is Q8 worth it over Q4?** Only if the model fits comfortably in your VRAM and the task is quality-critical. Q4 is usually the better default for local chat and batch work.

**Does Q8 make the model slower?** For token generation, usually yes, because it reads more data per token. Prompt processing can be slightly faster or slower depending on the machine; llama.cpp's table shows Q8 slightly ahead there.

**Can I run 70B at Q8 on 64 GB?** No. A 70B Q8 file is roughly 75 GB before context, so it exceeds 64 GB. Q4 at about 43 GB is the practical 64 GB option.

**Is Q4 good enough for coding?** For many completion and refactor tasks, yes. For long multi-file reasoning or anything where exact syntax matters, test both — the gap widens on harder prompts.

**What about Q5 or Q6?** They sit between the two and are worth trying when Q4 is noticeably weak on your task but Q8 does not fit. They are usually a smaller file than Q8 with most of the quality.

Q4_K_M gives you roughly half the file size of Q8_0, faster token generation, and a small quality loss that is often acceptable. Q8_0 is closer to the original and a reasonable choice when VRAM is not the constraint.

Measure on your own prompts before deciding; the "best" quant is the one that fits your card and your quality bar.

Quantization sizes and speeds were checked in November 2026 from llama.cpp's quantize README (Llama 3.1 8B table) and Ollama model pages. Q8 sizes for 14B/32B/70B are approximate, and the speed figures come from llama.cpp's test machine, not ours.
