NVFP4 vs MXFP4 vs GGUF Q4_K_M: same 4 bits, three ways to share a scale

An FP4 (E2M1) weight can only be one of 15 numbers. NVFP4, MXFP4 and llama.cpp's Q4_K_M all survive that by giving each small block of weights its own scale, its own ruler. Blocks of 16 with an FP8 scale (4.5 bits), blocks of 32 with a power-of-two scale (4.25 bits), or super-blocks of 256 with 6-bit scales and mins (about 4.9 bits). A worked rounding example, independent quality numbers, which hardware runs FP4 natively, and which file to download.

A 4-bit float has sixteen codes. In the FP4 format everyone now uses, called E2M1, they mean 0, 0.5, 1, 1.5, 2, 3, 4 and 6, plus the same with a minus sign. Plus zero and minus zero are both zero, so that’s 15 different numbers (OCP MX spec v1.0, Table 5; an ETH Zurich paper this autumn calls it “an alphabet of fifteen values with gaps”).

No model’s weights look like that. The trick that makes 4-bit models work is the same in all three formats this post compares: a small block of weights shares one scale, its own ruler. Stretch the ruler and the same 15 notches can measure tiny weights or big ones. NVFP4, MXFP4 and GGUF’s Q4_K_M differ in how big the block is and how precise the ruler is.

Nothing here was run or benchmarked by us. Every number is quoted from a linked source, or it’s arithmetic shown on the page. If GGUF itself is new to you, start with GGUF explained: inside a 4.9 GB model file.

The three formats side by side

MXFP4 NVFP4 Q4_K (in Q4_K_M)
Who Open Compute Project MX spec v1.0 (2023) NVIDIA, Blackwell (2025) llama.cpp k-quants (2023)
Element FP4 E2M1 (uneven notches) FP4 E2M1 4-bit integer 0..15 (even steps)
Block 32 weights 16 weights 32 weights inside a super-block of 256
Block scale 8-bit E8M0: a power of two only 8-bit E4M3 (FP8): 1.25, 0.625… 6-bit scale + 6-bit min per block, two FP16s per super-block
Extra — one FP32 scale per tensor Q4_K_M keeps some tensors in Q6_K
Bits per weight (32×4 + 8)/32 = 4.25 (16×4 + 8)/16 = 4.5 144 bytes / 256 = 4.5; Q4_K_M ≈ 4.89 on Llama 3.1 8B

Sources: OCP MX spec Table 1 and §5.1; NVIDIA’s Introducing NVFP4 (“4.5 bits per value”); llama.cpp ggml-common.h (block_q4_K, “Effectively 4.5 bits per weight”), PR #1684 (the Q4_K_M mix) and the quantize README (4.8944 bits per weight).

What that means for an 8B model, if every weight used the format:

BF1616 bits/weightBF16: 16.06 GB16.06 GBQ4_K_M4.89 bits/weightQ4_K_M: 4.91 GB4.91 GBNVFP44.5 bits/weightNVFP4: 4.52 GB4.52 GBMXFP44.25 bits/weightMXFP4: 4.27 GB4.27 GB
8,030,261,312 weights (Llama 3.1 8B) × bits per weight / 8, in GB (10⁹ bytes); our arithmetic, bars to scale. Bits: MXFP4 (32 × 4 + 8) / 32 and NVFP4 (16 × 4 + 8) / 16 from the block layouts; Q4_K_M 4.8944 from llama.cpp's quantize README. Real FP4 checkpoints keep some tensors in wider formats, so their files are a bit bigger.

The differences between the 4-bit options are small: about 0.6 GB between MXFP4 and Q4_K_M at this size. The interesting part is what the bits buy.

Why the shape of the ruler matters: one worked block

