VLM: change default mm-attention backend from triton_attn to fa4 (on blackwell) (#21595)

This commit is contained in:
Xinyuan Tong
2026-04-01 14:29:59 +08:00
committed by GitHub
parent 72d3d8f4cf
commit 87a2768269
+5 -1
View File
@@ -888,7 +888,9 @@ class VisionAttention(nn.Module):
Priority: server args override > constructor arg > platform default.
Platform defaults:
- CUDA: "triton_attn"
- CUDA (Hopper SM90): "fa3"
- CUDA (Blackwell SM100): "fa4"
- CUDA (other): "triton_attn"
- Non-CUDA: "sdpa"
"""
override_backend = get_global_server_args().mm_attention_backend
@@ -900,6 +902,8 @@ class VisionAttention(nn.Module):
major, minor = get_device_capability()
if major == 9:
backend = "fa3"
elif major == 10:
backend = "fa4"
else:
backend = "triton_attn"
elif _is_hip: