vllm.models.minimax_m3.amd.sparse_attention_mxfp4
¶
MiniMax M3 block-sparse attention over an MXFP4 K/V cache on ROCm (gfx950).
Each head's K and V are two slots of one 8704 B page (mxfp4_pages). The
top-k block ids the indexer wrote are turned into one page table row per query
token, and pa_decode (MXFP4 K/V) attends each row as a length-1 sequence with the
query as e4m3.
Classes:
-
MiniMaxM3SparseRocmMxfp4Backend–MiniMax M3 sparse attend over MXFP4 K/V pages (ROCm, gfx950).
-
MiniMaxM3SparseRocmMxfp4Impl–pa_decodeover the pages each query token's top-k selects.
Functions:
-
mxfp4_sparse_attend–Attend each row to its selected pages as a length-1 sequence.
-
rocm_mxfp4_attention_unsupported_reason–Why the ROCm MXFP4 attend cannot serve this layer, None when it can.
MiniMaxM3SparseRocmMxfp4Backend
¶
Bases: MiniMaxM3SparseBackend
MiniMax M3 sparse attend over MXFP4 K/V pages (ROCm, gfx950).
Methods:
-
customize_spec–Store each head's K and V as two slots of 128 tokens x 68 B.
Source code in vllm/models/minimax_m3/amd/sparse_attention_mxfp4.py
customize_spec(spec)
classmethod
¶
Store each head's K and V as two slots of 128 tokens x 68 B.
Source code in vllm/models/minimax_m3/amd/sparse_attention_mxfp4.py
MiniMaxM3SparseRocmMxfp4Impl
¶
Bases: MiniMaxM3SparseImpl
pa_decode over the pages each query token's top-k selects.
Source code in vllm/models/minimax_m3/amd/sparse_attention_mxfp4.py
mxfp4_sparse_attend(q, kv_cache, sparse_bt, sparse_ctx, out, scale)
¶
Attend each row to its selected pages as a length-1 sequence.
Source code in vllm/models/minimax_m3/amd/sparse_attention_mxfp4.py
rocm_mxfp4_attention_unsupported_reason(num_heads, num_kv_heads, head_dim, block_size)
¶
Why the ROCm MXFP4 attend cannot serve this layer, None when it can.