Take eight made-up weights: 3.75, −2.6, 1.9, 1.1, −0.7, 0.45, −0.3, 0.15. Round them to FP4 the way each format does. (This is pencil-and-paper arithmetic, not a test of any model.)

  • MXFP4: the spec’s rule (§6.3) is “the largest power-of-two less than or equal to max(|Vi|), divided by the largest power-of-two representable in the element data type”. For 3.75 that’s 2 / 4 = 0.5, and llama.cpp’s reference quantizer does the same (floor(log2f(amax)) - 2). Multiply the notches by 0.5 and the ruler ends at 3. The biggest weight, 3.75, is clamped to 3.
  • NVFP4: the scale is amax / 6 = 3.75 / 6 = 0.625, which E4M3 can store exactly. Now the ruler ends exactly on 3.75.
MXFP4: scale = 2^floor(log2 3.75) / 4 = 0.5 → ruler ends at 300.250.50.7511.5233.75 rounds to 32.6 rounds to 31.9 rounds to 21.1 rounds to 10.7 rounds to 0.750.45 rounds to 0.50.3 rounds to 0.250.15 rounds to 0.25NVFP4: scale = 3.75 / 6 = 0.625 (E4M3) → ruler ends at 3.7500.31250.6250.93751.251.8752.53.753.75 rounds to 3.752.6 rounds to 2.51.9 rounds to 1.8751.1 rounds to 1.250.7 rounds to 0.6250.45 rounds to 0.31250.3 rounds to 0.31250.15 rounds to 0
One made-up block of eight weights (sizes shown, signs aside: 3.75, 2.6, 1.9, 1.1, 0.7, 0.45, 0.3, 0.15), rounded to the nearest FP4 (E2M1) notch. Circles are the weights, dashed lines show where each one lands. Scale rules from the OCP MX spec v1.0 §6.3 (MXFP4) and llama.cpp's reference NVFP4 quantizer (amax / 6). Our arithmetic, drawn to scale.
Weight MXFP4 NVFP4
3.75 3 (error 0.75) 3.75 (exact)
−2.6 −3 −2.5
1.9 2 1.875
1.1 1 1.25
−0.7 −0.75 −0.625
0.45 0.5 0.3125
−0.3 −0.25 −0.3125
0.15 0.25 0
Sum of squared errors 0.76 0.08

On this block, NVFP4’s total squared error is about 9.5× smaller. NVIDIA’s own illustration makes the same point with different numbers (an MSE of 0.72 with a power-of-two scale vs 0.08 with E4M3, in their Figure 4).

But look at the last row. NVFP4 rounds 0.15 to zero, while MXFP4 kept it as 0.25. A ruler stretched to fit the top exactly has coarser steps at the bottom (0.3125 here, against 0.25). It’s not a free lunch; on average, though, the finer scale wins. NVIDIA’s pretraining paper describes the MXFP4 failure mode in its Appendix B.4: with power-of-two scales, “in the worst case, FP4 is unable to represent the samples at ±4 and ±6”, using 2.58 of FP4’s 3.58 binades.

Why 16 and not 32

One big outlier sets the scale for its whole block. In a block of 32, it drags 31 neighbours onto a coarse ruler; in a block of 16, only 15. NVIDIA’s paper puts it as “reducing the block size from 32 to 16 elements, NVFP4 narrows the dynamic range within each block”. The cost is 0.25 extra bits per weight. In their 8B-parameter training run, MXFP4 “matches NVFP4 loss when trained on 36% more tokens (i.e., using 1.36T instead of 1T tokens)”.

And Q4_K_M?

Q4_K is a different shape of ruler: 16 evenly spaced integer levels, x = a * q + b, with a scale and a minimum per block of 32. FP4’s notches crowd around zero, where most weights are; Q4_K’s spread evenly but can shift. The “M” (medium) mix then spends extra bits where they matter most: half of the attn_v and ffn_down tensors in Q6_K. That’s why Q4_K_M lands at about 4.9 bits, more than NVFP4.

Quality: vendor numbers and independent ones

  • NVIDIA (vendor): NVFP4 post-training quantization of DeepSeek-R1-0528 shows “1% or less accuracy degradation” against FP8 (blog, Figure 6). Their 12B model trained in NVFP4 on 10T tokens reached 62.58% on MMLU-Pro vs 62.62% in FP8.
  • Independent: Egiazarian et al., Bridging the Gap Between Promise and Performance for Microscaling FP4 Quantization (ICLR 2026; ISTA, Red Hat AI, ETH and others), on Llama-3.1-8B-Instruct, average of MMLU, GSM8k, HellaSwag and WinoGrande:
