🏎️ Today I'm introducing a method to train static embedding models that run 100x to 400x faster on CPU than common embedding models, while retaining 85%+ of the quality! Including 2 fully open models: training scripts, datasets, metrics. 
text
🏎️ Today I'm introducing a method to train static embedding models that run 100x to 400x faster on CPU than common embedding models, while retaining 85%+ of the quality! Including 2 fully open models: training scripts, datasets, metrics. 
new_line
new_line
We apply our recipe to train 2 Static Embedding models that we release today! We release:
text
We apply our recipe to train 2 Static Embedding models that we release today! We release:
new_line
2️⃣ an English Retrieval model and a general-purpose Multilingual similarity model (e.g. classification, clustering, etc.), both Apache 2.0
text
2️⃣ an English Retrieval model and a general-purpose Multilingual similarity model (e.g. classification, clustering, etc.), both Apache 2.0
new_line
🧠 my modern training strategy: ideation -> dataset choice -> implementation -> evaluation
text
🧠 my modern training strategy: ideation -> dataset choice -> implementation -> evaluation
new_line
📜 my training scripts, using the Sentence Transformers library
text
📜 my training scripts, using the Sentence Transformers library
new_line
📊 my Weights & Biases reports with losses & metrics
text
📊 my Weights & Biases reports with losses & metrics
new_line
📕 my list of 30 training and 13 evaluation datasets
text
📕 my list of 30 training and 13 evaluation datasets
new_line
new_line
The 2 Static Embedding models have the following properties:
text
The 2 Static Embedding models have the following properties:
new_line
🏎️ Extremely fast, e.g. 107500 sentences per second on a consumer CPU, compared to 270 for 'all-mpnet-base-v2' and 56 for 'gte-large-en-v1.5'
text
🏎️ Extremely fast, e.g. 107500 sentences per second on a consumer CPU, compared to 270 for 'all-mpnet-base-v2' and 56 for 'gte-large-en-v1.5'
new_line
0️⃣ Zero active parameters: No Transformer blocks, no attention, not even a matrix multiplication. Super speed!
text
0️⃣ Zero active parameters: No Transformer blocks, no attention, not even a matrix multiplication. Super speed!
new_line
📏 No maximum sequence length! Embed texts at any length (note: longer texts may embed worse)
text
📏 No maximum sequence length! Embed texts at any length (note: longer texts may embed worse)
new_line
📐 Linear instead of exponential complexity: 2x longer text takes 2x longer, instead of 2.5x or more.
text
📐 Linear instead of exponential complexity: 2x longer text takes 2x longer, instead of 2.5x or more.
new_line
🪆 Matryoshka support: allow you to truncate embeddings with minimal performance loss (e.g. 4x smaller with a 0.56% perf. decrease for English Similarity tasks)
text
🪆 Matryoshka support: allow you to truncate embeddings with minimal performance loss (e.g. 4x smaller with a 0.56% perf. decrease for English Similarity tasks)
new_line
new_line
Check out the full blogpost if you'd like to 1) use these lightning-fast models or 2) learn how to train them with consumer-level hardware: 
text
Check out the full blogpost if you'd like to 1) use these lightning-fast models or 2) learn how to train them with consumer-level hardware: 
https://huggingface.co/blog/static-embeddings
https://huggingface.co/blog/static-embeddings
link
new_line
new_line
The blogpost contains a lengthy list of possible advancements; I'm very confident that our 2 models are only the tip of the iceberg, and we may be able to get even better performance. 
text
The blogpost contains a lengthy list of possible advancements; I'm very confident that our 2 models are only the tip of the iceberg, and we may be able to get even better performance. 
new_line
new_line
Alternatively, check out the models:
text
Alternatively, check out the models:
new_line
* 
text
* 
https://huggingface.co/sentence-transformers/static-retrieval-mrl-en-v1
sentence-transformers/static-retrieval-mrl-en-v1
model
resource
https://huggingface.co/sentence-transformers/static-retrieval-mrl-en-v1
new_line
* 
text
* 
https://huggingface.co/sentence-transformers/static-similarity-mrl-multilingual-v1
sentence-transformers/static-similarity-mrl-multilingual-v1
model
resource
https://huggingface.co/sentence-transformers/static-similarity-mrl-multilingual-v1
🏎️ Today I'm introducing a method to train static embedding models that run 100x to 400x faster on CPU than common embedding models, while retaining 85%+ of the quality! Including 2 fully open models: training scripts, datasets, metrics. 

We apply our recipe to train 2 Static Embedding models that we release today! We release:
2️⃣ an English Retrieval model and a general-purpose Multilingual similarity model (e.g. classification, clustering, etc.), both Apache 2.0
🧠 my modern training strategy: ideation -> dataset choice -> implementation -> evaluation
📜 my training scripts, using the Sentence Transformers library
📊 my Weights & Biases reports with losses & metrics
📕 my list of 30 training and 13 evaluation datasets

The 2 Static Embedding models have the following properties:
🏎️ Extremely fast, e.g. 107500 sentences per second on a consumer CPU, compared to 270 for 'all-mpnet-base-v2' and 56 for 'gte-large-en-v1.5'
0️⃣ Zero active parameters: No Transformer blocks, no attention, not even a matrix multiplication. Super speed!
📏 No maximum sequence length! Embed texts at any length (note: longer texts may embed worse)
📐 Linear instead of exponential complexity: 2x longer text takes 2x longer, instead of 2.5x or more.
🪆 Matryoshka support: allow you to truncate embeddings with minimal performance loss (e.g. 4x smaller with a 0.56% perf. decrease for English Similarity tasks)

Check out the full blogpost if you'd like to 1) use these lightning-fast models or 2) learn how to train them with consumer-level hardware: https://huggingface.co/blog/static-embeddings

The blogpost contains a lengthy list of possible advancements; I'm very confident that our 2 models are only the tip of the iceberg, and we may be able to get even better performance. 

Alternatively, check out the models:
* https://huggingface.co/sentence-transformers/static-retrieval-mrl-en-v1
* https://huggingface.co/sentence-transformers/static-similarity-mrl-multilingual-v1
❤️
anakin87 John6666 reonyy clem catastropiyush arceofrancisco davanstrien DeathGodlike zonblade sigridjineth s-emanuilov ceyda Tonic ilovetechnofr ljupco ctranslate2-4you muhtasham
🔥
catastropiyush davanstrien joe32140 DeathGodlike zonblade Tonic SquirrellyMatt muhtasham
634262af8d8089ebaefd410e
https://cdn-avatars.huggingface.co/v1/production/uploads/634262af8d8089ebaefd410e/pcnqe74uMV90K3HVuM76F.png
Fizz 🏳️‍⚧️
Fizzarolli
user