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

Add tokenizer config classes #1262

Merged
merged 2 commits into from Feb 8, 2023
Merged

Add tokenizer config classes #1262

merged 2 commits into from Feb 8, 2023

Conversation

jackapbutler
Copy link
Contributor

@jackapbutler jackapbutler commented Feb 6, 2023

Fixes #990

I've just refactored out the tokenizer configuration details from the get_tokenizer function. This should hopefully;

  • Make it easier to add new tokenizers without changing logic in get_tokenizer.
  • Make it easier to see what get_tokenizer is doing without having to worry about the special tokens of each model type.

@github-actions
Copy link

github-actions bot commented Feb 6, 2023

pre-commit failed.
Please run pre-commit run --all-files locally and commit the changes.
Find more information in the repository's CONTRIBUTING.md

1 similar comment
@github-actions
Copy link

github-actions bot commented Feb 6, 2023

pre-commit failed.
Please run pre-commit run --all-files locally and commit the changes.
Find more information in the repository's CONTRIBUTING.md

@andreaskoepf andreaskoepf added the ml label Feb 6, 2023
Copy link
Collaborator

@sanagno sanagno left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good although not too much more simple :))

@theblackcat102 theblackcat102 merged commit 59dbfea into LAION-AI:main Feb 8, 2023
@jackapbutler jackapbutler deleted the create-tokeniser-configs branch February 8, 2023 08:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

get_tokenizer in utils.py needs to be cleaned up
4 participants