[Bugfix][Qwen3-Next] add prefixes to shared_expert in qwen3-next and mlp in qwen2moe to successfully load ignored params in quantized models (#24960)

Signed-off-by: toncao <cpatonn@gmail.com>
Co-authored-by: toncao <cpatonn@gmail.com>
Co-authored-by: Jee Jee Li <pandaleefree@gmail.com>
This commit is contained in:
toncao
2025-09-18 12:08:50 +08:00
committed by GitHub
co-authored by toncao Jee Jee Li
parent b98219670f
commit 027d37df38
2 changed files with 26 additions and 23 deletions
+1
View File
@@ -138,6 +138,7 @@ class Qwen3NextSparseMoeBlock(nn.Module):
quant_config=quant_config,
reduce_results=self.experts.must_reduce_shared_expert_outputs(
),
prefix=f"{prefix}.shared_expert",
)
else:
self.shared_expert = None