Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions vllm/model_executor/layers/quantization/fp8.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
),
Expand All @@ -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,
Expand Down
Loading