@tduncan / Nvidia-Optimization-Stack-VLLM Mirror · read-only / commits / 8ebfacaa75
Fork 0

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 10, 02:45 UTC

[Attention][MLA] Make `FLASHINFER_MLA` the default MLA backend on Blackwell, and TRTLLM the default prefill (#32339)

Signed-off-by: Matthew Bonanni <mbonanni@redhat.com> Co-authored-by: Wentao Ye <44945378+yewentao256@users.noreply.github.com>

Matthew Bonanni committed Jan 15, 2026 at 09:49 UTC 8ebfacaa7524dd9641cef9c5e4151214e0912dfd
3 files changed +16 -15
vllm/config/attention.py
+1 -1
@@ -35,7 +35,7 @@ class AttentionConfig:
35 use_cudnn_prefill: bool = False
36 """Whether to use cudnn prefill."""
37
38 - use_trtllm_ragged_deepseek_prefill: bool = False
38 + use_trtllm_ragged_deepseek_prefill: bool = True
39 """Whether to use TRTLLM ragged deepseek prefill."""
40
41 use_trtllm_attention: bool | None = None
vllm/model_executor/layers/attention/mla_attention.py
+11 -10
@@ -450,7 +450,6 @@ def use_flashinfer_prefill() -> bool:
450 not vllm_config.attention_config.disable_flashinfer_prefill
451 and flashinfer_available
452 and not vllm_config.attention_config.use_cudnn_prefill
453 - and not vllm_config.attention_config.use_trtllm_ragged_deepseek_prefill
453 and current_platform.is_device_capability_family(100)
454 )
455
@@ -1294,25 +1293,27 @@ class MLACommonImpl(MLACommonBaseImpl[M], Generic[M]):
1293 def __init__(self, *args, **kwargs) -> None:
1294 super().__init__(*args, **kwargs)
1295
1297 - if use_flashinfer_prefill():
1298 - logger.debug_once("Using FlashInfer prefill for MLA")
1299 - self._run_prefill_context_chunk = self._run_prefill_context_chunk_fi
1300 - self._run_prefill_new_tokens = self._run_prefill_new_tokens_fi
1301 - self._pad_v = False
1302 - elif use_trtllm_ragged_deepseek_prefill():
1303 - logger.debug_once("Using TRT-LLM ragged DeepSeek prefill for MLA")
1296 + if use_trtllm_ragged_deepseek_prefill():
1297 + logger.info_once(
1298 + "Using TRT-LLM ragged DeepSeek prefill for MLA", scope="local"
1299 + )
1300 self._run_prefill_context_chunk = (
1301 self._run_prefill_context_chunk_trtllm_ragged
1302 )
1303 self._run_prefill_new_tokens = self._run_prefill_new_tokens_trtllm_ragged
1304 self._pad_v = False
1305 + elif use_flashinfer_prefill():
1306 + logger.info_once("Using FlashInfer prefill for MLA")
1307 + self._run_prefill_context_chunk = self._run_prefill_context_chunk_fi
1308 + self._run_prefill_new_tokens = self._run_prefill_new_tokens_fi
1309 + self._pad_v = False
1310 elif use_cudnn_prefill():
1310 - logger.debug_once("Using CUDNN prefill for MLA")
1311 + logger.info_once("Using CUDNN prefill for MLA", scope="local")
1312 self._run_prefill_context_chunk = self._run_prefill_context_chunk_cudnn
1313 self._run_prefill_new_tokens = self._run_prefill_new_tokens_cudnn
1314 self._pad_v = False
1315 else: # Use FlashAttention
1315 - logger.debug_once("Using FlashAttention prefill for MLA")
1316 + logger.info_once("Using FlashAttention prefill for MLA", scope="local")
1317 self._run_prefill_context_chunk = self._run_prefill_context_chunk_fa
1318 self._run_prefill_new_tokens = self._run_prefill_new_tokens_fa
1319
vllm/platforms/cuda.py
+4 -4
@@ -50,8 +50,8 @@ def _get_backend_priorities(
50 if use_mla:
51 if device_capability.major == 10:
52 return [
53 - AttentionBackendEnum.CUTLASS_MLA,
53 AttentionBackendEnum.FLASHINFER_MLA,
54 + AttentionBackendEnum.CUTLASS_MLA,
55 AttentionBackendEnum.FLASH_ATTN_MLA,
56 AttentionBackendEnum.FLASHMLA,
57 AttentionBackendEnum.TRITON_MLA,
@@ -183,12 +183,12 @@ class CudaPlatformBase(Platform):
183 if vllm_config.attention_config.backend is None:
184 # Default case
185 if cls.is_device_capability_family(100) and not use_sparse:
186 - # Blackwell => Force CutlassMLA (unless sparse, i.e. DSv3.2).
187 - use_cutlass_mla = True
186 + # Blackwell => Force FlashInferMLA (unless sparse, i.e. DSv3.2).
187 + use_flashinfer_mla = True
188 # Set the backend in AttentionConfig so it's used during
189 # backend selection
190 vllm_config.attention_config.backend = (
191 - AttentionBackendEnum.CUTLASS_MLA
191 + AttentionBackendEnum.FLASHINFER_MLA
192 )
193 else:
194 # Not Blackwell