[Bugfix] Fix weight loading issues caused by #41184 (#45054)

Signed-off-by: Bill Nell <bnell@redhat.com>
This commit is contained in:
bnellnm
2026-06-10 01:20:13 -04:00
committed by GitHub
parent 2c9c07c85e
commit f4966f8b3d
5 changed files with 55 additions and 25 deletions
+12 -2
View File
@@ -187,8 +187,18 @@ class Qwen3MoeLLMModel(Qwen3MoeModel):
"base_layer." if any(".base_layer." in name for name in params_dict) else ""
)
fused_expert_params_mapping = [
(f"experts.{base_layer}w13_weight", "experts.gate_up_proj", 0, "w1"),
(f"experts.{base_layer}w2_weight", "experts.down_proj", 0, "w2"),
(
f"experts.routed_experts.{base_layer}w13_weight",
"experts.gate_up_proj",
0,
"w1",
),
(
f"experts.routed_experts.{base_layer}w2_weight",
"experts.down_proj",
0,
"w2",
),
]
num_experts = self.config.num_experts
for name, loaded_weight in weights: