# Q4_K_M

- **Canonical URL:** https://getaimath.com/dictionary/q4-k-m/
- **Topics:** [Quantization & Model Compression](https://getaimath.com/dictionary/category/quantization-and-model-compression/)
- **Last updated:** 2026-11-25

## What is Q4_K_M?

**In one sentence:** Q4_K_M is a popular GGUF quantization level that uses about 4 to 5 bits per weight with smart mixing, giving a good balance of size and quality.

"Q4" means about 4-bit, "K" means it uses the k-quant method with grouped scaling, and "M" means medium, keeping some important layers at higher precision. It is often recommended as the default choice.

![Quantization: Vacuum-Packing a Giant AI into a Carry-On Bag — Simple cartoon showing a huge 16 GB AI model with long fussy decimals (3.14159265) squeezed by a vacuum-seal press into a compact 4 GB model with rounded numbers (3.1) that fits on a laptop.](https://getaimath.com/diagrams/quantization-and-model-compression.png)
*Napkin Diagram (Quantization & Model Compression): By rounding long fussy decimals to neat short numbers, quantization shrinks a model about 4× with only a small loss in smarts.*

## What is an example of Q4_K_M?

"mistral-7b.Q4_K_M.gguf" is about 4.4 GB, compared with about 14 GB in 16-bit.

## Why does Q4_K_M matter?

If you are unsure which GGUF to download, Q4_K_M is usually a safe pick.

## Related Concepts

- [NF4](https://getaimath.com/dictionary/nf4/): NF4, or 4-bit NormalFloat, is a 4-bit number format designed for neural network weights, used in QLoRA.
- [Q5_K_M](https://getaimath.com/dictionary/q5-k-m/): Q5_K_M is a GGUF quantization level using about 5 to 6 bits per weight, with higher quality than Q4 and a bit larger size.
- [HQQ](https://getaimath.com/dictionary/hqq/): HQQ, or Half-Quadratic Quantization, is a fast quantization method that does not need any calibration data.
- [Q8_0](https://getaimath.com/dictionary/q8-0/): Q8_0 is a GGUF quantization level that uses 8 bits per weight, giving quality almost identical to the original model.
- [bitsandbytes](https://getaimath.com/dictionary/bitsandbytes/): bitsandbytes is a popular Python library for loading and training models in 8-bit or 4-bit on NVIDIA GPUs.
- [IQ Quantization](https://getaimath.com/dictionary/iq-quantization/): IQ quantization is a family of GGUF formats, like IQ2 and IQ3, that use clever tricks to keep models usable at very low bit levels.

---
Source: The AI Math Dictionary (https://getaimath.com/dictionary/q4-k-m/)
