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

fix(tokenizer): handle fast tokenizer properly for bos/eos #914

Merged
merged 1 commit into from
Dec 8, 2023

Conversation

NanoCode012
Copy link
Collaborator

Reading through the FastLlama tokenizer docs, they stated:

If you want to change the bos_token or the eos_token, make sure to specify them when initializing the model, or call tokenizer.update_post_processor() to make sure that the post-processing is correctly done (otherwise the values of the first token and final token of an encoded sequence will not be correct). For more details, checkout [post-processors] (https://huggingface.co/docs/tokenizers/api/post-processors) documentation.

Ref: https://huggingface.co/docs/transformers/main/en/model_doc/llama#transformers.LlamaTokenizerFast

@NanoCode012 NanoCode012 merged commit fde091c into axolotl-ai-cloud:main Dec 8, 2023
4 checks passed
@NanoCode012 NanoCode012 deleted the fix/fasttokenizer branch December 8, 2023 02:31
mkeoliya pushed a commit to mkeoliya/axolotl that referenced this pull request Dec 15, 2023
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

Successfully merging this pull request may close these issues.

None yet

2 participants