From 177befa4723e03d5d14889155ac65759e854e728 Mon Sep 17 00:00:00 2001 From: yewentao256 Date: Tue, 23 Sep 2025 14:37:37 -0700 Subject: [PATCH 1/4] fix w13_weight_scale_inv no attr error Signed-off-by: yewentao256 --- vllm/model_executor/warmup/deep_gemm_warmup.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/vllm/model_executor/warmup/deep_gemm_warmup.py b/vllm/model_executor/warmup/deep_gemm_warmup.py index f6df85a50238..970d67cbaa58 100644 --- a/vllm/model_executor/warmup/deep_gemm_warmup.py +++ b/vllm/model_executor/warmup/deep_gemm_warmup.py @@ -53,9 +53,13 @@ def _extract_data_from_fused_moe_module( """ assert isinstance(m, FusedMoE) w13 = m.w13_weight - w13_s = getattr(m, "w13_weight_scale_inv", m.w13_weight_scale) + w13_s = getattr(m, "w13_weight_scale_inv", None) + if w13_s is None: + w13_s = m.w13_weight_scale w2 = m.w2_weight - w2_s = getattr(m, "w2_weight_scale_inv", m.w2_weight_scale) + w2_s = getattr(m, "w2_weight_scale_inv", None) + if w2_s is None: + w2_s = m.w2_weight_scale num_topk = m.top_k assert isinstance(w13, torch.Tensor) From e53e47abee4bb311c37576610a7a967463c54735 Mon Sep 17 00:00:00 2001 From: Wentao Ye <44945378+yewentao256@users.noreply.github.com> Date: Tue, 23 Sep 2025 17:54:35 -0400 Subject: [PATCH 2/4] Update vllm/model_executor/warmup/deep_gemm_warmup.py Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> Signed-off-by: Wentao Ye <44945378+yewentao256@users.noreply.github.com> --- vllm/model_executor/warmup/deep_gemm_warmup.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/vllm/model_executor/warmup/deep_gemm_warmup.py b/vllm/model_executor/warmup/deep_gemm_warmup.py index 970d67cbaa58..b104627b7e18 100644 --- a/vllm/model_executor/warmup/deep_gemm_warmup.py +++ b/vllm/model_executor/warmup/deep_gemm_warmup.py @@ -57,9 +57,7 @@ def _extract_data_from_fused_moe_module( if w13_s is None: w13_s = m.w13_weight_scale w2 = m.w2_weight - w2_s = getattr(m, "w2_weight_scale_inv", None) - if w2_s is None: - w2_s = m.w2_weight_scale + w2_s = m.w2_weight_scale_inv if hasattr(m, "w2_weight_scale_inv") else m.w2_weight_scale num_topk = m.top_k assert isinstance(w13, torch.Tensor) From 5de20e88876201f3b8fcac2346959a3b88db52f0 Mon Sep 17 00:00:00 2001 From: Wentao Ye <44945378+yewentao256@users.noreply.github.com> Date: Tue, 23 Sep 2025 17:54:41 -0400 Subject: [PATCH 3/4] Update vllm/model_executor/warmup/deep_gemm_warmup.py Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> Signed-off-by: Wentao Ye <44945378+yewentao256@users.noreply.github.com> --- vllm/model_executor/warmup/deep_gemm_warmup.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/vllm/model_executor/warmup/deep_gemm_warmup.py b/vllm/model_executor/warmup/deep_gemm_warmup.py index b104627b7e18..24b9b9062bc0 100644 --- a/vllm/model_executor/warmup/deep_gemm_warmup.py +++ b/vllm/model_executor/warmup/deep_gemm_warmup.py @@ -53,9 +53,7 @@ def _extract_data_from_fused_moe_module( """ assert isinstance(m, FusedMoE) w13 = m.w13_weight - w13_s = getattr(m, "w13_weight_scale_inv", None) - if w13_s is None: - w13_s = m.w13_weight_scale + w13_s = m.w13_weight_scale_inv if hasattr(m, "w13_weight_scale_inv") else m.w13_weight_scale w2 = m.w2_weight w2_s = m.w2_weight_scale_inv if hasattr(m, "w2_weight_scale_inv") else m.w2_weight_scale num_topk = m.top_k From bdcbcda8c47cda97559df5f70da7d6b8a77ec38e Mon Sep 17 00:00:00 2001 From: yewentao256 Date: Tue, 23 Sep 2025 15:19:07 -0700 Subject: [PATCH 4/4] fix pre commit Signed-off-by: yewentao256 --- vllm/model_executor/warmup/deep_gemm_warmup.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/vllm/model_executor/warmup/deep_gemm_warmup.py b/vllm/model_executor/warmup/deep_gemm_warmup.py index 24b9b9062bc0..e495f9ee4472 100644 --- a/vllm/model_executor/warmup/deep_gemm_warmup.py +++ b/vllm/model_executor/warmup/deep_gemm_warmup.py @@ -53,9 +53,11 @@ def _extract_data_from_fused_moe_module( """ assert isinstance(m, FusedMoE) w13 = m.w13_weight - w13_s = m.w13_weight_scale_inv if hasattr(m, "w13_weight_scale_inv") else m.w13_weight_scale + w13_s = m.w13_weight_scale_inv if hasattr( + m, "w13_weight_scale_inv") else m.w13_weight_scale w2 = m.w2_weight - w2_s = m.w2_weight_scale_inv if hasattr(m, "w2_weight_scale_inv") else m.w2_weight_scale + w2_s = m.w2_weight_scale_inv if hasattr( + m, "w2_weight_scale_inv") else m.w2_weight_scale num_topk = m.top_k assert isinstance(w13, torch.Tensor)