support using fa4 on deepseek on blackwell (#9928)

This commit is contained in:
cicirori
2025-09-17 07:16:06 +08:00
committed by GitHub
parent 311de47bb7
commit a2f7218a2e
7 changed files with 136 additions and 0 deletions

View File

@@ -1124,6 +1124,9 @@ class DeepseekV2AttentionMLA(nn.Module):
return AttnForwardMethod.MHA_CHUNKED_KV
else:
return _dispatch_mla_subtype()
elif attention_backend == "fa4":
# TODO(cicirori): use FA4 MHA for DeepSeekV3 for now
return AttnForwardMethod.MHA_CHUNKED_KV
elif attention_backend == "trtllm_mla":
original_mode = getattr(forward_batch, "_original_forward_mode", None)
if (