[Bugfix][LoRA] Guard TrtLlm BF16 MoE LoRA gate on activation type (#51002)
Signed-off-by: Anh Tran <anhtra@nvidia.com> Co-authored-by: Khang Ngo <khngo@nvidia.com>
anhtra3889 committed
Aug 6, 2026 at 17:12 UTC
872fd5973ede6acc07bfa48ef895e41fc3fe6c66
1 file changed
+10
-12
vllm/model_executor/layers/fused_moe/oracle/unquantized.py
+10
-12
@@ -180,23 +180,21 @@ def map_unquantized_backend(runner_backend: MoEBackend) -> UnquantizedMoeBackend
180
181
def _trtllm_bf16_lora_supported(moe_config: FusedMoEConfig) -> bool:
182
"""Gate for routing LoRA-enabled BF16 MoE to the FlashInfer TRT-LLM
183
- gemm1_lora_delta path (PR #3153). Conservative: device + routing method;
184
- the experts class's own _supports_* checks and the modular_kernel LoRA
185
- gate provide the final filtering.
183
+ gemm1_lora_delta path (PR #3153).
184
"""
185
from vllm.model_executor.layers.fused_moe.experts.trtllm_lora_moe import (
186
TrtLlmBf16LoRAExperts,
187
)
188
191
- if not TrtLlmBf16LoRAExperts._supports_current_device():
192
- return False
193
- if not TrtLlmBf16LoRAExperts._supports_routing_method(
194
- moe_config.routing_method, None, None
195
- ):
196
- return False
197
- if not TrtLlmBf16LoRAExperts._supports_parallel_config(
198
- moe_config.moe_parallel_config
199
- ):
189
+ # LoRA path returns before the oracle loop; reuse is_supported_config here.
190
+ supported, _ = TrtLlmBf16LoRAExperts.is_supported_config(
191
+ TrtLlmBf16LoRAExperts,
192
+ moe_config,
193
+ None,
194
+ None,
195
+ mk.FusedMoEActivationFormat.Standard,
196
+ )
197
+ if not supported:
198
return False
199
# The flashinfer trtllm fused-MoE kernel requires the per-partition
200
# intermediate size to be a multiple of 128. Plain TP shards the MoE