Downloads · 30 days
22
17% of all-time downloads
blobbybob/potion-256d-compact-v3
potion-256d-compact-v3 is a machine learning model from blobbybob. Use it for the machine learning task on the model card, and read the license before you ship it in a product. It is set up for model2vec. The card lists the license as mit.
This Model2Vec model is an improved v3 compact static embedding model, pre-trained using Tokenlearn with contrastive learning and born-again self-distillation. It is distilled from mixedbread-ai/mxbai-embed-large-v1.…
Downloads · 30 days
22
17% of all-time downloads
All-time downloads
132
Public
Parameters
7.6M
38.5 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors7.9 MB · 95%
How the weights are stored.
I87.6M · 99%
From the Hugging Face model README
This Model2Vec model is an improved v3 compact static embedding model, pre-trained using Tokenlearn with contrastive learning and born-again self-distillation. It is distilled from mixedbread-ai/mxbai-embed-large-v1. It uses static embeddings, allowing text embeddings to be computed orders of magnitude faster on both GPU and CPU. It is designed for applications where computational resources are limited or where real-time performance is critical. This compact variant uses a curated 29.5K vocabulary for roughly half the size of the full potion-256d-v3 model, improving on potion-base-32M by +2.16 CatAVG.
Install model2vec using pip:
pip install model2vec
Load this model using the from_pretrained method:
from model2vec import StaticModel
# Load a pretrained Model2Vec model
model = StaticModel.from_pretrained("blobbybob/potion-256d-compact-v3")
# Compute text embeddings
embeddings = model.encode(["Example sentence"])
Model2vec creates a small, static model that outperforms other static embedding models by a large margin on all tasks on MTEB. This model is pre-trained using Tokenlearn. It's created using the following steps:
| Model | STS | Classification | PairClassification | CatAVG |
|---|---|---|---|---|
| potion-256d-compact-v3 | 79.75 | 62.74 | 73.57 | 72.02 |
| potion-256d-v3 | 79.32 | 63.23 | 73.97 | 72.17 |
| potion-base-32M | 78.97 | 61.42 | 69.18 | 69.86 |
| all-MiniLM-L6-v2 | 78.95 | 69.25 | 82.37 | 74.65 |
| GloVe 300d | 61.52 | 62.73 | 72.48 | 61.45 |
The results show that potion-256d-compact-v3 outperforms potion-base-32M by +2.16 CatAVG at a comparable model size, with only -0.15 CatAVG tradeoff compared to the full potion-256d-v3 model.
Please cite the Model2Vec repository if you use this model in your work.
@software{minishlab2024model2vec,
author = {Stephan Tulkens and {van Dongen}, Thomas},
title = {Model2Vec: Fast State-of-the-Art Static Embeddings},
year = {2024},
publisher = {Zenodo},
doi = {10.5281/zenodo.17270888},
url = {https://github.com/MinishLab/model2vec},
license = {MIT}
}