From 6469038b149425e25b77c1ef93adf0e7712fd100 Mon Sep 17 00:00:00 2001 From: Michael Greenbaum <48786769+mgtk77@users.noreply.github.com> Date: Tue, 4 Feb 2025 14:58:48 +0200 Subject: [PATCH] [Bugfix] Fix loading of fine-tuned models based on Phi-3-Small (#12689) Signed-off-by: Michael Greenbaum Co-authored-by: Michael Greenbaum --- vllm/model_executor/models/phi3_small.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/vllm/model_executor/models/phi3_small.py b/vllm/model_executor/models/phi3_small.py index a8b7e9b2a5958..873e9d37771da 100644 --- a/vllm/model_executor/models/phi3_small.py +++ b/vllm/model_executor/models/phi3_small.py @@ -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)