Model2Vec is a technique to turn any sentence transformer into a really small static model, reducing model size by a factor up to 50 and making the models up to 500 times faster, with a small drop in performance. Our best model is the most performant static embedding model in the world. For a full list of our models, check out our HuggingFace Hub page.

Quick Start

Install Model2Vec with the following command:

pip install model2vec

Then, you can use it like this:

from model2vec import Model2Vec

model = Model2Vec.from_pretrained("minishlab/potion-base-8M")
embeddings = model.encode(["Hello world", "Static embeddings are great!"])

For advanced usage, check out the other documentation pages.