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
File size: 4,464 Bytes
c014964 4c529ac c014964 4c529ac c014964 4c529ac c014964 4c529ac c014964 4c529ac c014964 4c529ac c014964 4b7425b c014964 4c529ac c014964 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 | ---
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}
}
```
|