[Attention][DCP] Enable FlashInfer MLA for DSpark drafting (#54277)

Signed-off-by: Summer Yang <girasoleyang@gmail.com>
This commit is contained in:
Summer Yang
2026-08-28 21:11:28 -07:00
committed by GitHub
parent b2f685834a
commit 6d4562c59b
8 changed files with 98 additions and 28 deletions
+6 -3
View File
@@ -570,6 +570,11 @@ class MLAAttentionSpec(FullAttentionSpec):
"All attention layers in the same KV cache group must use the same "
"quantization method, tokens per state, and model version."
)
non_causal_mtd_set = {spec.non_causal_multi_token_decode for spec in specs}
assert len(non_causal_mtd_set) == 1, (
"All attention layers in the same KV cache group must agree on "
"non_causal_multi_token_decode."
)
merged_spec = cls(
block_size=specs[0].block_size,
num_kv_heads=specs[0].num_kv_heads,
@@ -582,9 +587,7 @@ class MLAAttentionSpec(FullAttentionSpec):
cache_dtype_str=cache_dtype_str_set.pop(),
tokens_per_state=tokens_per_state_set.pop(),
model_version=model_version_set.pop(),
non_causal_multi_token_decode=any(
spec.non_causal_multi_token_decode for spec in specs
),
non_causal_multi_token_decode=non_causal_mtd_set.pop(),
)
for spec in specs:
for f in fields(AttentionSpec):