vllm.models.minimax_m3.amd.indexer_mxfp4
¶
MiniMax M3 lightning indexer over MXFP4 index-K pages on ROCm (gfx950).
AITER's FlyDSL scorers read the e2m1 / e8m0 pages and write the same
[heads, rows, blocks] fp32 block scores the other indexers do; the top-k
is the one indexer_nvfp4 uses. The scorers do not apply the init / local
forced blocks, so _pin_forced_blocks writes AITER's sentinels between the
two.
Classes:
-
MiniMaxM3IndexerMxfp4Metadata–Adds the decode scorer's work map, built once per step.
-
MiniMaxM3IndexerMxfp4MetadataBuilder–The decode scorer's work map lives in one persistent buffer.
-
MiniMaxM3IndexerRocmMxfp4Impl–AITER FlyDSL MXFP4 index scores + top-k block ids, prefill and decode.
Functions:
-
mxfp4_index_topk_decode–Top-k block ids of
query_lendecode rows per request. -
mxfp4_index_topk_prefill–Top-k block ids of ragged prefill rows.
-
rocm_mxfp4_aiter_unavailable_reason–Why the AITER MXFP4 ops cannot be used here, None when they can.
-
rocm_mxfp4_indexer_unsupported_reason–Why the ROCm MXFP4 indexer cannot serve this config, None when it can.
MiniMaxM3IndexerMxfp4Metadata
dataclass
¶
Bases: MiniMaxM3IndexerMSAMetadata
Adds the decode scorer's work map, built once per step.
Source code in vllm/models/minimax_m3/amd/indexer_mxfp4.py
MiniMaxM3IndexerMxfp4MetadataBuilder
¶
Bases: MiniMaxM3IndexerMSAMetadataBuilder
The decode scorer's work map lives in one persistent buffer.
A captured decode graph bakes in the work map's address and its row count
(the scorer's grid). Both therefore have to survive every replay: the map is
refilled in place each step, and is always built for the model-length block
bound, which is also the bound the graph is captured with (the model runner
captures with max_seq_len == max_model_len).
Source code in vllm/models/minimax_m3/amd/indexer_mxfp4.py
MiniMaxM3IndexerRocmMxfp4Impl
¶
Bases: MiniMaxM3IndexerImpl
AITER FlyDSL MXFP4 index scores + top-k block ids, prefill and decode.
Source code in vllm/models/minimax_m3/amd/indexer_mxfp4.py
365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 | |
_new_score(heads, rows, max_seq_len, device)
¶
Uninitialized: the top-k reads only each row's causal blocks.
Source code in vllm/models/minimax_m3/amd/indexer_mxfp4.py
_pin_forced_blocks(score, *, init_blocks, local_blocks, seq_lens=None, query_len=1, num_valid_pages=None)
¶
Write AITER's init / local sentinels on the causal blocks of every row.
Decode rows are recovered from seq_lens and query_len, prefill rows
carry their block counts in num_valid_pages.
Source code in vllm/models/minimax_m3/amd/indexer_mxfp4.py
mxfp4_index_topk_decode(index_query, index_pages, block_table, seq_lens, work_map, topk_out, *, max_seq_len, query_len, scale, init_blocks, local_blocks)
¶
Top-k block ids of query_len decode rows per request.
Source code in vllm/models/minimax_m3/amd/indexer_mxfp4.py
mxfp4_index_topk_prefill(index_query, index_pages, block_table, cu_seqlens_q, seq_lens, context_lens, num_valid_pages, topk_out, *, max_query_len, max_seq_len, scale, init_blocks, local_blocks)
¶
Top-k block ids of ragged prefill rows.
Source code in vllm/models/minimax_m3/amd/indexer_mxfp4.py
rocm_mxfp4_aiter_unavailable_reason()
¶
Why the AITER MXFP4 ops cannot be used here, None when they can.
Source code in vllm/models/minimax_m3/amd/indexer_mxfp4.py
rocm_mxfp4_indexer_unsupported_reason(*, topk_blocks, sparse_block_size, num_index_heads, index_head_dim, score_type)
¶
Why the ROCm MXFP4 indexer cannot serve this config, None when it can.