Format, round-to-nearest Weights only (recovery) Weights + activations (recovery)
INT4, group 32, FP16 scales 97.71% 92.63%
NVFP4 98.02% 94.67%
MXFP4 95.58% 87.83%

Their verdict: “FP4 is not an automatic upgrade over INT4”. Weight-only, NVFP4 and a plain group-of-32 INT4 are within noise of each other; MXFP4’s power-of-two scale costs the most, though their MR-GPTQ method closes much of the gap (93.31% for MXFP4 with activations quantized too). Note that this INT4 isn’t Q4_K_M, and nobody we found has published a like-for-like Q4_K_M vs NVFP4 quality comparison, so we don’t claim one.

Which hardware actually does FP4 math

  • NVIDIA Blackwell: native MXFP4 and NVFP4 tensor cores, 4× (GB200) to 6× (GB300) BF16 throughput per NVIDIA’s paper, Table 1. GeForce RTX 50 cards too: the RTX Blackwell whitepaper says “RTX Blackwell adds new support for FP4 and FP6 Tensor Core operations”.
  • AMD Instinct MI350 / MI355X: “The CDNA4 Matrix Cores add hardware support for industry-standard micro-scaling (OCP MX) formats including MXFP8, MXFP6, and MXFP4” (ROCm docs). NVFP4 isn’t on that list.
  • Everything else (Hopper, Ada, Ampere, Macs, CPUs) can still run FP4 files: the kernels unpack the weights into a format the chip can multiply. You get the smaller download and lower memory, not faster math.

The best example is gpt-oss. OpenAI’s model card says its MoE weights, 90%+ of the parameters, are in MXFP4 at “4.25 bits per parameter”, which “enables the larger model to fit on a single 80GB GPU” (checkpoint: 60.8 GiB). That 80 GB GPU is an H100, a Hopper chip without FP4 tensor cores. Hugging Face’s launch post adds that without the right kernels, loading “will fall back to bfloat16, unpacked from the quantized weights”.

A fun sign of the times: the ETH Zurich paper above uses FP4 tensor cores to emulate 64-bit matrix math, and its authors report the INT8, FP8 and FP4 schemes “run faster than native FP64” on Blackwell. They also note that FP4 only reaches its full rate in the block-scaled instruction form.

“NVFP4 vs GGUF” is the wrong question

GGUF is a file container; NVFP4 is a number format. They aren’t alternatives:

  • llama.cpp added an MXFP4 type with gpt-oss in August 2025 (PR #15091).
  • It added GGML_TYPE_NVFP4 on 11 March 2026 (PR #19769, “FP4 E2M1 weights, UE4M3 per-block scale, 16 elements per block”), so a .gguf file can hold NVFP4 weights converted from NVIDIA ModelOpt checkpoints. CUDA support started with integer dp4a kernels (PR #20644), then Metal and HIP followed.

The real question is your GPU and your runtime. A rough guide from the facts above (guidance, not a measurement):

Your setup Download
Blackwell GPU (RTX 50, B200…) with vLLM, TensorRT-LLM or SGLang NVFP4 checkpoints: that’s where FP4 math is native
Older NVIDIA, AMD consumer cards, Mac or CPU with llama.cpp, Ollama, LM Studio Q4_K_M is still the safe default (on a Mac, see also MLX vs GGUF)
gpt-oss As shipped, in MXFP4
AMD MI350 / MI355X MXFP4 is the native one

For how much the runtime itself matters on the same model, see vLLM vs Ollama vs llama.cpp.

The short version

Same 4 bits, three ways to share a scale. MXFP4: 32 weights, a power-of-two ruler, 4.25 bits. NVFP4: 16 weights, an FP8 ruler that fits the biggest weight exactly, 4.5 bits. Q4_K_M: evenly spaced integer steps with a scale and a minimum, plus 6-bit tensors where they count, about 4.9 bits. The finer ruler usually wins, and sometimes rounds a small weight to zero. Which file is best depends far more on your GPU than on the format.

Sources