vllm.models.deepseek_v41.amd.akr_indexer
¶
Route indexer: the decode rows of DeepSeek-V4.1's MXFP4 top-512 indexer on
amd_kernels.
One entry scores the paged MXFP4 keys, selects the top 512 and writes the
sparse attention's ragged slot lists itself, which this layer then publishes as
its _topk_ragged_cache (the stock packer is skipped). The dense layers score
the whole context (the candidate source also writes its candidate blocks); the
candidate consumers score only the source's candidates. Prefill rows of the
same step stay on the stock op (skip_decode).
A layer stays stock when its longest row, max_model_len / compress_ratio
compressed entries (or indexer_max_ctx), exceeds the kernel's limit. Per
step: no uniform decode length, sharded decode rows or a row count outside the
gate run the stock op.
Functions:
-
dispatch–Run this step's decode rows on the kernel where it serves. Returns
_is_valid_i32(swa_metadata, rows)
¶
One int32 copy of the step's valid-token mask, shared by the layers.
Source code in vllm/models/deepseek_v41/amd/akr_indexer.py
dispatch(layer, index_q, index_q_scale, index_weights)
¶
Run this step's decode rows on the kernel where it serves. Returns whether the stock indexer op still has rows to do.