Skip to main content
株式会社オブライト
AI2026-07-247 min read

GGUF Quants: Q4_K_M vs Q5_K_M vs Q8_0 & IQ (2026)

Start with Q4_K_M; step up to Q5_K_M or Q6_K if you have VRAM headroom. This guide explains GGUF naming, the quality/speed/VRAM tradeoffs per level, IQ (imatrix) quants, and how to choose by task. Updated July 2026.


When in doubt, pick Q4_K_M and you won't go wrong. A 7–8B model fits in about 6 GB of VRAM, loses only ~1% on most benchmarks versus full precision (FP16), and runs in every tool — Ollama, LM Studio, and llama.cpp. If you have VRAM headroom (8–12 GB or more), stepping up to Q5_K_M or Q6_K gives noticeably better quality on multilingual text, structured output, and complex reasoning. This guide walks through how to read GGUF naming, the tradeoffs per level, how IQ (imatrix) quants differ, and how to choose by task.

For background on GGUF files and the tools that load them, see Ollama vs LM Studio; for estimating required VRAM, use the per-model requirements articles and the VRAM calculator.

What Quantization Is (in 30 seconds)

Quantization lowers the numerical precision of a model's weights to shrink file size and memory use. The original model stores each weight in 16 bits (FP16/BF16); compressing to 4 or 5 bits cuts memory to roughly a third or a quarter. The cost is a small quality loss from rounding. The essence of choosing a quant is knowing where the line is — how far you can compress before it stops being usable.

Reading GGUF Names — What Q4_K_M Means

A name like Q4_K_M packs three pieces of information. Break it apart and it becomes readable.

PartMeaning
Q4Weights stored mainly in 4 bits (higher number = higher precision, larger size)
_KK-quant method. Allocates bits per layer by importance — higher quality than legacy Q4_0 etc.
_MSize tier. S (Small) < M (Medium) < L (Large). M spends more bits on important layers (e.g. attention)

So Q4_K_M means "4-bit, K-quant method, Medium size." The Q4_0 / Q4_1 names without _K are legacy methods; today, choosing a K-quant (_K_M / _K_S) is almost always enough. The K_M vs K_S difference: K_M spends more bits on the quality-critical attention layers for a tiny size increase, so K_M is almost always worth it.

Quality / Speed / VRAM Cheat Sheet by Level

Using an 8B-class model as the example, here are rough figures per level (numbers vary by model size).

QuantApprox. bitsFile/VRAM for 8BQuality (vs FP16)Best for
Q8_08-bit~8.5 GBNear-losslessMax quality, evals, when VRAM is plentiful
Q6_K6-bit~6.6 GBPractically losslessHigh quality, ~12 GB GPUs
Q5_K_M5-bit~5.7 GBSlight lossBalanced; good for multilingual and coding
Q4_K_M4-bit~4.9 GB~1% lossThe universal first pick; runs in 6–8 GB VRAM
IQ4_XS4-bit (imatrix)~4.3 GB≈ Q4_K_MWhen you need it a bit smaller than Q4_K_M
Q3_K_M3-bit~4.0 GBVisible lossA compromise when VRAM is tight
Q2_K / IQ22-bit~3.2 GBLarge lossGetting it to run at all; niche use

The practical rule is simple: Q4_K_M for a 6–8 GB GPU, Q5_K_M–Q6_K for 8–12 GB, Q8_0 if you have room to spare. Below 3-bit is a compromise for "I just need it to run" — avoid it for daily use.

IQ Quants (imatrix) — I-quant vs K-quant

Names starting with IQ (e.g. IQ4_XS, IQ3_M) use an importance matrix (imatrix) during quantization. Where ordinary quantization treats all weights equally, imatrix measures which weights actually drive the output using real data, and keeps the important ones at higher precision.

- Upside: higher quality at the same bit count. IQ4_XS is often a drop-in replacement for Q4_K_M, saving ~250 MB on an 8B model
- Caveat 1 (speed): I-quants are heavier to decode and can be slower than K-quants on CPU or Apple Silicon. On NVIDIA GPUs the gap is small
- Caveat 2 (quality): if you quantize yourself, imatrix calibration is essential; I-quants without imatrix can degrade noticeably. If you use a pre-built GGUF (imatrix already applied), you don't need to worry about this

In short: IQ quants if you want it smaller and high-quality on an NVIDIA GPU; K-quants (Q4_K_M etc.) if you prioritize speed on CPU/Mac.

How to Choose by Task and Hardware

SituationRecommendationWhy
Just get it running (first try)Q4_K_MRuns everywhere with small quality loss — the universal answer
Coding / complex reasoningQ5_K_M or higherThe Q4→Q5 jump is especially noticeable for code and reasoning
Better multilingual / non-English qualityQ5_K_M / Q6_KHelps on tasks that expose quantization error
Only 4–6 GB VRAMQ4_K_M / IQ4_XSBest that fits; IQ4_XS goes a bit smaller
On a Mac (Apple Silicon)Q4_K_M / Q5_K_M (K-quant)I-quants tend to be slow on Mac; MLX builds are also an option
Evaluation / comparison baselineQ8_0Near-lossless when you want to rule out quantization effects

Degradation Hits Tasks Differently

Quantization doesn't hurt every task equally. Testing through early 2026 confirms that commonsense reasoning and general chat are resilient (barely affected even at 4-bit), while arithmetic and strict reasoning hit a quality cliff below 4-bit. For coding and long reasoning chains, the single step from Q4 to Q5 matters most. Conversely, for summarization, chat, or classification, Q4_K_M is usually plenty.

This "different tasks need different precision" property also informs model choice: whether a small model at high-precision quant beats a large model at low-precision depends on the task. See How to Choose a Local LLM (as of June 2026) for more.

FAQ

Which one should I just pick?

When in doubt, Q4_K_M. It fits in 6–8 GB of VRAM, loses about 1% on most tasks, and runs in every tool. If your GPU has 8–12 GB to spare, step up to Q5_K_M or Q6_K for better coding and multilingual quality. If you have ample VRAM and want maximum quality, choose Q8_0.

What's the difference between Q4_K_M and Q4_0?

Q4_0 is a legacy quant that compresses all layers uniformly to 4-bit. Q4_K_M uses the K-quant method, allocating more bits to quality-critical layers (like attention), so it's higher quality at the same 4-bit level. Today, a K-quant (with _K) is almost always the right choice, and there's rarely a reason to pick Q4_0.

Are IQ quants (like IQ4_XS) always better than Q4_K_M?

They're often better on quality and size, but not always. I-quants are heavier to decode and can be slower than K-quants on CPU or Apple Silicon. Use IQ quants when you want it smaller and high-quality on an NVIDIA GPU; use K-quants like Q4_K_M when you prioritize speed on CPU/Mac.

Can I compress all the way down to 2-bit or 3-bit?

It works for narrow use cases but isn't recommended for daily use. Below 3-bit, quality drops visibly, and arithmetic and strict reasoning in particular tend to fall off a cliff below 4-bit. Treat it as a compromise for degradation-resistant tasks (summarization, chat) when you truly lack VRAM.

Should I choose K_M or K_S?

K_M by default. K_M (Medium) spends more bits on quality-critical attention layers, while K_S (Small) compresses uniformly. The size increase for K_M is small, so it's almost always worth it. Only consider K_S when VRAM is so tight that K_M won't fit.

Feel free to contact us

Contact Us