NVFP4
NVIDIA's 4-bit float format: E2M1 elements in blocks of 16, each block scaled by an FP8 E4M3 value, under one fp32 scale for the whole tensor.
What the figure shows
Each block's scale is chosen so its largest weight lands on 6, the top E2M1 value, rounded to the nearest E4M3 value. Compared with MXFP4, the scale has 3 mantissa bits instead of none, so blocks rarely clip and their grids fit their weights more tightly. The blocks are also half the size, so an outlier spoils 16 weights instead of 32.
The format
| element | E2M1, ±{0, 0.5, 1, 1.5, 2, 3, 4, 6} |
|---|---|
| block scale | E4M3 per 16 elements |
| tensor scale | fp32, amax / (6 · 448) |
| decode | w = e2m1 × e4m3 × fp32 |
| cost | 4 + 8/16 = 4.5 bits per weight |
Things to try
- Set
blockSize: 32to compare with MXFP4 at the same block size: the gap that remains is the scale's mantissa. - Drop the tensor scale (
global = 1) and watch small blocks lose their scale to E4M3's subnormals.