A high-throughput and memory-efficient inference and serving engine for LLMs
Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git
Synced Nov 14, 05:30 UTC
[Bugfix] Fallback ViT attn backend to SDPA for blackwell (#25851)
Signed-off-by: Roger Wang <hey@rogerw.io>
Roger Wang committed
Sep 28, 2025 at 23:03 UTC
65ecb4f134a2a9b651c0ad070ad833cf6fe41b5b
2 files changed
+7
-9
vllm/model_executor/models/qwen3_vl.py
+1
-9
@@ -66,7 +66,7 @@ from vllm.multimodal.processing import (BaseMultiModalProcessor,
66
PromptReplacement, PromptUpdate,
67
PromptUpdateDetails)
68
from vllm.multimodal.profiling import BaseDummyInputsBuilder
69
-from vllm.platforms import _Backend, current_platform
69
+from vllm.platforms import _Backend
70
from vllm.sequence import IntermediateTensors
71
from vllm.transformers_utils.config import uses_mrope
72
from vllm.utils import is_list_of
@@ -336,14 +336,6 @@ class Qwen3_VisionTransformer(nn.Module):
336
}:
337
raise RuntimeError(
338
f"Qwen3-VL does not support {self.attn_backend} backend now.")
339
- if current_platform.is_device_capability(
340
- 100) and self.attn_backend != _Backend.TORCH_SDPA:
341
- # TODO(Roger/Wentao): remove this after FA
342
- # or XFORMERS's issue fixed on Blackwell
343
- logger.info_once("Qwen3-VL vision attention does not support "
344
- f"{self.attn_backend} backend on Blackwell now. "
345
- "Vision attention backend is set to TORCH_SDPA.")
346
- self.attn_backend = _Backend.TORCH_SDPA
339
340
self.blocks = nn.ModuleList([
341
Qwen3_VisionBlock(
vllm/platforms/cuda.py
+6
@@ -205,6 +205,12 @@ class CudaPlatformBase(Platform):
205
@classmethod
206
def get_vit_attn_backend(cls, head_size: int,
207
dtype: torch.dtype) -> _Backend:
208
+
209
+ # For Blackwell GPUs, force TORCH_SDPA for now.
210
+ # See https://github.com/facebookresearch/xformers/issues/1317#issuecomment-3199392579 # noqa: E501
211
+ if cls.has_device_capability(100):
212
+ return _Backend.TORCH_SDPA
213
+
214
if dtype not in (torch.float16, torch.bfloat16):
215
return _Backend.XFORMERS
216