Update weight rename check for Qwen3 Embeddings (#17535)

This commit is contained in:
satyamk7054
2026-02-03 13:55:11 -08:00
committed by GitHub
parent e867040fc6
commit 793bf9fc06

View File

@@ -490,7 +490,11 @@ class Qwen3ForCausalLM(nn.Module):
params_dict = dict(self.named_parameters())
for name, loaded_weight in weights:
if "Embedding" in self.config.name_or_path:
if not name.startswith("model.") and (
name.startswith("layers.")
or name.startswith("embed_tokens.")
or name.startswith("norm.")
):
name = add_prefix(name, "model")
if name == "model.embed_tokens.weight":