Q4_K_M vs Q6_K vs FP8: the quality you lose and what fits your GPU

Build Guides

Q4_K_M vs Q6_K vs FP8: the quality you lose and what fits your GPU

A 3D render of grey and orange blocks stacked in steps to form a pyramid
Photo by Santhosh Kanthala on Pexels

BF16, FP8, MXFP8, NVFP4, INT4 and a dozen GGUF flavours, compared. What published benchmarks say about quality loss, and how to pick the file for your GPU or Mac.

In this article
  1. What quantization does
  2. Q4_K_M vs Q6_K: the published numbers
  3. Which file fits your GPU
  4. The formats, one by one
  5. Cheat sheet

Open a model repo today and you'll see a menu: BF16, FP8, NVFP4, then a separate GGUF repo with Q4_K_M, Q5_K_M, Q6_K, Q8_0 and IQ-something. The question everyone asks is the same: how much quality do I lose, and which one fits my GPU?

This guide covers the formats and the published numbers. For the memory math itself, see how much VRAM you need.

What quantization does

A model is billions of numbers (weights). Quantization stores them in fewer bits.

llama.cpp's quantize docs put it plainly: it "shrinks the model's size and can speed up inference", but "may introduce some accuracy loss". That loss is usually measured with perplexity (lower is better) or KL divergence.

Most formats group weights into blocks that share a scale factor. That's why "4-bit" files are usually a bit more than 4 bits per weight.

Q4_K_M vs Q6_K: the published numbers

When llama.cpp added its "k-quants" in PR #1684 (merged June 5, 2023), it published perplexity on wikitext for the original LLaMA 7B and 13B:

Format 7B perplexity vs FP16 7B file 13B perplexity vs FP16
F16 5.9066 - 13.0G 5.2543 -
Q6_K 5.9110 +0.07% 5.15G 5.2568 +0.05%
Q5_K_M 5.9208 +0.24% 4.45G 5.2638 +0.18%
Q4_K_M 5.9601 +0.91% 3.80G 5.3002 +0.87%
Q3_K_M 6.1503 +4.1% 3.06G 5.4498 +3.7%
Q2_K 6.7764 +14.7% 2.67G 5.8545 +11.4%

Percentages are our arithmetic from the PR's perplexity figures.

The PR's author summed it up: the 6-bit result "is within 0.1% or better from the original fp16 model". Quality falls off slowly down to 4-bit, then quickly below it.

Two caveats:

  • These are 2023 models and a 2023 test. Newer models and newer quant methods (importance matrices, "IQ" types) can behave differently.
  • Perplexity is an average. Code, math and long tool-calling chains can be more sensitive than prose. Test the quant on your own tasks.

File sizes on a current model

llama.cpp's current README lists these for Llama 3.1 8B (checked Oct 22, 2026):

Format Bits per weight Size
F16 16.00 14.96 GiB
Q8_0 8.50 7.95 GiB
Q6_K 6.56 6.14 GiB
Q5_K_M 5.70 5.33 GiB
Q4_K_M 4.89 4.58 GiB
IQ4_XS 4.46 4.17 GiB

Which file fits your GPU

The weights are only part of what you need. Context (the KV cache) and runtime overhead come on top, and our VRAM guide shows how to budget for them.

