Comparing quantization levels on the same model is a controlled experiment: change the quant, hold everything else constant, and measure two things separately — memory footprint and task accuracy. Memory is quick and fairly predictable to check. Accuracy is not. A single chat prompt rarely separates a Q4 build from a Q8 build, and the difference that matters usually appears only when you score a fixed set of tasks deterministically.
This guide is for people running GGUF models locally with llama.cpp, Ollama, or a comparable runtime who want to know what a lower-bit build actually costs them. It covers what to hold constant, how to record results so they can be reproduced, and what published quantization benchmarks actually measure.
What a quantization level actually changes
A GGUF file stores model weights at reduced numeric precision. Instead of 16-bit floating point, weights are packed into fewer bits per value, which shrinks both the file and the memory required to hold it. The labels you see — Q8_0, Q6_K, Q5_K_M, Q4_K_M, Q3_K, IQ2_XXS — describe a target bit width and a packing scheme, not a single linear scale.
Two families matter when you compare. K-quants such as Q4_K_M use block-based schemes, while I-quants such as IQ2_XXS use an importance matrix derived from calibration data to decide where precision is spent. The suffix letters (_S, _M, _L) indicate how much of the model is kept at a higher precision. Two files with the same nominal bit width are therefore not necessarily equivalent, and the quality ordering between them is not guaranteed by the label alone.
Weight precision is also only one of two levers. The KV cache — the memory used for attention keys and values at inference time — can be quantized separately. The llm-quant-bench project, for example, runs llama.cpp’s llama-server with a q4_0 KV cache for both K and V, and context lengths of 16384–32768 tokens depending on the model (yrougy/llm-quant-bench). Those settings are part of the measurement, not incidental details.
Measure footprint and accuracy as two separate questions
The first question is whether the model fits and runs at acceptable speed. The second is whether it still does your task. Mixing them produces conclusions that do not transfer — a build can be comfortably faster and smaller while being measurably worse at function calling, or nearly identical in quality while saving almost nothing.
For the footprint question, record three numbers rather than one: the file size on disk, the size the runtime reports when the model is loaded, and the actual process memory. These are not the same figure. A hands-on comparison of llama3.2:1b at three precision levels on Ollama reported 807 MB download but 997 MB loaded for Q4_K_M, and roughly 0.94 GB of process RSS (Pipeline & Prompts). The gap is the runtime’s own overhead and buffers, which is why weight size alone is a poor predictor of total memory use.
A reproducible comparison protocol
The following sequence keeps the comparison honest. It assumes you already have a model you intend to run locally and at least two quantizations of it.
- Fix the model and its revision. The same base weights, the same tokenizer, the same chat template. Two repositories with similar names are not the same model, and a chat template change can move scores more than a quantization step does.
- Choose two or three quants that span your real decision. Typically one that fits your VRAM with headroom, one at the edge, and one above it as a quality reference. Full precision (FP16) is useful as a ceiling, but it is a reference point, not a quantization level.
- Freeze the runtime configuration. Record the llama.cpp build or commit, the backend (CUDA, Metal, CPU), GPU offload layer count, context length, KV cache type, and batch size. If you change any of these between runs, you are no longer comparing quantization levels.
- Freeze the prompts and sampling. Use greedy decoding or a fixed temperature with a fixed seed, a fixed maximum token count, and identical system prompts. Sampling randomness will otherwise be mistaken for a quality difference.
- Score deterministically. Prefer checks with an objective answer: unit tests for generated code, multiple-choice accuracy, or AST matching for structured tool calls. An LLM judge adds a second source of variance to the thing you are trying to isolate.
- Repeat and record variance. Run each quant more than once. If the spread between repeats is as large as the gap between quants, you have not measured anything yet.
- Keep the raw outputs. Store the completions, not only the scores. When a result looks surprising, the transcripts are what let you diagnose whether the quant failed or the prompt did.
Worked example: one model, three precision levels
The llama3.2:1b comparison is a useful illustration because it isolates footprint cleanly. The author ran the same question against three Ollama builds and captured memory from ollama show, ollama ps, and the process list. The figures below are the reported values from that test, not a general law about quantization.
| Level | Download size | Loaded size (ollama ps) | Process RSS |
|---|---|---|---|
Q4_K_M | 807 MB | 997 MB | ~0.94 GB |
Q8_0 | 1.3 GB | 1.5 GB | ~1.24 GB |
| FP16 | 2.5 GB | 2.7 GB | ~2.57 GB |
The memory side behaved predictably, roughly doubling at each step in line with the bit-width arithmetic. The quality side did not produce a verdict at all: all three levels gave an incomplete answer to the single question asked, each padding a reasonable core suggestion rather than clearly failing or succeeding. That is the honest outcome of a one-prompt test — it is an anecdote, not a measurement.
The same write-up contains a second, easily missed lesson. The author had been treating one build as an unspecified default and discovered via ollama show llama3.2:1b that it was already Q8_0. Before comparing anything, confirm which quant is actually loaded.
ollama show llama3.2:1b
ollama ps
What a structured quantization benchmark looks like
llm-quant-bench exists specifically to answer the question this article is about: for a given model, how much accuracy is lost going from a high-bit quant down to a very low one. Its design choices are worth copying even if you never run the project.
It evaluates small open-weight models (Gemma 4, Qwen 3.x) across three benchmarks with objective scoring: BigCodeBench for code generation graded by unit tests, MUSR for multi-step soft reasoning graded by multiple-choice accuracy, and BFCL for function calling and tool use graded by AST matching. BFCL runs on a fixed 1000-sample subset with a seed of 42 rather than the full benchmark, and GPQA was dropped because it was too slow to run systematically across quants on the available hardware (yrougy/llm-quant-bench).
The hardware context is deliberately narrow: two RTX 3060 12 GiB cards for larger models and a GTX 1070 8 GiB for smaller ones, with inference through llama-server. Narrow and disclosed beats broad and vague, because quantization results are only meaningful against a stated runtime and context configuration.
One detail to verify before reproducing the setup: the repository description mentions lm-evaluation-harness, while the README states that evaluations run through inspect_ai. Check the current code and methodology notes rather than assuming either, and pin the version you actually use.
Pitfalls that quietly invalidate a comparison
- Verdicts from one prompt. As the 1B example shows, a single question often fails to discriminate between quantizations at all. Use a scored set with enough items to separate signal from noise.
- Ignoring context length. KV cache grows with context and can dominate total memory at long sequences. A quant that fits at 4K tokens may not fit at 32K, and a comparison run at a different context length is a different experiment.
- Treating labels as a linear ranking. K-quants and I-quants spend precision differently, and the
_S/_M/_Lsuffixes change how much of the model stays high precision. Compare the specific files you intend to deploy. - Confusing perplexity with task accuracy. A lower perplexity score is not a guarantee of better tool calling or code correctness. Score the task you care about.
- Changing the backend mid-test. Moving from CPU to GPU offload, or changing the number of offloaded layers, alters speed and sometimes numerics. Hold it fixed and record it.
- Too few samples. The 1000-sample seeded subset used for BFCL in llm-quant-bench is a reasonable scale indicator for a task-specific evaluation. A dozen prompts is not.
What to record so someone else can reproduce it
A results table that can be checked should carry: model name and revision; quant file name and its source; runtime and version; backend and offload settings; context length; KV cache type; sampling parameters and seed; the evaluation set and its size; the scoring method; per-run scores plus the number of repeats; and the memory figures for download size, loaded size, and process RSS. Without the runtime and context fields, the accuracy numbers cannot be compared to anyone else’s.
Turning the numbers into a decision
If the constraint is memory or speed, the footprint measurements will usually settle the question quickly: drop a level until the model fits with headroom for the KV cache at your real context length, then verify quality on your own task. If the constraint is reliability on a specific job — function calling, structured output, code that must compile — the accuracy measurement should come from a small, deterministic set built from your own inputs, run at greedy or fixed sampling, and repeated enough times that the gap between quants exceeds the run-to-run spread.
When the gap between two quants falls inside that spread, the smaller file is the reasonable default, because you have not demonstrated a quality cost. When it does not, keep the higher-precision build for the tasks that showed the loss and use the smaller one elsewhere.
If you run a comparison of your own, sharing the model revision, runtime version, context length, and per-quant scores in the community is more useful than sharing a conclusion — those four fields are what let another reader reproduce or challenge the result.
FAQ
Can I compare quantization levels by asking the model one question?
Usually not. In the cited llama3.2:1b test, Q4_K_M, Q8_0, and FP16 all produced an incomplete answer to the same prompt, so the prompt did not discriminate between them. Use a scored set of tasks with enough items to separate a real difference from run-to-run variation.
Why is the loaded model larger than the file I downloaded?
The file holds the weights; the loaded model also needs KV cache, compute buffers, and other runtime overhead. The cited test reported 807 MB on disk versus 997 MB loaded for Q4_K_M, and roughly 0.94 GB of process RSS — three different figures that are not interchangeable.
Does a lower-bit quant always reduce task accuracy?
Quantization is lossy by construction, but the size of the loss depends on the model, the quant scheme, the context length, and the task. That is why projects such as llm-quant-bench measure accuracy per model rather than publishing a single universal rule. The practical answer is to measure it for your own model and workload.
Which context length should I use when comparing quants?
Use the context length you actually run in production. KV cache memory grows with context and can dominate total memory at long sequences, so a comparison at 4K tokens does not predict behavior at 32K. Record the value alongside your scores.