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: add_special_tokens in tokenize #144

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

rafvasq
Copy link
Contributor

@rafvasq rafvasq commented Sep 27, 2024

#66 made add_special_tokens true by default but its behaviour isn't replicated in /tokenize resulting in a different token count if ADD_SPECIAL_TOKENS is false. This PR fixes that by passing it in /tokenize and adds a test for the tokenize method, including a comparison between the number of tokens /tokenize and /generate returns.

Closes #141

@rafvasq rafvasq marked this pull request as ready for review September 27, 2024 20:19
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.

bug: tokenization in Tokenize and Generate does not match if ADD_SPECIAL_TOKENS=False
1 participant