Model2Vec
Safetensors
sentence-transformers
English
embeddings
static-embeddings
tokenlearn
compact
tiny
micro
Eval Results (legacy)
8-bit precision
Instructions to use blobbybob/potion-mxbai-micro with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Model2Vec
How to use blobbybob/potion-mxbai-micro with Model2Vec:
from model2vec import StaticModel model = StaticModel.from_pretrained("blobbybob/potion-mxbai-micro") - sentence-transformers
How to use blobbybob/potion-mxbai-micro with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("blobbybob/potion-mxbai-micro") sentences = [ "The weather is lovely today.", "It's so sunny outside!", "He drove to the stadium." ] embeddings = model.encode(sentences) similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [3, 3] - Notebooks
- Google Colab
- Kaggle
| language: | |
| - en | |
| license: apache-2.0 | |
| library_name: model2vec | |
| tags: | |
| - model2vec | |
| - sentence-transformers | |
| - embeddings | |
| - static-embeddings | |
| - tokenlearn | |
| - compact | |
| - tiny | |
| - micro | |
| base_model: mixedbread-ai/mxbai-embed-large-v1 | |
| model-index: | |
| - name: potion-mxbai-micro | |
| results: | |
| - task: | |
| type: STS | |
| dataset: | |
| type: mteb/stsbenchmark-sts | |
| name: MTEB STS (English, 10 tasks) | |
| metrics: | |
| - type: spearman_cosine | |
| value: 71.04 | |
| - task: | |
| type: Classification | |
| dataset: | |
| type: mteb/banking77 | |
| name: MTEB Classification (English, 12 tasks) | |
| metrics: | |
| - type: accuracy | |
| value: 59.66 | |
| - task: | |
| type: PairClassification | |
| dataset: | |
| type: mteb/twittersemeval2015 | |
| name: MTEB PairClassification (English, 3 tasks) | |
| metrics: | |
| - type: ap | |
| value: 76.02 | |
| # potion-mxbai-micro | |
| A **700KB** static embedding model. Yes, really. Seven hundred kilobytes for useful sentence embeddings. | |
| ## Highlights | |
| - **68.91 avg** on full MTEB English (STS + Classification + PairClassification, 25 tasks) | |
| - **700KB** total model size β fits in an email attachment | |
| - **256 dimensions** β same output dimensionality as the full model | |
| - **80-88x faster** than all-MiniLM-L6-v2 on CPU | |
| - Pure numpy inference β no GPU needed | |
| - Drop-in compatible with model2vec and sentence-transformers | |
| ## How It Was Made | |
| 1. Start with our best 256D model ([potion-mxbai-256d-v2](https://huggingface.co/blobbybob/potion-mxbai-256d-v2), 70.98 avg) | |
| 2. Apply model2vec's vocabulary quantization: cluster the 29,525 token embeddings into 2,000 centroids using k-means | |
| 3. Each token maps to its nearest centroid via a token mapping table | |
| 4. The full tokenizer is preserved β all text still tokenizes correctly | |
| The result is a 2,000-row embedding table at 256D with int8 quantization. Tokens that are semantically similar share the same embedding vector, which acts as a natural regularizer. | |
| ## Benchmark Results (Full MTEB English Suite) | |
| | Model | STS | Classification | PairClassification | **Avg** | **Size** | | |
| |-------|-----|----------------|-------------------|---------|----------| | |
| | [potion-mxbai-2m-512d](https://huggingface.co/blobbybob/potion-mxbai-2m-512d) | 74.15 | 65.44 | 76.80 | **72.13** | ~125MB | | |
| | [potion-mxbai-256d-v2](https://huggingface.co/blobbybob/potion-mxbai-256d-v2) | 73.79 | 63.23 | 77.33 | **71.45** | 7.5MB | | |
| | [potion-mxbai-128d-v2](https://huggingface.co/blobbybob/potion-mxbai-128d-v2) | 72.56 | 61.48 | 75.45 | **69.83** | 3.9MB | | |
| | **potion-mxbai-micro** (this) | 71.04 | 59.66 | 76.02 | **68.91** | **0.7MB** | | |
| Evaluated on 25 tasks (10 STS, 12 Classification, 3 PairClassification), English subsets only. | |
| ## Usage | |
| ```python | |
| from model2vec import StaticModel | |
| model = StaticModel.from_pretrained("blobbybob/potion-mxbai-micro") | |
| embeddings = model.encode(["Hello world", "Static embeddings are fast"]) | |
| ``` | |
| With Sentence Transformers: | |
| ```python | |
| from sentence_transformers import SentenceTransformer | |
| model = SentenceTransformer("blobbybob/potion-mxbai-micro") | |
| embeddings = model.encode(["Hello world", "Static embeddings are fast"]) | |
| ``` | |
| ## When to use this model | |
| - You need embeddings in **extremely constrained environments** (embedded systems, IoT, WASM) | |
| - You're building a **browser extension** or **mobile app** where every KB counts | |
| - You want a **fallback embedding model** that loads instantly | |
| - You need to embed millions of documents and want to minimize **index storage** | |
| - **Prototyping** β get semantic search working in seconds, upgrade to larger models later | |
| ## Model Family | |
| | Model | Avg | Size | Best for | | |
| |-------|-----|------|----------| | |
| | [potion-mxbai-2m-512d](https://huggingface.co/blobbybob/potion-mxbai-2m-512d) | 72.13 | ~125MB | Maximum quality | | |
| | [potion-mxbai-256d-v2](https://huggingface.co/blobbybob/potion-mxbai-256d-v2) | 71.45 | 7.5MB | Best quality/size balance | | |
| | [potion-mxbai-128d-v2](https://huggingface.co/blobbybob/potion-mxbai-128d-v2) | 69.83 | 3.9MB | Compact deployments | | |
| | **potion-mxbai-micro** | **68.91** | **0.7MB** | Ultra-tiny / embedded | | |
| ## Citation | |
| ```bibtex | |
| @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} | |
| } | |
| ``` | |