MXFP4
The OCP microscaling format: 4-bit floats (E2M1) in blocks of 32 that share one power-of-two scale (E8M0).
What the figure shows
Each block's grid is the 15 E2M1 values times a power of two. Because the scale can only be a power of two, the block's largest weight usually lands somewhere between 4 and 8 times the scale, and anything above 6 times the scale is clipped to 6. Look for weights that slide inward to the outermost grid line: those are clipped.
The format
| element | E2M1: 1 sign, 2 exponent, 1 mantissa bit, bias 1 |
|---|---|
| scale | E8M0 per 32 elements: 2^(code − 127) |
| scale choice | floor(log2(amax)) − 2 |
| cost | 4 + 8/32 = 4.25 bits per weight |
Things to try
- Use
E8M0.floorCode(amax) - EMAX + 1to avoid clipping, and compare the SQNR. The spec's choice clips the top but keeps a finer grid for everything else. - Compare with NVFP4, which pays for a finer scale with smaller blocks.