Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

For peft trainiing how to handle tokenizer changed? #3648

Open
zhanglu0704 opened this issue Aug 9, 2023 · 0 comments
Open

For peft trainiing how to handle tokenizer changed? #3648

zhanglu0704 opened this issue Aug 9, 2023 · 0 comments

Comments

@zhanglu0704
Copy link
Contributor

If the model's num_embeddings is 10000,but we change the tokenizer to 10007.
After SFT training the model's num_embeddings will be 10016, that because in model/model_training/utils/utils.py get_model(conf, tokenizer, pad_vocab_size_to_multiple_of=16, check_freeze_layer=True) has parameter pad_vocab_size_to_multiple_of=16.
But when we try to start a peft training, It will fail because of the following code:
if len(tokenizer) != n_embs and check_freeze_layer:
assert not conf.freeze_layer, "Cannot change the number of embeddings if the model is frozen."

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant