Skip to content

Commit 11bf737

Browse files
yewentao256gemini-code-assist[bot]
authored andcommitted
[Bug] Fix AttributeError: 'FusedMoE' object has no attribute 'w13_weight_scale'. Did you mean: 'w13_weight_scale_inv' (vllm-project#25519)
Signed-off-by: yewentao256 <zhyanwentao@126.com> Signed-off-by: Wentao Ye <44945378+yewentao256@users.noreply.github.com> Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> Signed-off-by: gaojc <1055866782@qq.com>
1 parent 2b90306 commit 11bf737

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

vllm/model_executor/warmup/deep_gemm_warmup.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,11 @@ def _extract_data_from_fused_moe_module(
5353
"""
5454
assert isinstance(m, FusedMoE)
5555
w13 = m.w13_weight
56-
w13_s = getattr(m, "w13_weight_scale_inv", m.w13_weight_scale)
56+
w13_s = m.w13_weight_scale_inv if hasattr(
57+
m, "w13_weight_scale_inv") else m.w13_weight_scale
5758
w2 = m.w2_weight
58-
w2_s = getattr(m, "w2_weight_scale_inv", m.w2_weight_scale)
59+
w2_s = m.w2_weight_scale_inv if hasattr(
60+
m, "w2_weight_scale_inv") else m.w2_weight_scale
5961
num_topk = m.top_k
6062

6163
assert isinstance(w13, torch.Tensor)

0 commit comments

Comments
 (0)