Differnt Tokenizer #1098
Replies: 1 comment
|
Yes, it's possible, but it's not as simple as swapping the tokenizer. The tokenizer defines the model's vocabulary, so changing it also changes the embedding matrices. When moving from a Llama 2 tokenizer to a Llama 3 tokenizer, you need to consider the following:
If you're pretraining from scratch, then this is much simpler:
If your goal is to continue pretraining from an existing Llama 2 checkpoint, expect to reuse the transformer blocks while reinitializing the token embedding layer (and output head if necessary). The model will then need additional training to learn representations for the new vocabulary. If this answer helped or pointed you in the right direction, I'd appreciate it if you could mark it as the accepted answer so it's easier for others with the same issue to find. Also, if you found my contribution useful, I'd appreciate it if you could check out my GitHub profile, follow me, and star any repositories you find interesting. GitHub: https://github.com/Advait251206 |
Uh oh!
There was an error while loading. Please reload this page.
Your question
Is there a way to start training on a llama2 with a llama3 tokenizer? I plan on doing all the pretraining myself, if so and someone can provide any information please let me know.
All reactions