MXFP4/community docs · rev 2026.09

Home/FAQ

Reference · FAQ

Frequently Asked Questions

The questions that come up repeatedly in the community threads, answered as precisely as the format allows.

Format and encoding

Is MXFP4 exactly 4 bits per weight?

No. Each element is 4 bits, but each block of 32 also carries an 8-bit E8M0 scale, so the effective cost is 4.25 bits per element. Against bf16 that is a 3.76x reduction rather than 4x.

Any storage estimate that assumes a flat 4 bits will be about 6% optimistic.

What is the difference between MXFP4 and FP4?

FP4 usually means a bare 4-bit float, most often E2M1, with no defined block structure. MXFP4 is E2M1 plus the microscaling block structure: a fixed block size and one shared E8M0 scale per block.

The block scale is what makes the format usable. Bare E2M1 spans only about 3.6 binades of magnitude, which is nowhere near enough for a real weight tensor.

Does the E8M0 scale have a sign or a mantissa?

Neither. E8M0 is eight exponent bits and nothing else. The value is 2^(byte - 127), always a positive power of two.

This is why applying the scale is exact and cheap: it is an exponent adjustment, not a multiply that introduces its own rounding. The reserved encoding 0xFF means NaN, and per the specification a NaN scale makes the whole block NaN.

Can E2M1 represent infinity or NaN?

No. All sixteen 4-bit codes are finite values. There is no room to spend two codes on non-finite encodings at this width, so NaN is handled at the block level through the scale instead.

Why block size 32?

It sits at the knee of the overhead curve — 8/32 = 0.25 extra bits per element — and it is the block size wired into native block-scaled matrix units. Going larger saves almost nothing; going smaller usually costs you the hardware path.

Using it in practice

Do I need calibration data?

Not to produce valid MXFP4. Weight block scales are derived from the weights themselves, so a round-to-nearest pass needs no data at all.

You need calibration if you want error compensation (GPTQ-style), a principled layer sensitivity ranking, or activation quantization. For weight-only work, calibration is a refinement rather than a requirement.

Should I quantize activations too?

Usually not as a first step. Transformer activations have systematic outlier channels that interact badly with block scaling, and full activation quantization is a substantially harder problem than weight-only.

Weight-only MXFP4 captures most of the memory benefit for inference and carries far less risk. Add activation quantization only if you have a specific compute-bound reason to.

Can I train in MXFP4?

Not by naively applying weight quantization to a training loop. Gradients have different dynamic range characteristics and 4-bit gradient noise compounds in ways weight noise does not.

Low-precision training schemes that use microscaling formats generally keep master weights and optimizer state wider, apply the narrow format selectively, and involve careful loss scaling. That is a different design problem from quantizing a finished checkpoint.

Comparisons and ecosystem

Is MXFP4 better than INT4?

Not straightforwardly. At the same nominal bit width, a well-tuned INT4 group-quantization scheme with GPTQ or AWQ frequently matches or beats naive MXFP4 on accuracy.

MXFP4's advantages are structural: an exact power-of-two scale, no zero-point, no asymmetric range handling, and — most importantly — a path to native hardware execution that INT4 group schemes with fp16 scales generally do not have.

Will an MXFP4 checkpoint from one library load in another?

Often not, even when the numerics are identical. The specification defines the encoding, not a file format. Nibble order, scale storage type, scale tensor layout, transpose convention and the exclusion list are all library choices.

Round-trip a known small tensor through any converter before trusting it.

Does MXFP4 make inference faster, or just smaller?

Both, sometimes, and it depends entirely on the regime. Single-stream decode is bandwidth bound, so reading a quarter of the bytes helps even with a fully emulated compute path.

Batched prefill and training are compute bound, and there the speedup requires hardware with a native block-scaled matrix instruction. Without that, MXFP4 costs accuracy and buys nothing.

How do I tell whether my kernel is using a native path?

Profile it. Look for a distinct block-scaled matrix instruction in the kernel trace, and check whether arithmetic throughput scales with batch the way a native path would.

Do not infer it from a configuration flag. Many runtimes accept an MXFP4 dtype and silently dequantize to bf16 before the matmul.

Missing questions

Ask

Question not answered here? If it comes up more than twice in the community threads it ends up on this page.

Ask the community · Contact