Views
No views yet

Pre-built tokie tokenizer included (tokenizer.tkz). 5x faster tokenization, drop-in replacement for HuggingFace tokenizers.

pip install model2vecfrom_pretrained method:1from model2vec import StaticModel
2
3# Load a pretrained Model2Vec model
4model = StaticModel.from_pretrained("minishlab/potion-multilingual-128M")
5
6# Compute text embeddings
7embeddings = model.encode(["Example sentence"])| Model | Mean (Task) | Mean (TaskType) | BitMining | Class | Clust | InstRet | MultiClass | PairClass | Rank | Ret | STS |
|---|---|---|---|---|---|---|---|---|---|---|---|
| LaBSE | 52.07 | 45.65 | 76.35 | 54.60 | 38.08 | -3.00 | 20.12 | 75.97 | 50.20 | 33.17 | 65.35 |
| potion-multilingual-128M | 47.31 | 40.40 | 40.72 | 52.36 | 38.80 | -2.08 | 15.95 | 71.39 | 47.39 | 37.86 | 61.23 |
| static-similarity-mrl-multilingual-v1 | 47.24 | 41.38 | 50.62 | 48.60 | 30.67 | -1.24 | 14.74 | 74.34 | 49.45 | 41.21 | 64.02 |
| M2V_multilingual_output | 42.13 | 35.89 | 36.88 | 49.75 | 30.09 | -0.07 | 14.34 | 69.74 | 41.51 | 25.42 | 55.33 |
1@software{minishlab2024model2vec,
2 author = {Stephan Tulkens and {van Dongen}, Thomas},
3 title = {Model2Vec: Fast State-of-the-Art Static Embeddings},
4 year = {2024},
5 publisher = {Zenodo},
6 doi = {10.5281/zenodo.17270888},
7 url = {https://github.com/MinishLab/model2vec},
8 license = {MIT}
9}