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

Issue with tokenizer wrapper #644

Open
davidbrandfonbrener opened this issue Jul 8, 2024 · 0 comments
Open

Issue with tokenizer wrapper #644

davidbrandfonbrener opened this issue Jul 8, 2024 · 0 comments
Labels
type/question An issue that's a question

Comments

@davidbrandfonbrener
Copy link
Contributor

❓ The question

the tokenizer wrapper causes unintended behavior when the tokenizer has a bos token (like the llama tokenizers). In particular, the call to the base_tokenizer encode function will add bos tokens even when add_special_tokens=False.

The issue is that the default here is for the base_tokenizer to have add_special_tokens=True.

This should be fairly easy to fix, but to properly handle tokenizers with bos tokens, the wrapper would need to be changed more broadly.

This also raised the question for me, why is this wrapper needed in the first place instead of using the huggingface library? I wanted to better understand the motivation before making changes.

@davidbrandfonbrener davidbrandfonbrener added the type/question An issue that's a question label Jul 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/question An issue that's a question
Projects
None yet
Development

No branches or pull requests

1 participant