Skip to content

Commit

Permalink
Fix bug in setting output vocab size in tokensurgeon
Browse files Browse the repository at this point in the history
  • Loading branch information
cg123 committed Dec 1, 2024
1 parent 6f7a79e commit 2ab77ab
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mergekit/scripts/tokensurgeon.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ def main(
tokenizer.save_pretrained(out_path)
cfg_out = arch_info.config
try:
cfg_out.vocab_size = tokenizer.vocab_size
cfg_out.vocab_size = new_embed.shape[0]
except AttributeError:
LOG.error(
"Could not set vocab size in config.json - you may need to update it manually."
Expand Down

0 comments on commit 2ab77ab

Please sign in to comment.