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

[sentence-transformers] Add sentencepiece dependency for running models with slow tokenizers only #432

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

tomaarsen
Copy link
Member

@tomaarsen tomaarsen commented Jun 25, 2024

Hello!

Pull Request overview

  • Add sentencepiece dependency for running models with slow tokenizers only

Details

See e.g. https://huggingface.co/rokn/slovlo-v1:
image

sentencepiece was removed as a required dependency for sentence-transformers, because most models don't require it anymore and it doesn't work well with Python 3.12 on Windows 11. Nowadays, we simply throw an error if it's required but not installed. However, the API Inference should have it installed to ensure that we can also run these models with slow tokenizers. I've verified locally that sentencepiece==0.2.0 works for e.g. that slovlo-v1 model.

  • Tom Aarsen

@tomaarsen tomaarsen requested a review from Narsil June 25, 2024 09:41
@tomaarsen
Copy link
Member Author

The same issue exists for some Camembert models, e.g.: https://huggingface.co/Photon-BR/sentence-camembert-large

  • Tom Aarsen

Copy link
Member

@osanseviero osanseviero left a comment

Choose a reason for hiding this comment

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

Makes sense!

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.

2 participants