Every model page on Hugging Face or in LM Studio offers a list like Q4_K_M, Q5_K_M, Q6_K, Q8_0, IQ3_XXS. If you run models on a consumer GPU, the choice decides whether the model fits at all. Here are the numbers that matter, straight from llama.cpp (the engine behind Ollama and LM Studio), and the order I download in.
Size: Q8_0 is almost double Q4_K_M
Bits per weight and file size, as llama.cpp publishes them for Llama 3.1 8B (tools/quantize/README.md):
| Format | Bits per weight | Llama 3.1 8B |
|---|---|---|
| IQ3_XXS | 3.25 | 3.04 GiB |
| IQ4_XS | 4.46 | 4.17 GiB |
| Q4_K_M | 4.89 | 4.58 GiB |
| Q5_K_M | 5.70 | 5.33 GiB |
| Q6_K | 6.56 | 6.14 GiB |
| Q8_0 | 8.50 | 7.95 GiB |
| F16 | 16.00 | 14.96 GiB |
Q4_K_M is closer to 5 bits than 4. The four Q4_K_M models I loaded in Ollama (qwen3.5:9b, gemma4:12b and two more) came out between 4.89 and 5.02 bits per weight. On an 8 GB card, 4.58 vs 7.95 GiB is the difference between fitting and not fitting, before you even count the context.
Quality: small loss down to Q5, more at Q4, fast drop below 4 bits
Perplexity increase vs the uncompressed model, Llama 3 8B, as printed by llama.cpp's quantizer (lower is better):
| Format | Perplexity increase |
|---|---|
| Q8_0 | +0.003 |
| Q6_K | +0.02 |
| Q5_K_M | +0.06 |
| Q4_K_M | +0.18 |
| Q4_0 | +0.47 |
| Q3_K_M | +0.66 |
| Q2_K | +3.52 |
Two takeaways: prefer Q4_K_M over the old Q4_0 (similar size, more than double the loss), and treat anything under 4 bits as something to measure before you adopt it. This is one model, in English, with a statistical metric; use it to rank options, not as a promise about your tasks.
The order I download in
- Q4_K_M of the model I want. It fits when
ollama psshows 100% GPU with the context I need. - Memory to spare: Q5_K_M or Q6_K of the same model, before a bigger model in Q4.
- Q4_K_M doesn't fit: a smaller model in Q4_K_M first, Q3 or IQ3 second.
- Q8_0 only if it fits with room to spare and a smaller quant failed at something specific.
Which one Ollama gave you
The default tag doesn't say, but the server log does:
Select-String -Path "$env:LOCALAPPDATA\Ollama\server.log" -Pattern 'file type' | Select-Object -Last 1 # print_info: file type = Q4_K - Medium If you're torn between two
Same model, both quants, five real tasks with known answers, three runs each at temperature 0, scored against criteria you wrote before reading the replies. If the smaller one ties, keep it and spend the saved memory on context.
The full guide, with how much the context itself costs in VRAM, is here: Q4_K_M vs Q8_0: which quantization to download. It comes from my book Which Local AI Model Fits Your GPU.
