diff --git a/vllm/model_executor/layers/quantization/fp8.py b/vllm/model_executor/layers/quantization/fp8.py index 41e2e19785cd..e5a053e1529c 100644 --- a/vllm/model_executor/layers/quantization/fp8.py +++ b/vllm/model_executor/layers/quantization/fp8.py @@ -648,10 +648,16 @@ def create_weights( ) # WEIGHTS + # Honor is_act_and_mul for non-gated MoE (#44489). + # Gated MoE (act+gate) needs 2× intermediate; non-gated needs 1×. + if self.moe.is_act_and_mul: + w13_up_dim = 2 * intermediate_size_per_partition + else: + w13_up_dim = intermediate_size_per_partition w13_weight = torch.nn.Parameter( torch.empty( num_experts, - 2 * intermediate_size_per_partition, + w13_up_dim, hidden_size, dtype=params_dtype, ), @@ -677,7 +683,7 @@ def create_weights( w13_bias = torch.nn.Parameter( torch.zeros( num_experts, - 2 * intermediate_size_per_partition, + w13_up_dim, dtype=layer.orig_dtype, ), requires_grad=False,