[Attention][MiniMax-M3] Add MSA speculative decode verification (#50032)

This commit is contained in:
Jason Li
2026-08-02 13:46:55 -07:00
committed by GitHub
parent c666810676
commit 0055b8bfa3
15 changed files with 1275 additions and 59 deletions
+15
View File
@@ -11,6 +11,7 @@ from vllm.v1.attention.backends.mla.prefill.registry import MLAPrefillBackendEnu
from vllm.v1.attention.backends.registry import AttentionBackendEnum
IndexerKVDType = Literal["bf16", "fp8", "mxfp4", "nvfp4"]
MiniMaxM3MSADecodeBackend = Literal["triton", "cutlass"]
@config
@@ -20,6 +21,9 @@ class AttentionConfig:
backend: AttentionBackendEnum | None = None
"""Attention backend to use. Use "auto" or None for automatic selection."""
minimax_m3_msa_decode_backend: MiniMaxM3MSADecodeBackend = "triton"
"""Sparse decode kernel used by the MiniMax M3 MSA backend."""
backend_per_kind: dict[str, AttentionBackendEnum] = field(default_factory=dict)
"""Per-KV-cache-group attention backend overrides, keyed by
`KVCacheSpecKind` (e.g. `{"mla_attention": "FLASHINFER_MLA",
@@ -99,6 +103,17 @@ class AttentionConfig:
PyTorch >= 2.9, and 128 for encoder-only attention or older PyTorch
versions."""
def __post_init__(self) -> None:
msa_aliases: dict[AttentionBackendEnum, MiniMaxM3MSADecodeBackend] = {
AttentionBackendEnum.CUTLASS_MSA: "cutlass",
AttentionBackendEnum.TRITON_MSA: "triton",
}
if self.backend in msa_aliases:
self.minimax_m3_msa_decode_backend = msa_aliases[self.backend]
# The alias selects only MiniMax's sparse decode kernel. Dense
# layers still use the platform's normal automatic backend.
self.backend = None
def compute_hash(self) -> str:
"""
Provide a hash that uniquely identifies all the configs