diff --git a/python/sglang/srt/layers/quantization/fp8.py b/python/sglang/srt/layers/quantization/fp8.py index ecdca3381..41b59b103 100644 --- a/python/sglang/srt/layers/quantization/fp8.py +++ b/python/sglang/srt/layers/quantization/fp8.py @@ -1132,10 +1132,12 @@ class Fp8MoEMethod(FusedMoEMethodBase): and topk_config.topk_group is not None ), "Current trtllm_fp8_block_scale_moe kernel does not support these two arguments as None" - if topk_config.correction_bias is None: - correction_bias = topk_config.correction_bias.to(x.dtype) - else: - correction_bias = None + correction_bias = ( + None + if topk_config.correction_bias is None + else topk_config.correction_bias.to(x.dtype) + ) + return trtllm_fp8_block_scale_moe( routing_logits=router_logits.to(torch.float32), routing_bias=correction_bias,