vllm.models.kimi_k3.amd.ops.fp4_indexer_prefill
¶
FP4 prefill: gather compact index keys once, then score global causal rows.
Functions:
-
prefill_chunks–Reuse each request set's keys and exchange all query chunks together.
-
prefill_workspace_bytes–Peak prefill scratch of one chunk holding at most
max_keyskeys. -
prepare_prefill_metadata–Build read-only geometry once for the layers sharing this attention group.
-
stage_keys–Preserve quantized bytes and swizzled scale rows, including merged strides.
prefill_chunks(q, weights, cache, out, metadata, world, interleave, weight_scale)
¶
Reuse each request set's keys and exchange all query chunks together.
Source code in vllm/models/kimi_k3/amd/ops/fp4_indexer_prefill.py
prefill_workspace_bytes(max_keys, max_reqs, world, interleave)
¶
Peak prefill scratch of one chunk holding at most max_keys keys.
The indexer builder caps each chunk's keys at its prefill buffer size and _prepare_chunk keeps each logits tile under 1 GiB. Staging holds the local packed keys, their DCP all-gather and the restored pages at once; a rank's share exceeds an even split by at most one interleave run per request.
Source code in vllm/models/kimi_k3/amd/ops/fp4_indexer_prefill.py
prepare_prefill_metadata(metadata, world, rank, interleave)
¶
Build read-only geometry once for the layers sharing this attention group.
Source code in vllm/models/kimi_k3/amd/ops/fp4_indexer_prefill.py
stage_keys(cache, chunk, world, interleave, all_cu=None)
¶
Preserve quantized bytes and swizzled scale rows, including merged strides.