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
How we test
On this page
  1. What GGUF quantization does to a model
  2. Which GGUF quant should I download?
  3. Quant names decoded
  4. Our CPU test: smaller is not faster
  5. Our GPU test
  6. How much quality do you lose?
  7. Bigger model at a lower quant, or smaller model at a higher quant?
  8. GGUF, GGML, safetensors and other formats
  9. Make your own quant
  10. 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:

File size and bits per weight in the load logR-ci1-u24-nocuda-base-q4_k_m · u24-nocuda · KoboldCpp 1.124.2 · base-q4_k_m/stdout.txt lines 22-23 (F70)
print_info: file type   = (guessed) unknown, may not work1print_info: file size   = 462.96 MiB (6.16 BPW) 2
  1. print_info: file type = (guessed) unknown, may not work: Harmless here: this line printed on every quant we ran, and they all worked.
  2. 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:

Download size of Llama 3.1 8B Instruct by quantbartowski/Meta-Llama-3.1-8B-Instruct-GGUF, file sizes read from Hugging Face on 14 Nov 2026
  • Q2_K3.0 GiB
  • IQ3_M3.5 GiB
  • Q3_K_M3.7 GiB
  • IQ4_XS4.1 GiB
  • Q4_K_M4.6 GiB
  • Q5_K_M5.3 GiB
  • Q6_K6.1 GiB
  • Q8_08.0 GiB
Data
ItemValue (GiB)
Q2_K3.0
IQ3_M3.5
Q3_K_M3.7
IQ4_XS4.1
Q4_K_M4.6
Q5_K_M5.3
Q6_K6.1
Q8_08.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.

Which quant to pick, Llama 3.1 8B Instruct
Q8_08.517.95+74%Small models, or you have memory to spare
Q6_K6.576.14+34%The whole model fits with room to spare
Q5_K_M5.715.34+17%The whole model fits with room to spare
Q4_K_M4.904.580%The default
IQ4_XS4.434.14-10%A tight fit, for example a large model on a smaller card
Q3_K_M or IQ3_M4.00 or 3.773.74 or 3.52-18% or -23%Only to fit a much better model
Q2_K3.172.96-35%A last resort
F16 or BF1616(none at 8B here)about 3.3 timesSource for converting, or tiny models

Check it against your own card:

1. Model

Layers, KV heads and tensor sizes were read from the real file headers on Hugging Face. File size shown is the download size.

2. Your hardware
Reserve and safety margin

Defaults: 512 MB for the desktop on Windows and Linux (0 if the card drives no display), and KoboldCpp's autofit padding of 1024 MB. What this assumes

3. Context and cache

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.

calculated from the model's tensor sizes; compute buffers are estimates calibrated on two measured models (F36, F42).

GPU memory 6.06 GB of 10.5 GB usable of 12 GB
010.5 GB usable of 12 GB
  • Model weights 3.90 GB
  • KV cache 2.03 GB
  • Compute buffer 132 MB
  • Free 4.44 GB
System RAM 959 MB of 29.0 GB usable of 32 GB
029.0 GB usable of 32 GB
  • Weights on CPU 693 MB
  • Host compute buffer 267 MB
  • Free 28.1 GB

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

Weights 4.58 GB · 32 layers · 8 KV heads × 128 · KV cache 2.03 GB

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

Long-prompt processing: Q4_K_M against Q8_0CPU lab, 0.5B model, 1,650-token prompt, KoboldCpp 1.124.2, 13 Nov 2026 (relative differences only)CPU lab, 0.5B model: relative differences only
  • Ubuntu 24.04: Q4_K_M111.2 tok/s
  • Ubuntu 24.04: Q8_0132.5 tok/s
  • Windows 2022: Q4_K_M133.2 tok/s
  • Windows 2022: Q8_0173.3 tok/s
  • Windows 2025: Q4_K_M113.4 tok/s
  • Windows 2025: Q8_0152.5 tok/s
  • Linux VM: Q4_K_M112.9 tok/s
  • Linux VM: Q8_0136.0 tok/s
Data
ItemValue (tok/s)
Ubuntu 24.04: Q4_K_M111.2
Ubuntu 24.04: Q8_0132.5
Windows 2022: Q4_K_M133.2
Windows 2022: Q8_0173.3
Windows 2025: Q4_K_M113.4
Windows 2025: Q8_0152.5
Linux VM: Q4_K_M112.9
Linux VM: Q8_0136.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

Generation speed by quantgha-u24 (Ubuntu 24.04, 4 vCPU, no GPU), 0.5B model, KoboldCpp 1.124.2, 13 Nov 2026 (CPU lab, relative differences only)CPU lab, 0.5B model: relative differences only
  • Q2_K46.3 tok/s
  • Q4_K_M46.3 tok/s
  • Q8_045.3 tok/s
  • F1630.3 tok/s
Data
ItemValue (tok/s)
Q2_K46.3
Q4_K_M46.3
Q8_045.3
F1630.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

Q2_K46.3 tok/s
0 tokens0.0 sR-ci1-u24-nocuda-base-q2_k
Q4_K_M46.3 tok/s
0 tokens0.0 sR-ci1-u24-nocuda-base-q4_k_m
Q8_045.3 tok/s
0 tokens0.0 sR-ci1-u24-nocuda-base-q8_0
F1630.3 tok/s
0 tokens0.0 sR-ci1-u24-nocuda-base-fp16
Reading speed is about 5 tok/s. Token pacing is exact; token boundaries are approximate unless the lane lists tokenizer output.

Memory use follows the file: peak RAM was about the file size plus a fixed overhead F14.

File size and peak RAM by quant, 0.5B model, 4K context, Ubuntu 24.04
Q2_K396613
Q4_K_M463686
Q8_0644861
F161,2081,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

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.