MXFP4 vs NVFP4: block size, scale format, and hardware support comparison
Fields
quantization/qhw-mxfp4-vs-nvfp4Notes
MXFP4 and NVFP4 are both W4A4 formats for Blackwell, but they are NOT interchangeable. The key differences: (1) Block size: MXFP4 uses 32-element blocks, NVFP4 uses 16-element blocks. (2) Scale format: MXFP4 uses power-of-two E8M0 (no fractional scales), NVFP4 uses fractional E4M3. (3) Scale levels: MXFP4 has one level (per-block), NVFP4 has two levels (per-block E4M3 + per-tensor FP32). (4) Standard: MXFP4 is an open OCP standard, NVFP4 is NVIDIA-proprietary. The practical consequence: a model quantized to MXFP4 cannot be served with NVFP4 kernels and vice versa. The block size difference means the quantization error characteristics are different - smaller blocks (NVFP4) generally give better accuracy but require more scale storage. The scale format difference means NVFP4 can represent scales more precisely (E4M3 has ~2 decimal digits vs E8M0's power-of-two steps). NVIDIA's preference for NVFP4 is based on the scale-encoding MSE, but this is a vendor claim. The OCP MX specification is open and has been adopted by multiple vendors, while NVFP4 is NVIDIA-only. For open-source deployment, MXFP4 is the more portable choice.