MinishLab / model2vec

Distill a Small Static Model from any Sentence Transformer
https://minishlab.github.io/
MIT License
413 stars 18 forks source link

Python 3.9 Support? #95

Closed davidmezzetti closed 3 weeks ago

davidmezzetti commented 1 month ago

Hello, first off nice project!

I was thinking of supporting this library in txtai but I see it requires Python 3.10+.

Is there something in the code that requires Python 3.10 or could this project work with Python 3.9? If so, could that requirement be opened up to >=3.9?

Pringled commented 1 month ago

Hi @davidmezzetti, thanks for your interest in the project!

We can definitely add support for Python 3.9 if that makes it possible for you to support the library in txtai, sounds like a great fit. I've just created a PR to add support for this: https://github.com/MinishLab/model2vec/pull/96. I think we can include this in the next release 👍 .

davidmezzetti commented 1 month ago

Great. Just respond back when the release goes out and I'll add this as another vectorization method.

Should be an easy change on my side based on the example code I see. I appreciate it!

Pringled commented 1 month ago

Great, will do, thanks!

Pringled commented 3 weeks ago

Hi @davidmezzetti, we just released the latest model2vec version, including python3.9 support 🎉 . Full changelog is available here: https://github.com/MinishLab/model2vec/releases/tag/v0.3.0. The other big change is that inference now only depends on numpy, which might be nice for your usecase as well since the dependency is much more lightweight. If you do need distill functionality as well, you can install that with pip install model2vec[distill].

davidmezzetti commented 3 weeks ago

Sounds great, I'll take a look and it will be in the next release of txtai!

davidmezzetti commented 3 weeks ago

Just added this in with this https://github.com/neuml/txtai/issues/801.