A simple way to pick:

  1. Find the largest quant whose file fits in your VRAM (or a Mac's unified memory) with room left for context.
  2. Prefer Q6_K or Q5_K_M if they fit. Per the numbers above, they're very close to FP16.
  3. Drop to Q4_K_M if they don't. It's the usual sweet spot between size and quality.
  4. Go below 4-bit only to fit a bigger model. In the 2023 PR's table, LLaMA 13B at Q3_K_M (5.88G, perplexity 5.4498) beat 7B at Q6_K (5.15G, 5.9110). Test it on your tasks.
  5. Still doesn't fit? Partial offloading to system RAM works, but it's slower. See running a model bigger than your RAM.

If you're on a Mac, unified memory changes the math. To get a GGUF running, start with Ollama for beginners.

The formats, one by one

FP16 and BF16 (16-bit)

Most models are released in one of these. Both use 16 bits per weight.

These are "full quality" for inference. Treat them as the baseline, not something you run on a laptop.

FP8 (8-bit float)

FP8 has two encodings, defined in the FP8 formats paper: E4M3 (4 exponent, 3 mantissa bits, max value 448) and E5M2 (5 exponent, 2 mantissa bits). The paper recommends E4M3 for weights and activations.

It halves memory versus 16-bit. NVIDIA says FP8 is supported on its Hopper and Blackwell GPUs. DeepSeek's V4.1 Flash, for example, is tagged FP8 on Hugging Face. See our DeepSeek V4.1 Flash piece.

MXFP8 and MXFP4 (microscaling)

The OCP Microscaling (MX) spec (v1.0, Sept 2023) groups 32 values into a block. All 32 share one 8-bit scale (E8M0, a power of two).

  • MXFP8: FP8 elements (E4M3 or E5M2) plus the shared scale.
  • MXFP4: 4-bit (E2M1) elements plus the shared scale. GGUF supports MXFP4 too, per Hugging Face's GGUF docs.

MiniMax M3.1 Flash is a real-world mix. Its config file lists mxfp8 with blocks of 32, and NVFP4 for the mixture-of-experts layers (checked Oct 22, 2026). More in our MiniMax M3.1 Flash piece.

NVFP4 (NVIDIA 4-bit float)

NVIDIA's NVFP4 (introduced June 24, 2025, for Blackwell GPUs):

  • uses 4-bit E2M1 values, with an FP8 (E4M3) scale per 16-value block and an FP32 scale per tensor
  • works out to about 4.5 bits per value
  • is about 3.5× smaller than FP16, per NVIDIA

NVIDIA reported 1% or less accuracy loss versus FP8 on DeepSeek-R1-0528 in that June 2025 post. For Nemotron 3.5 Super, NVIDIA says its NVFP4 checkpoint keeps 99.62% median accuracy versus BF16. See Nemotron 3.5 explained.

INT4 (AWQ, GPTQ)

INT4 stores weights as 4-bit integers, usually in groups of 128 with a scale per group, while activations stay at 16-bit ("W4A16").

The AWQ paper shows how small the gap can be on big models. On Llama-2-70B, WikiText-2 perplexity went from 3.32 (FP16) to 3.41 with AWQ INT4. You'll see AWQ and GPTQ repos used with vLLM and similar servers.

GGUF (the local format)

GGUF isn't a number format. It's a file format. Per Hugging Face's docs, it packs the tensors plus metadata, and it's used by llama.cpp, LM Studio, GPT4All and Ollama. Inside, each tensor can use a different quant type:

  • K-quants (Q2_K to Q6_K): blocks with their own scales. Q4_K is 4.5 bits per weight and Q6_K is 6.5625, per the docs.
  • The _S / _M / _L suffix is the mix. In the original PR, Q4_K_M used Q6_K for half of two sensitive tensor types, and Q4_K for the rest.
  • IQ types (IQ4_XS, IQ3_S, IQ2_XXS…) use an importance matrix to decide what to protect. They're useful below 4 bits.
  • Q8_0, Q4_0 and friends are the older "legacy" types, per the docs. Q8_0 is still the common 8-bit option, at 8.50 bits per weight in the table above.

Cheat sheet

You have Look for
Mac, or a gaming GPU with Ollama, LM Studio or llama.cpp GGUF: Q6_K or Q5_K_M if it fits, else Q4_K_M
A Mac with MLX The MLX 4-, 6- or 8-bit repos of the model
NVIDIA Hopper (H100/H200) with vLLM or SGLang FP8 checkpoint
NVIDIA Blackwell NVFP4 or FP8 checkpoint
Fine-tuning or max quality BF16

Bottom line: 6-bit is close to free, and 4-bit is a small, measurable hit. Below 4-bit, only go there to fit a bigger model, and test it on your real prompts first.

FAQ

Is Q4_K_M good enough?

For many uses, yes. In llama.cpp's k-quant tests on LLaMA 7B and 13B (June 2023), Q4_K_M was under 1% worse than FP16 on perplexity. Perplexity isn't everything, though: test it on your own tasks, especially code and math.

Q4_K_M vs Q6_K: which should I pick?

Pick Q6_K if it fits with headroom for your context. It measured within 0.1% of FP16 in those tests. Pick Q4_K_M if Q6_K doesn't fit, or if speed matters more. It's about a quarter smaller.

What's the difference between FP16 and BF16?

Both use 16 bits. BF16 keeps FP32's 8 exponent bits, so it has the same range as FP32 with less precision. FP16 has 5 exponent bits and 10 mantissa bits: more precision, smaller range.

Can I run an FP8 or NVFP4 checkpoint on my Mac?

Those checkpoints target NVIDIA GPU servers (NVIDIA says FP8 runs on Hopper and Blackwell, and NVFP4 on Blackwell). On a Mac, look for a GGUF or MLX version of the same model.

What does the K and M in Q4_K_M mean?

K is llama.cpp's 'k-quant' family. The S/M/L suffix is the mix size: Q4_K_M keeps some sensitive tensors at higher precision than Q4_K_S, so it's a little bigger and a little more accurate.

Sources

  1. llama.cpp, quantize README (Llama 3.1 8B table)https://github.com/ggml-org/llama.cpp/blob/master/tools/quantize/README.md
  2. llama.cpp PR #1684, k-quants (merged June 5, 2023)https://github.com/ggml-org/llama.cpp/pull/1684
  3. Hugging Face docs, GGUFhttps://huggingface.co/docs/hub/gguf
  4. Wikipedia, Half-precision floating-point formathttps://en.wikipedia.org/wiki/Half-precision_floating-point_format
  5. Wikipedia, bfloat16 floating-point formathttps://en.wikipedia.org/wiki/Bfloat16_floating-point_format
  6. Google Cloud docs, bfloat16https://cloud.google.com/tpu/docs/bfloat16
  7. Micikevicius et al., FP8 Formats for Deep Learning (arXiv 2209.05433)https://arxiv.org/abs/2209.05433
  8. Open Compute Project, OCP Microscaling Formats (MX) v1.0 spec (Sept 2023)https://www.opencompute.org/documents/ocp-microscaling-formats-mx-v1-0-spec-final-pdf
  9. NVIDIA Technical Blog, Introducing NVFP4 (June 24, 2025)https://developer.nvidia.com/blog/introducing-nvfp4-for-efficient-and-accurate-low-precision-inference/
  10. Lin et al., AWQ: Activation-aware Weight Quantization (arXiv 2306.00978)https://arxiv.org/abs/2306.00978
  11. MiniMax-M3.1-Flash config.json (Hugging Face)https://huggingface.co/MiniMaxAI/MiniMax-M3.1-Flash/blob/main/config.json
Matching resources

Matching resources

Newsletter

The Codema publication. Consent is required. You are not subscribed until you confirm from the email, and nothing is stored if email delivery is not connected.