diff --git a/python/sglang/srt/hardware_backend/npu/quantization/fused_moe_method_npu.py b/python/sglang/srt/hardware_backend/npu/quantization/fused_moe_method_npu.py index 924d45d47..f9f3ce4a7 100644 --- a/python/sglang/srt/hardware_backend/npu/quantization/fused_moe_method_npu.py +++ b/python/sglang/srt/hardware_backend/npu/quantization/fused_moe_method_npu.py @@ -115,6 +115,8 @@ def npu_fused_experts( def npu_fused_moe_without_routing_weights_bf16( layer, hidden_states, group_list_type, group_list, output_dtype ): + from sgl_kernel_npu.activation.swiglu_quant import swiglu_quant + # gmm1: gate_up_proj hidden_states = torch.ops.npu.npu_grouped_matmul( x=[hidden_states], @@ -125,7 +127,9 @@ def npu_fused_moe_without_routing_weights_bf16( group_list=group_list, output_dtype=output_dtype, )[0] - hidden_states = torch.ops.npu.npu_swiglu(hidden_states) + hidden_states, _ = swiglu_quant( + hidden_states, group_list, group_list_type, need_quant=False + ) # gmm2: down_proj hidden_states = torch.ops.npu.npu_grouped_matmul( x=[hidden_states],