Every local model you download comes in a dozen versions with names like Q4_K_M and Q6_K, and the choice decides both whether it fits in your machine and how good it is. The naming looks cryptic but encodes exactly three things, and once you can read it the decision takes seconds.

What the name actually encodes

Take Q4_K_M apart:

  • Q4 — weights are stored at roughly four bits each, rather than the sixteen bits the model was trained at.
  • K — the k-quant method. Instead of compressing every weight equally, it keeps the tensors that matter most at higher precision. This is why a modern Q4 is far better than an old uniform four-bit quantisation.
  • M — the medium variant. S is smaller and slightly worse, L larger and slightly better.

You will also see Q8_0, where the 0 denotes an older, simpler scheme, and IQ2 or IQ3, which use an importance matrix to stay usable at very low bit counts.

What each level costs in memory

Approximate memory for the weights, per billion parameters:

LevelPer 1B paramsAn 8B modelPractical read
Q2_K~0.4 GB~3 GBLast resort; quality drop is visible
Q3_K_M~0.5 GB~4 GBOnly when Q4 will not fit
Q4_K_M~0.6 GB~5 GBThe default. Start here.
Q5_K_M~0.75 GB~6 GBSmall gain if the memory is spare
Q6_K~0.85 GB~7 GBDiminishing returns begin
Q8_0~1.1 GB~9 GBNear-lossless; rarely worth it
FP16~2 GB~16 GBUnquantised; for fine-tuning, not inference

These are the weights only. Add a few GB for context and the operating system before deciding what fits — the full arithmetic is in how much VRAM you need to run a local LLM.

Where quality actually falls away

The intuition that halving the bits halves the quality is wrong, and usefully so. Between Q8 and Q4 the difference on most tasks is small — noticeable on careful side-by-side comparison, rarely decisive in ordinary use. Below Q4 it changes character: instruction-following gets less reliable, long outputs drift, and arithmetic and code degrade first.

Two things degrade earlier than general chat, which is worth knowing if that is your workload:

  • Code generation, where a single wrong token breaks the output rather than merely reading worse.
  • Long-context recall, where the model has to hold precise details from far back in the prompt.

If either is your main use, favour a higher quantisation of a smaller model over the reverse.

The rule that matters most

At a fixed memory budget, a larger model at Q4 usually beats a smaller model at Q8.

At roughly 9 GB you could run an 8B model at Q8 or a 14B at Q4. The 14B will generally be better at reasoning, instruction-following and world knowledge, and that gap is wider than what Q8 recovers over Q4 on the smaller model.

The exception is the code and long-context case above, and the other exception is when you are close to the edge of your memory: a model that just fits with no room for context is not actually usable.

Checking it yourself in ten minutes

None of this substitutes for testing on your own task. Pull two quantisations and run the same real prompt through both:

# the same model at two levels
ollama pull llama3.1:8b-instruct-q4_K_M
ollama pull llama3.1:8b-instruct-q8_0

ollama run llama3.1:8b-instruct-q4_K_M "<your real prompt>"
ollama run llama3.1:8b-instruct-q8_0  "<your real prompt>"

If you cannot tell them apart on work you actually care about, use the smaller one and spend the memory elsewhere. That is the whole decision.

Where to go next

Written by the WritePures newsroom. Spotted something that needs updating? Tell our editors.