Fix weight tying (#51665)
Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
This commit is contained in:
@@ -40,11 +40,7 @@ class CausalMixin(VllmModelForTextGeneration):
|
||||
vllm_config=vllm_config, prefix=prefix
|
||||
)
|
||||
|
||||
# Tell `Base.load_weights` to skip
|
||||
# `lm_head` if the model has tied word embeddings
|
||||
tie_word_embeddings = self._get_tie_word_embeddings()
|
||||
if tie_word_embeddings:
|
||||
self.skip_prefixes.append("lm_head.")
|
||||
|
||||
if self.pp_group.is_last_rank:
|
||||
self.lm_head = ParallelLMHead(
|
||||
|
||||
Reference in New Issue
Block a user