Downloads · 30 days
18
19% of all-time downloads
blobbybob/potion-256d-v3
potion-256d-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 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…
Downloads · 30 days
18
19% of all-time downloads
All-time downloads
93
Public
Parameters
16.3M
82.3 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors16.9 MB · 89%
How the weights are stored.
I816.2M · 99%
From the Hugging Face model README
This Model2Vec model is an improved v3 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 model improves on potion-base-32M by +2.31 CatAVG through a stronger teacher model, contrastive tokenlearn training, born-again self-distillation, power normalization, and PCA 512D-to-256D compression.
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-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-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-v3 outperforms potion-base-32M by +2.31 CatAVG while remaining orders of magnitude faster than transformer models like all-MiniLM-L6-v2.
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}
}