vllm.models.minimax_m3.amd.ops.mxfp4_pages
¶
Page geometry of the MiniMax M3 MXFP4 K/V and index-K caches on ROCm.
One 128-token page of one head holds, for K (or V, or the index key), the 128-wide rows as e2m1 data (two elements a byte, the low nibble the even one) followed by one e8m0 scale per 32 elements::
[128 tokens x 64 B data][128 tokens x 4 B scale] = 8704 B = 128 x 68 B
There is no global scale. This is the page AITER's fused_qknorm_idxrqknorm
writes and its FlyDSL scorers and pa_decode (MXFP4 K/V) read.
Functions:
-
mxfp4_page_views–(data, scale) views of uint8 pages
[..., PAGE_BYTES].
mxfp4_page_views(pages)
¶
(data, scale) views of uint8 pages [..., PAGE_BYTES].
The views are [..., 128, 64] and [..., 128, 4] and keep the leading
dims and their strides, so [pages, heads, 8704] becomes the
[pages, heads, 128, 64] / [pages, heads, 128, 4] pair
pa_decode takes and [pages, 8704] the [pages, 128, 64] /
[pages, 128, 4] pair the index scorers take.