This commit is contained in:
chen
2025-08-27 14:23:38 +08:00
committed by GitHub
parent d233e3c97c
commit 121ac85d7d

View File

@@ -257,7 +257,7 @@ class Qwen3ForCausalLM(ModelForCasualLM):
""" """
self.model.load_state_dict(state_dict) self.model.load_state_dict(state_dict)
if self.tie_word_embeddings: if self.tie_word_embeddings:
self.lm_head.load_state_dict({self.lm_head.weight_key: self.ernie.embed_tokens.embeddings.weight}) self.lm_head.load_state_dict({self.lm_head.weight_key: self.model.embed_tokens.embeddings.weight})
else: else:
self.lm_head.load_state_dict(state_dict) self.lm_head.load_state_dict(state_dict)