This
Model2Vec
model is pre-trained using
Tokenlearn
on all languages in the
C4 dataset
. It is a distilled version of the
BAAI/bge-m3
Sentence Transformer. 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.
potion-multilingual-128M is a multilingual model, trained on 101 languages, and is capable of generating embeddings for any text in any language. The model produces 256 dimensional embeddings, and has a theoretically unlimited context length since embeddings are static (pre-computed).
Installation
Install model2vec using pip:
pip install model2vec
Usage
Using Model2Vec
The
Model2Vec library
is the fastest and most lightweight way to run Model2Vec models.
Load this model using the
from_pretrained
method:
from model2vec import StaticModel
# Load a pretrained Model2Vec model
model = StaticModel.from_pretrained("minishlab/potion-multilingual-128M")
# 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:
Distillation: first, a model is distilled from a sentence transformer model using Model2Vec.
Training data creation: the sentence transformer model is used to create training data by creating mean output embeddings on a large corpus. In this case, 2 million sentences from the C4 dataset were used from 101 different languages, sampled using temperature-smoothed sampling proportional to the language size.
Training: the distilled model is trained on the training data using Tokenlearn.
If you use Model2Vec in your research, please cite the following:
@article{minishlab2024model2vec,
author = {Tulkens, Stephan and {van Dongen}, Thomas},
title = {Model2Vec: Fast State-of-the-Art Static Embeddings},
year = {2024},
url = {https://github.com/MinishLab/model2vec}
}
Runs of minishlab potion-multilingual-128M on huggingface.co
93.7K
Total runs
0
24-hour runs
1.8K
3-day runs
1.5K
7-day runs
-14.8K
30-day runs
More Information About potion-multilingual-128M huggingface.co Model
potion-multilingual-128M huggingface.co is an AI model on huggingface.co that provides potion-multilingual-128M's model effect (), which can be used instantly with this minishlab potion-multilingual-128M model. huggingface.co supports a free trial of the potion-multilingual-128M model, and also provides paid use of the potion-multilingual-128M. Support call potion-multilingual-128M model through api, including Node.js, Python, http.
potion-multilingual-128M huggingface.co is an online trial and call api platform, which integrates potion-multilingual-128M's modeling effects, including api services, and provides a free online trial of potion-multilingual-128M, you can try potion-multilingual-128M online for free by clicking the link below.
minishlab potion-multilingual-128M online free url in huggingface.co:
potion-multilingual-128M is an open source model from GitHub that offers a free installation service, and any user can find potion-multilingual-128M on GitHub to install. At the same time, huggingface.co provides the effect of potion-multilingual-128M install, users can directly use potion-multilingual-128M installed effect in huggingface.co for debugging and trial. It also supports api for free installation.
potion-multilingual-128M install url in huggingface.co: