github.devotd.
NewRAG & retrieval

minishlab/model2vec v0.10.0 — A model distillation tool for static embeddings

minishlab/model2vec is a Python tool that converts a pretrained sentence embedding model (Sentence Transformer) into a small, fast static embedding model, and the latest release in the provided record is v0.10.0.

Repositoryminishlab/model2vec ↗

minishlab/model2vec is a Python tool that converts a pretrained sentence embedding model (Sentence Transformer) into a small, fast static embedding model, and the latest release in the provided record is v0.10.0.

GitHub description: Fast State-of-the-Art Static Embeddings

stars
★ 2.3K
Forks
128
Language
Python
License
MIT
Latest release
v0.10.0
Read original source ↗View on GitHub ↗

minishlab/model2vec is a Python tool that converts a pretrained sentence embedding model (Sentence Transformer) into a small, fast static embedding model. An embedding is a representation that turns text into numeric vectors for search or classification, and static embeddings work by looking up vectors that were computed ahead of time instead of running the neural network every time you use them. The latest release in the provided record is v0.10.0, but it has no changelog entries, so what this version addressed cannot be confirmed.

The core idea is distillation: moving the knowledge of a large model into a far smaller table. The README states that it can reduce model size by up to 50x and speed up CPU inference by up to 500x. You can distill with a pretrained model loaded in, or with no dataset at all, and you can fine-tune for classification, similarity, regression, and pairwise similarity tasks. Potion, shipped alongside it, is a collection of embedding models you can download and use right away. The repository was created on July 18, 2024, is licensed under MIT, and has 2250 stars.

That said, 50x and 500x are only the maximum figures the README presents, and no separately measured comparison data is given. The README adds that performance may degrade slightly. In the evaluation record, only the momentum score of 2.1 out of 10 remains, while the novelty, technology, and completeness scores are empty. It can be seen as an option for choosing lightweight embeddings, but from this record alone it is hard to gauge how much performance degrades.