Fix weight tying (#51665)
Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
This commit is contained in:
@@ -214,6 +214,5 @@ class ErnieMTP(nn.Module):
|
||||
if any(k in name for k in ("mtp", "embed_tokens", "lm_head")):
|
||||
yield name, weight
|
||||
|
||||
skip_prefixes = ["lm_head"] if self.config.tie_word_embeddings else []
|
||||
loader = AutoWeightsLoader(self, skip_prefixes=skip_prefixes)
|
||||
loader = AutoWeightsLoader(self)
|
||||
return loader.load_weights(_filter(weights), mapper=self.hf_to_vllm_mapper)
|
||||
|
||||
Reference in New Issue
Block a user