How much memory each quantization takes
Quantizing means storing each weight with fewer bits. llama.cpp, the engine Ollama and LM Studio run on and the one that defines these GGUF formats, publishes the bits per weight of each one, measured on Llama 3.1 8B (tools/quantize/README.md in its repository).
Two things to notice. Q4_K_M is almost 5 bits, not 4: the “K” formats give some parts of the model more bits than others, and “M” is the medium mix (“S” trims more). And going from Q4_K_M to Q8_0 almost doubles the memory, which on an 8 GB card is the difference between fitting and not fitting.
- IQ3_XXS: 3.25 bits per weight, 3.04 GiB for Llama 3.1 8B.
- IQ4_XS: 4.46 bits, 4.17 GiB.
- Q4_K_M: 4.89 bits, 4.58 GiB.
- Q5_K_M: 5.70 bits, 5.33 GiB.
- Q6_K: 6.56 bits, 6.14 GiB.
- Q8_0: 8.50 bits, 7.95 GiB.
- F16 (uncompressed): 16 bits, 14.96 GiB.
How much quality each one loses
llama.cpp’s quantizer also prints, for each format, how much perplexity rises compared with the uncompressed model, measured on Llama 3 8B. Perplexity measures how “surprised” a model is by a test text; the increase tells you how far the compressed model drifts from the original. Lower is better.
The pattern: from Q8_0 down to Q5_K_M the loss is small, at Q4_K_M it is a bit more noticeable, below 4 bits it grows fast, and Q2_K is on another scale. The old Q4_0 loses more than Q4_K_M at a similar size, so if you see both, take Q4_K_M.
What this table doesn’t tell you: it is one model, in English, with a statistical measure of text. It says nothing about whether the compressed model gets your own tasks right as often, in your language, or how much a different model loses at the same quantization. Use it to rank options, not as a quality score.
- Q8_0: +0.003.
- Q6_K: +0.02.
- Q5_K_M: +0.06.
- Q5_K_S: +0.10.
- Q4_K_M: +0.18.
- Q4_K_S: +0.27.
- Q4_0: +0.47.
- Q3_K_M: +0.66.
- Q2_K: +3.52.
Which one to download, based on your memory
This order comes from the llama.cpp figures above; it is judgment, not a measurement of ours.
Remember that the model is not the only thing in graphics card memory: the context needs room too, and it grows with every token you allow. We measured how much in how much VRAM context uses in Ollama, and which models fit each card size in which local LLM fits 8 GB, 12 GB or 16 GB of VRAM.
- Start with Q4_K_M of the model you want. You know it fits when ollama ps shows 100% GPU with the context you need.
- Memory to spare with that context: move up to Q5_K_M or Q6_K of the same model before jumping to a bigger model in Q4. The improvement will be small; check it with your tasks.
- Q4_K_M doesn’t fit: first try a model with fewer parameters in Q4_K_M. Dropping to Q3 or IQ3 is the second option, and measure it before you adopt it.
- Q8_0 only when it fits with room to spare and you have seen Q5 or Q6 fall short at something specific.
How to tell which quantization you have
In GGUF files (Hugging Face, LM Studio) the format is in the file name: ...-Q4_K_M.gguf, ...-Q8_0.gguf. In Ollama the default tag doesn’t say, but the server log does when the model loads: look for the file type line. All four models we tested (qwen3.5:9b, gemma4:12b and the others Ollama downloads under the plain name) showed Q4_K - Medium, and none of them used exactly 4 bits per weight, but between 4.89 and 5.02. If the model’s page on ollama.com lists other tags, the quantization is in the tag name.
Models that accept images bring a separate vision component. According to the llama.cpp documentation it is usually kept in a high-quality format such as bf16 or q8, because compressing it further saves little and can hurt quality. Count it apart, at its own size.
If the model loads but runs slowly, it may not fit entirely on the card; see Ollama not using the GPU on Windows.
- Select-String -Path "$env:LOCALAPPDATA\Ollama\server.log" -Pattern 'file type' | Select-Object -Last 1
- Real line from the log on our test PC: print_info: file type = Q4_K - Medium
The path is the one the installed Ollama app uses on Windows.
Check the difference in your own work
If you are torn between two quantizations of the same model, measure just that. Download both variants. Prepare five real tasks with known answers (a summary with facts that must appear, an extraction with exact values, a trick question), without personal or confidential data. Run each task three times with each variant, at temperature 0 and with the same context. Score them with criteria written down before you see the replies, such as “the exact amount appears” or “it says PENDING if the data is missing”, and note the speed of each.
If the smaller variant gets the same score, keep it and spend the memory you saved on context. If it loses at something you care about, you now know the exact price of those gigabytes.
Is a very low quantization of a big model useless?
Not by definition. We ran a large, heavily compressed model, Qwen3.8-Flash-Next in a Q2_0 variant (about 72 GB with its add-ons), split between a 16 GB card and system RAM. With a well-written request it got the top score on four document tests with built-in traps; with a naive one-line request, 15 out of 24. But it generated at 26 to 43 tokens per second, and each reply took between 41 seconds and 6 minutes. That is one model, one format and one batch of tests: it shows the option exists, not that it is a good default.
Frequently asked questions
Is Q4_K_M good enough?For most uses, according to llama.cpp’s figures, yes: +0.18 perplexity on Llama 3 8B, at less than a third of the uncompressed size. Check it with your own tasks if quality matters.
Q4_K_M or Q4_0?Q4_K_M. At a similar size, Q4_0 loses more (+0.47 against +0.18).
Is Q8_0 worth it?Only if it fits with the context you need and you have seen a smaller quantization fail at something specific. It almost doubles the memory of Q4_K_M.
Which quantization does Ollama download by default?In the models we tested, Q4_K_M (the log says Q4_K - Medium).