@tduncan / Nvidia-Optimization-Stack-VLLM Mirror · read-only / commits / 1c160841ea
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 14, 05:30 UTC

[Bug] Fix DeepSeek-V2.5-1210-FP8 issue (#27267)

Signed-off-by: yewentao256 <zhyanwentao@126.com>

Wentao Ye committed Oct 22, 2025 at 11:00 UTC 1c160841ea5f70bae61e62ab8eea17141d654e29
1 file changed +11 -5
vllm/model_executor/layers/fused_moe/cutlass_moe.py
+11 -5
@@ -511,13 +511,19 @@ def cutlass_moe_fp8(
511 assert quant_config is not None
512
513 if quant_config.a1_scale is not None:
514 - assert quant_config.per_act_token_quant == quant_config.a1_scale.numel() != 1
514 + assert quant_config.per_act_token_quant == (quant_config.a1_scale.numel() != 1)
515 if quant_config.a2_scale is not None:
516 - assert quant_config.per_act_token_quant == quant_config.a2_scale.numel() != 1
516 + assert quant_config.per_act_token_quant == (quant_config.a2_scale.numel() != 1)
517
518 - assert quant_config.w1_scale is None or (
519 - quant_config.per_out_ch_quant == (quant_config.w1_scale.size(1) == w1_q.size(1))
520 - )
518 + if quant_config.w1_scale is not None:
519 + if quant_config.per_out_ch_quant:
520 + assert quant_config.w1_scale.dim() > 1 and quant_config.w1_scale.size(
521 + 1
522 + ) == w1_q.size(1)
523 + else:
524 + assert (
525 + quant_config.w1_scale.dim() == 1 or quant_config.w1_scale.size(1) == 1
526 + )
527
528 num_experts = global_num_experts if global_num_experts != -1 else w1_q.size(0)
529