diff --git a/vllm/model_executor/models/opt.py b/vllm/model_executor/models/opt.py index 88d2bcb9..47bc8adc 100644 --- a/vllm/model_executor/models/opt.py +++ b/vllm/model_executor/models/opt.py @@ -353,7 +353,7 @@ class OPTForCausalLM(nn.Module): ] params_dict = dict(self.named_parameters(remove_duplicate=False)) for name, loaded_weight in weights: - if "lm_head.weight" in name: + if "lm_head.weight" in name and self.config.tie_word_embeddings: continue if name.startswith("decoder."): name = "model." + name