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

elementE2M1: 1 sign, 2 exponent, 1 mantissa bit, bias 1
scaleE8M0 per 32 elements: 2^(code − 127)
scale choicefloor(log2(amax)) − 2
cost4 + 8/32 = 4.25 bits per weight

Things to try