vllm.models.minimax_m3.amd.sparse_attention_nvfp4
¶
MiniMax M3 block-sparse attention over an NVFP4 K/V cache on ROCm (gfx950).
The cache spec is NVIDIA's, but the bytes inside a page are laid out for the FlyDSL kernels, so pages are not interchangeable with NVIDIA's.
Classes:
-
MiniMaxM3SparseRocmNvfp4Backend–MiniMax M3 sparse attend over NVFP4 K/V pages (ROCm, gfx950).
-
MiniMaxM3SparseRocmNvfp4Impl–FlyDSL NVFP4 sparse decode (bf16 compute) and prefill (fp16 compute).
-
MiniMaxM3SparseRocmNvfp4MetadataBuilder–Adds each prefill token's request and absolute position.
Functions:
-
rocm_nvfp4_unsupported_reason–Why the ROCm NVFP4 attend cannot serve this layer, None when it can.
MiniMaxM3SparseRocmNvfp4Backend
¶
Bases: MiniMaxM3SparseBackend
MiniMax M3 sparse attend over NVFP4 K/V pages (ROCm, gfx950).
Methods:
-
customize_spec–Store each head's K and V as two slots of packed data + block scales.
Source code in vllm/models/minimax_m3/amd/sparse_attention_nvfp4.py
customize_spec(spec)
classmethod
¶
Store each head's K and V as two slots of packed data + block scales.
Source code in vllm/models/minimax_m3/amd/sparse_attention_nvfp4.py
MiniMaxM3SparseRocmNvfp4Impl
¶
Bases: MiniMaxM3SparseImpl
FlyDSL NVFP4 sparse decode (bf16 compute) and prefill (fp16 compute).
Source code in vllm/models/minimax_m3/amd/sparse_attention_nvfp4.py
94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 | |
MiniMaxM3SparseRocmNvfp4MetadataBuilder
¶
Bases: MiniMaxM3SparseMetadataBuilder
Adds each prefill token's request and absolute position.
Source code in vllm/models/minimax_m3/amd/sparse_attention_nvfp4.py
rocm_nvfp4_unsupported_reason(num_heads, num_kv_heads, head_dim, topk_blocks, block_size)
¶
Why the ROCm NVFP4 attend cannot serve this layer, None when it can.