vllm.models.kimi_k3.nvidia.gqa_draft
¶
GQA drafts (e.g. a Qwen3 sliding-window DSpark) on Kimi-K3: their KV cache grouping.
Dense MLA drafts keep their own MLA cache (dense_draft.py).
Classes:
-
GQADraftKVCacheGrouping–Kimi-K3's KV cache grouping when a GQA draft is attached; otherwise the
GQADraftKVCacheGrouping
¶
Bases: SupportsKVCacheGrouping
Kimi-K3's KV cache grouping when a GQA draft is attached; otherwise the default grouping.
Kimi-K3's own layers are KDA (Mamba) and MLA, so any other attention layer belongs to a draft. All groups share one page size and MLA pages cannot be padded, so the draft's page must fit under the target's. With all KV heads on one rank (attention TP1 under DP) it does not, and the draft gets the largest block that fits. Grouping the draft on its own also keeps the target's groups: the default grouping sizes every group by the draft's few layers (20 groups instead of 4 + 1 for a 5-layer draft).
Source code in vllm/models/kimi_k3/nvidia/gqa_draft.py
_fit_draft_page(spec, page_size)
¶
Shrink a draft's block until its page fits under page_size.