-
Notifications
You must be signed in to change notification settings - Fork 531
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
Support for using tiktoken tokenizers #610
Conversation
wait for #616 before merging this |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, pending minor comments + pyright.import_or_skip() is skipping the tests on CI.
feel free to address in a follow up PR
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed the tests carefully, and added some comments.
Also, do we need to add tiktoken
as a dependency in setup.py
?
@abhi-mosaic tiktoken is added as an optional dep group already |
This PR adds support for tiktoken tokenizers via a huggingface compatible wrapper. It is possible that there are pieces of the wrapped implementation that are not perfect, but the unit test coverage should cover the main scenarios that we use.
The tokenizer can be loaded in a yaml via