Q4_K_M vs Q5_K_M: VRAM, Quality and Speed

Q5_K_M uses about 17% more memory than Q4_K_M (5.69 vs 4.85 bits per weight). On Qwen 3 32B with an 8K context that is 24.6 GB versus 21.4 GB. Use Q5_K_M when it fits with the context you need, and Q4_K_M when it does not.

Updated October 14, 2026 ยท Sizes calculated from each model's config.json, see methodology

VRAM on popular models

Total memory with an 8K context and FP16 KV cache. The last column is the smallest standard VRAM size that holds each version.

ModelQ4_K_MQ5_K_MDifferenceSmallest tier
Llama 3.1 8B6.3 GB7.1 GB+0.8 GB8 GB / 8 GB
Qwen 3.5 9B6.4 GB7.3 GB+0.9 GB8 GB / 8 GB
Qwen 3 14B10.5 GB11.9 GB+1.4 GB12 GB / 16 GB
Mistral Small 3.1 24B15.6 GB18.0 GB+2.3 GB20 GB / 20 GB
Qwen 3.6 27B16.9 GB19.5 GB+2.6 GB20 GB / 24 GB
Gemma 4 31B19.8 GB22.8 GB+3.0 GB24 GB / 32 GB
Qwen 3 32B21.4 GB24.6 GB+3.2 GB24 GB / 32 GB
Qwen 3.6 35B-A3B21.0 GB24.4 GB+3.4 GB24 GB / 32 GB
Llama 3.3 70B43.2 GB50.1 GB+6.9 GB48 GB / 64 GB
Qwen 3.5 122B-A10B70.2 GB82.2 GB+11.9 GB80 GB / 96 GB

Largest model each VRAM size can run

The biggest model released since 2025 that fits fully at 8K context.

Context you can fit

Longer contexts need room for the KV cache. The longest context that fits fully at each format, with an FP16 cache:

ModelGPUQ4_K_MQ5_K_M
Qwen 3 14B16 GB37K27K
Qwen 3.6 27B24 GB98K56K
Qwen 3 32B24 GB12KDoes not fit
Gemma 4 31B32 GB139K100K
Llama 3.3 70B48 GB14KDoes not fit

Download size

File sizes in decimal GB, as Hugging Face shows them. Use the GGUF size calculator for any other model.

ModelQ4_K_MQ5_K_M
Llama 3.1 8B4.9 GB5.7 GB
Qwen 3 14B9.0 GB10.5 GB
Qwen 3.6 27B16.3 GB19.1 GB
Qwen 3 32B19.9 GB23.3 GB
Llama 3.3 70B42.8 GB50.2 GB

Quality

In llama.cpp's own reference measurements on a 7B model, Q4_K_M raises perplexity over FP16 by about 0.05 and Q5_K_M by about 0.014, so Q5_K_M removes roughly three quarters of the measurable loss. In everyday chat the difference is hard to notice; it shows up more in long reasoning chains, code and non-English text, and it matters more for small models than for large ones.

Speed

Text generation reads every weight once per token, so smaller formats generate faster on the same GPU. Estimated on an RTX 4090 24GB:

ModelQ4_K_MQ5_K_M
Llama 3.1 8B~117 tok/s~101 tok/s
Qwen 3 32B~31 tok/s~12 tok/s (partial CPU offload)

Verdict

Use Q5_K_M when it fits with the context you need, and Q4_K_M when it does not. The jump is about 17% more memory for a small but real quality gain. Running out of memory or offloading layers to the CPU costs far more than the quality difference, so never pick Q5_K_M if it forces offloading.

Frequently asked questions

Is Q5_K_M noticeably better than Q4_K_M?

Slightly. Benchmarks show a small, consistent improvement, but most people cannot tell the two apart in normal chat. The gap is larger on models under 8B.

Is Q5_K_M slower than Q4_K_M?

A little. Text generation is limited by memory bandwidth, so speed falls roughly in proportion to size: Q5_K_M is about 15% slower than Q4_K_M on the same GPU.

How much more VRAM does Q5_K_M need than Q4_K_M?

About 17% more for the weights (5.69 vs 4.85 bits per weight). For Qwen 3 32B with an 8K context that is 24.6 GB versus 21.4 GB.

Related