Skip to content

Commit

Permalink
make sure to tie weights, even if we aren't resizing
Browse files Browse the repository at this point in the history
  • Loading branch information
winglian committed Sep 15, 2023
1 parent 2349ad5 commit 8133f3b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/axolotl/utils/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,8 @@ def load_model(
)
if model.get_input_embeddings().num_embeddings < embeddings_len:
model.resize_token_embeddings(embeddings_len)
else:
model.tie_weights()

if (
hasattr(model.config, "max_position_embeddings")
Expand Down

0 comments on commit 8133f3b

Please sign in to comment.