Bug: Fix weight loader error when LM head weights are tied (#3766)
This commit is contained in:
@@ -486,6 +486,8 @@ class TorchNativeLlamaForCausalLM(nn.Module):
|
||||
continue
|
||||
if name.startswith("model.vision_tower") and name not in params_dict:
|
||||
continue
|
||||
if self.config.tie_word_embeddings and "lm_head.weight" in name:
|
||||
continue
|
||||
|
||||
for param_name, weight_name, shard_id in stacked_params_mapping:
|
||||
if weight_name not in name:
|
||||
|
||||
Reference in New Issue
Block a user