remove `sentence-transformers` dependency
as far as I can tell, the sentence-transformers dependency is not necessary for this code to run, only as a shorthand for model loading in cmd. Because installing sentence-transformers also installs torch, sentencepiece, tokenizers and transformers itself, this is quite a big dependency to package. Maybe the installation of sentence-transformers can be split off into an optional dependency?
i.e., pip install mteb[sentencetransformers] could install mteb packaged with sentencetransformers. When running the functionality that requires sentencetransformers, the user could be prompted to install it.
Good point, some thoughts:
- Some evaluators use torch (tho could likely use numpy instead in those cases or just add torch to dependencies)
- transformers/tokenizers/sentencepiece is indeed unnecessary for other models; There are a few sentence_transformers imports that need to be moved into try/except clauses I think
Overall, it should be easily doable & it'd be great to remove some complexity that way. Would you be interested in integrating this? I'd be very happy to help along the way!
I'll open a PR to take a stab at it, and will let you know!
We are currently heavily designed toward sentence transformers. I believe this is a reasonable approach, though we could likely make sentence-transformer an optional dependency. We would welcome a PR on this, but otherwise I will close this issue for now.