[Bugfix] Fix loading of fine-tuned models based on Phi-3-Small (#12689)

Signed-off-by: Michael Greenbaum <mgreenbaum@microsoft.com>
Co-authored-by: Michael Greenbaum <mgreenbaum@microsoft.com>
This commit is contained in:
Michael Greenbaum
2025-02-04 14:58:48 +02:00
committed by GitHub
parent 815079de8e
commit 6469038b14

View File

@ -476,6 +476,8 @@ class Phi3SmallForCausalLM(nn.Module, SupportsPP):
continue
if is_pp_missing_parameter(name, self):
continue
if "lm_head.weight" in name and self.config.tie_word_embeddings:
continue
param = params_dict[name]
weight_loader = getattr(param, "weight_loader",
default_weight_loader)