From e1861078704b0b091206e83cdd64eaf10b1967ef Mon Sep 17 00:00:00 2001 From: Alden Lobo Date: Mon, 29 Jun 2026 04:12:20 -0500 Subject: [PATCH] [Bugfix] Use native SiLU activation in CPU fused MoE (#45961) Signed-off-by: Alden Lobo Co-authored-by: Alden Lobo --- vllm/model_executor/layers/fused_moe/cpu_fused_moe.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vllm/model_executor/layers/fused_moe/cpu_fused_moe.py b/vllm/model_executor/layers/fused_moe/cpu_fused_moe.py index 868d26e749..1a0acff058 100644 --- a/vllm/model_executor/layers/fused_moe/cpu_fused_moe.py +++ b/vllm/model_executor/layers/fused_moe/cpu_fused_moe.py @@ -51,7 +51,7 @@ def _gelu_and_mul( # Uses static methods or standalone functions to avoid instantiating CustomOp # classes, which would call get_current_vllm_config() before config is set. _CPU_MOE_ACT_FN: dict[MoEActivation, Callable[[torch.Tensor], torch.Tensor]] = { - MoEActivation.SILU: lambda x: SiluAndMul(compile_native=False).forward_native(x), + MoEActivation.SILU: SiluAndMul.forward_native, MoEActivation.SWIGLUOAI: _swigluoai_forward_native, MoEActivation.GELU: _gelu_and_mul, MoEActivation.GELU_TANH: (