GGUF quants explained: which file to download and what you give up
Download Q4_K_M unless you have spare memory: it is the usual balance of size and quality. If the whole model still fits in VRAM at Q5_K_M or Q6_K, take the bigger file; for small models Q8_0 is affordable. Memory use is roughly the file size plus context, and in our CPU tests the smaller Q2_K and Q4_K_M files were not faster at generating than Q8_0.
Checked against KoboldCpp 1.124.2 · updated 13 Nov 2026
- lab-lnx: Linux test VM · 4 vCPU · 15 GB · no GPU
- gha-w25: Windows Server 2025 test machine · 4 vCPU · 16 GB · no GPU
- gha-w22: Windows Server 2022 test machine · 4 vCPU · 16 GB · no GPU
- gha-u24: Ubuntu 24.04 test machine · 4 vCPU · 16 GB · no GPU
On this page
- What GGUF quantization does to a model
- Which GGUF quant should I download?
- Quant names decoded
- Our CPU test: smaller is not faster
- Our GPU test
- How much quality do you lose?
- Bigger model at a lower quant, or smaller model at a higher quant?
- GGUF, GGML, safetensors and other formats
- Make your own quant
- KV cache quantization is a different setting
What GGUF quantization does to a model
A model is billions of numbers, called weights. Stored in full they take 16 bits each. Quantization stores them with fewer bits, in small blocks that share a scale, so the file and the memory it needs shrink. The price is a small loss of precision, which shows up as slightly worse answers, and the loss grows as the bit count falls.
File size is about the number of weights times the bits per weight (BPW) divided by 8. Small models carry more bits than the name suggests, because some tensors stay at higher precision: a Q4_K_M file cost 4.90 BPW on Llama 3.1 8B and 6.24 on a 0.5B model F70. KoboldCpp prints the figure when it loads a file:
print_info: file type = (guessed) unknown, may not work1print_info: file size = 462.96 MiB (6.16 BPW) 2- print_info: file type = (guessed) unknown, may not work: Harmless here: this line printed on every quant we ran, and they all worked.
- print_info: file size = 462.96 MiB (6.16 BPW): The file size and the bits per weight of this 0.5B model.
This is what you download for Llama 3.1 8B at each quant, from the real Hugging Face files:
Data
| Item | Value (GiB) |
|---|---|
| Q2_K | 3.0 |
| IQ3_M | 3.5 |
| Q3_K_M | 3.7 |
| IQ4_XS | 4.1 |
| Q4_K_M | 4.6 |
| Q5_K_M | 5.3 |
| Q6_K | 6.1 |
| Q8_0 | 8.0 |
Download CSV · Results: F70
Which GGUF quant should I download?
The bits per weight below are from the real 8B files (about the same for 12B models, higher for small ones). We have not measured the quality of each step, so the “Use when” column is the common advice, which the calculator turns into a fit check for your card.
| Q8_0 | 8.51 | 7.95 | +74% | Small models, or you have memory to spare |
| Q6_K | 6.57 | 6.14 | +34% | The whole model fits with room to spare |
| Q5_K_M | 5.71 | 5.34 | +17% | The whole model fits with room to spare |
| Q4_K_M | 4.90 | 4.58 | 0% | The default |
| IQ4_XS | 4.43 | 4.14 | -10% | A tight fit, for example a large model on a smaller card |
| Q3_K_M or IQ3_M | 4.00 or 3.77 | 3.74 or 3.52 | -18% or -23% | Only to fit a much better model |
| Q2_K | 3.17 | 2.96 | -35% | A last resort |
| F16 or BF16 | 16 | (none at 8B here) | about 3.3 times | Source for converting, or tiny models |
Check it against your own card:
Llama 3.1 8B Instruct Q4_K_M · 16K context · KV f16
Fits completely
All 32 layers fit on the GPU, with the context and buffers.
Launch values
- --gpulayers 33
- --contextsize 16384
KoboldCpp counts one extra layer for the output layer, so --gpulayers 33 puts all 32 repeating layers on the GPU (F65). Leaving --gpulayers on auto (-1) lets autofit choose; it keeps a 1 GB padding and may offload fewer layers than this calculation. GPU layers guide
koboldcpp --model Meta-Llama-3.1-8B-Instruct-Q4_K_M.gguf --gpulayers 33 --contextsize 16384
Quant names decoded
- Q4, Q5, Q6, Q8
- About how many bits per weight (4 to 8)
- _K
- A k-quant: weights in blocks, each with its own scale
- _S, _M, _L
- Small, medium, large: M and L keep some tensors at higher precision
- IQ
- An i-quant, made with an importance matrix; smaller at the same quality, built for tight fits
- _0, _1
- Older, simpler formats (for example Q8_0)
- F16, BF16
- Not quantised: 16 bits per weight
- MXFP4
- A 4-bit format that some models, such as GPT-OSS, are published in
- imatrix, UD, dynamic
- Extra tuning of which tensors get more bits; some need a recent KoboldCpp build to load
These are summaries; the exact block layouts are in the llama.cpp quantization documentation.
Our CPU test: smaller is not faster
Data
| Item | Value (tok/s) |
|---|---|
| Ubuntu 24.04: Q4_K_M | 111.2 |
| Ubuntu 24.04: Q8_0 | 132.5 |
| Windows 2022: Q4_K_M | 133.2 |
| Windows 2022: Q8_0 | 173.3 |
| Windows 2025: Q4_K_M | 113.4 |
| Windows 2025: Q8_0 | 152.5 |
| Linux VM: Q4_K_M | 112.9 |
| Linux VM: Q8_0 | 136.0 |
Download CSV · Results: R-ci1-u24-nocuda-base-q4_k_m, R-ci1-u24-nocuda-base-q8_0, R-ci1-w22-nocuda-base-q4_k_m, R-ci1-w22-nocuda-base-q8_0, R-ci1-w25-nocuda-base-q4_k_m, R-ci1-w25-nocuda-base-q8_0, R-run1-lnx-nocuda-base-q4_k_m, R-run1-lnx-nocuda-base-q8_0
Data
| Item | Value (tok/s) |
|---|---|
| Q2_K | 46.3 |
| Q4_K_M | 46.3 |
| Q8_0 | 45.3 |
| F16 | 30.3 |
Download CSV · Results: R-ci1-u24-nocuda-base-q2_k, R-ci1-u24-nocuda-base-q4_k_m, R-ci1-u24-nocuda-base-q8_0, R-ci1-u24-nocuda-base-fp16
Memory use follows the file: peak RAM was about the file size plus a fixed overhead F14.
| Q2_K | 396 | 613 |
| Q4_K_M | 463 | 686 |
| Q8_0 | 644 | 861 |
| F16 | 1,208 | 1,434 |
Why would a bigger quant not be slower? Our interpretation, not something we measured: generation on a CPU is limited by how fast the weights can be read from memory, but the smaller formats also need more arithmetic to unpack each weight, and on these machines the two roughly cancel. Do not assume the same on a GPU, where fitting more layers into VRAM is what matters. The benchmark mode shows the same pattern at full context: 97.8 tokens per second processing and 16.3 generating for Q4_K_M, 121.9 and 16.1 for Q8_0 on our Linux VM F16.
Our GPU test
We have not yet run the quant comparison on a physical GPU, so there is no GPU table here. When we have, it will cover Q4_K_M to Q8_0 on an 8B model with every layer on the card: file size, VRAM after load, generation and prompt speed. Until then the rule is the one from memory: a quant that lets every layer fit on the GPU beats a larger one that spills layers into RAM (GPU layers).
How much quality do you lose?
We have not measured it. Five test prompts would be too small a sample for a claim, and we do not publish a percentage. The llama.cpp project publishes perplexity comparisons across quants for its reference models; read those for a larger measurement, and treat Q4_K_M as the usual balance and Q2_K as the point where answers visibly degrade, which users report.
Bigger model at a lower quant, or smaller model at a higher quant?
We have not compared the two on the same prompts. The common advice from users is that a larger model at Q4_K_M usually beats a smaller one at Q8_0 of a similar file size, as long as the quant stays at 4 bits or above. A Mistral Nemo 12B at Q4_K_M is 6.96 GiB and Llama 3.1 8B at Q8_0 is 7.95 GiB: the calculator shows which fits your card and context.
GGUF, GGML, safetensors and other formats
KoboldCpp’s main format is GGUF, supported since 1.41. Legacy GGML .bin files for LLaMA (ggml, ggmf, ggjt), GPT-J, GPT-2, GPT-NeoX, MPT and RWKV still load through older built-in libraries, but newer features may not work with them. A text model that only exists as safetensors or PyTorch must be converted to GGUF and quantised first (Hugging Face guide when it is published). GPTQ, AWQ and EXL2 are formats for other programs and KoboldCpp does not load them as text models (per its README; we did not try one). ONNX is not supported. Image models may be .safetensors or .gguf.
Make your own quant
Convert a Hugging Face model to GGUF with llama.cpp’s convert_hf_to_gguf.py, then quantise it with quantize_gguf from koboldcpp_tools.zip, which is attached to the kcpp_tools_rolling release on the KoboldCpp GitHub page. The full steps will be on the Hugging Face page; we have not tested them yet.
KV cache quantization is a different setting
KV-cache data type: f16 (default), bf16, q8_0, q5_1 or q4_0. Quantizing saves memory; without flash attention only K is quantized. Old numeric values 0-3 still accepted.Default f16Launcher Context tab: Quantize KV Cache (slider)Since v1.67All details compresses the context memory (the KV cache), not the model file. On our small model at 32K of context, peak RAM went from 976 MB to 794 MB (q8_0) and 698 MB (q4_0) F10. See context size.
Frequently asked questions
Q4_K_M or Q5_K_M: which should I use?
Q4_K_M is the default pick. Take Q5_K_M or Q6_K when the whole model still fits in VRAM with room for your context, because the bigger file keeps more of the original quality. If the bigger one makes you spill layers into system RAM, stay with Q4_K_M: a model that fits entirely is usually better than a larger quant that does not.
Is Q8_0 worth it?
For small models, often yes: the file is small anyway. For 8B and above it costs about 8.5 bits per weight, nearly twice a Q4_K_M, and you usually get more from a bigger model at Q4_K_M. We have not measured quality differences, so this follows the common advice.
Are smaller quants faster?
Not on a CPU in our tests. Q2_K and Q4_K_M generated at the same speed as Q8_0 (46.3, 46.3 and 45.3 tokens per second), and Q8_0 processed long prompts faster. Smaller files save memory, which is what lets more layers fit on a GPU. We have not measured a GPU yet.
What does K_M mean in a GGUF file name?
K means a k-quant, which stores the weights in blocks with their own scales. S, M and L are size variants: M and L keep some important tensors at higher precision than S, so the file is a little bigger and a little better.
Is IQ4_XS better than Q4_K_M?
IQ4_XS is smaller than Q4_K_M, about 4.4 bits per weight against 4.9 on an 8B model in our measurements. It is for tight fits, for example a big model on a 16 GB card. We have not measured the quality gap.
What is the difference between GGUF and GGML?
GGML was the older file format for these models and GGUF replaced it: KoboldCpp has used GGUF as its main format since 1.41. KoboldCpp can still load old GGML .bin files for a few model families through older built-in libraries, but newer features may not work with them.
Can KoboldCpp load GPTQ, EXL2 or safetensors models?
Not text models in those formats: they are made for other programs. KoboldCpp loads GGUF. A text model in safetensors or PyTorch form has to be converted to GGUF and then quantised first. Image models are the exception: they can be .safetensors or .gguf.