Minish (@minishlab) profile picture

Building Model2Vec, Semble, SemHash, and the Potion embedding models. GitHub: https://xitter.gq/t.co/WAoFTUEQ6O. HuggingFace: https://xitter.gq/t.co/1khDD6Y4YB

Joined January 2025
Minish retweeted
โšก @minishlab's Blink static models bring fast CPU embeddings in 8M (English) and 64M (100+ languages) sizes! Both give you 256d vectors and work directly with Sentence Transformers. Here's blink-8M finding the right help article ๐Ÿงต
1
5
53
1,299
I have a confession to make: I am addicted to finding new ways of making your search pipeline faster and more performant. And we all know the main pain point of any search pipeline: switching embedding models. When you have millions of points, your model starts to be too slow on cheap CPUs, so you often need to switch to expensive GPUs๐Ÿ’ฐ But there's a way out: it's called static embeddings, and, for my latest blog post at @qdrant_engine in collaboration with @minishlab, we managed to embed 32.9M MIRACL passages in 35-40 minutes with their potion models running in Fastembed (which we heavily optimized for static models). Blog link๐Ÿ‘‡
1
4
23
781
How small can we go with the hardware we run our embedding models on? Turns out, pretty small: in my latest blog post at @qdrant_engine, I took potion-base-2M by @minishlab and, with some no_std Rust ๐Ÿฆ€, I made it run on a ESP32 microcontroller with 16MB of memory. And it ran pretty fast as well! It embedded a dozen tokens in approximately 1.2ms, meaning a throughput of 830 embeddings/s (assuming very short texts). Of course, this is far from the 11-15k embeddings/s that I saw static models produce on my Mac with 48GB of unified memory (more on that very soon ๐Ÿ‘€) , but it's pretty impressive considering it uses 3000x less memory. Also, it's proof that we can start thinking about running search ๐˜ต๐˜ณ๐˜ถ๐˜ญ๐˜บ on the edge. Link to the blog below๐Ÿ‘‡
3
8
2
16
1,469
Have you ever generated 32.8 million embeddings in 35 minutes? We did, using the potion static embedding models from @minishlab, that we recently integrated in Fastembed (our framework for local embeddings inference). In our latest article in collaboration with Minish, we dive into what static embeddings are, what optimizations we introduced in Fastembed to make them go brr, and what tradeoffs they carry in terms of retrieval quality. Linkย below๐Ÿ‘‡
3
6
23
925
semhash is so so so convenient and fast
2
1
2
16
2,031
Some guy forked our "model2vec-rs" crate, and put it under the "model2vec" name on crates io and then didn't tell us about it. See here: crates.io/crates/model2vec Like what's the goal here except name squatting.
1
1
5
300
The deduplication Space by @minishlab just got a fresh update, allowing you to remove near duplicates in (training) datasets. Details in ๐Ÿงต
2
8
82
2,632
Do not sleep on deduplication! Use this FREE app for semantic deduplication of multiple massive datasets. This is how it works: - You pick one all more datasets from the Hub - It make a semantic embedding of each row - It remove removes near duplicates based on a threshold like 0.9 - You can push the deduplicated dataset back to a new repo, and get to work.
3
4
2
19
3,109
๐Ÿ“ข ๐—”๐—ป๐—ป๐—ผ๐˜‚๐—ป๐—ฐ๐—ฒ๐—บ๐—ฒ๐—ป๐˜ #๐˜ฆ๐˜ฎ๐˜ฃ๐˜ฆ๐˜ฅ๐˜ข๐˜ฏ๐˜บ๐˜ต๐˜ฉ๐˜ช๐˜ฏ๐˜จ๐Ÿฆ€๐˜ท.0.6 ๐˜ช๐˜ด ๐˜ฐ๐˜ถ๐˜ต, ๐˜ธ๐˜ช๐˜ต๐˜ฉ ๐˜ต๐˜ฉ๐˜ฆ ๐˜ญ๐˜ข๐˜ต๐˜ฆ๐˜ด๐˜ต ๐˜ฎ๐˜ฐ๐˜ฅ๐˜ฆ๐˜ญ๐˜ด @cohere's ๐˜ฆ๐˜ฎ๐˜ฃ๐˜ฆ๐˜ฅ4, ๐˜ข๐˜ฏ๐˜ฅ ๐˜ฎ๐˜ฐ๐˜ฅ๐˜ฆ๐˜ญ2๐˜ท๐˜ฆ๐˜ค ๐˜ฃ๐˜บ @minishlab , ๐˜ข ๐˜ฏ๐˜ฆ๐˜ธ ๐˜ค๐˜ฉ๐˜ถ๐˜ฏ๐˜ฌ๐˜ช๐˜ฏ๐˜จ ๐˜ฎ๐˜ฆ๐˜ต๐˜ฉ๐˜ฐ๐˜ฅ, ๐˜“๐˜ข๐˜ต๐˜ฆ-๐˜ค๐˜ฉ๐˜ถ๐˜ฏ๐˜ฌ๐˜ช๐˜ฏ๐˜จ ๐˜ฃ๐˜บ @Weaviate. RAG, processor crate: which takes files of different types and produces metadata-rich descriptions
1
1
12
477
Make sentence transformers 50x smaller and 500x faster!! Model2Vec turns any sentence transformer into a small static model with a little drop in performance. It also gives you instant vector search over millions of documents with no pre-indexing. 100% open-source!
3
36
3
201
12,171
Make sentence transformers 50x smaller and 500x faster!! Model2Vec reduces any sentence transformer size with minimal performance drop, enabling instant vector search across millions of documents without pre-indexing. 100% open-source!
10
156
2
907
72,737
Turn any sentence transformer into a really small static model, reducing model size by a factor up to 50 and making the models up to 500 times faster. Model2Vec relies on running a chosen vocabulary through a sentence transformer to get token embeddings. The dimensionality of these embeddings is then reduced with Principal Component Analysis (PCA), and Smooth Inverse Frequency (SIF) weighting is applied. This final static model captures useful information with far fewer parameters than the original sentence transformer. โš™๏ธ The Core Concepts - Distillation Model2Vec distills from a sentence transformer without needing a labeled dataset. A vocabulary is passed through the sentence transformer to collect token embeddings. These static token representations are learned to mimic the original modelโ€™s mean sentence embeddings. Token Embeddings It generates vector representations for each token in the vocabulary. At inference, sentences are represented by taking the mean (or a weighted mean) of their token embeddings. This approach avoids repeated forward passes through heavier transformer layers. - PCA Dimensionality is reduced to curb model size without sacrificing much performance. PCA extracts directions of greatest variance in the embeddings, compressing them to a smaller vector space. - SIF Weighting Each token embedding is scaled by w = 1e-3 / (1e-3 + proba), where proba is the tokenโ€™s frequency in the corpus. This smooths out high-frequency tokens and gives more weight to rarer ones. The weighted embeddings capture meaningful semantics while sidestepping over-representation of common words. - Potion Models These are pre-trained variations of Model2Vec produced with Tokenlearn. They achieve better results across tasks by carefully optimizing the token embeddings and applying re-regularization steps.
3
51
1
249
13,701
Minish retweeted
Transform your workflows with @minishlab's product: ๐Œ๐จ๐๐ž๐ฅ2๐•๐ž๐œ, a lightweight, high-performance embedding technique that converts ๐’๐ž๐ง๐ญ๐ž๐ง๐œ๐ž ๐“๐ซ๐š๐ง๐ฌ๐Ÿ๐จ๐ซ๐ฆ๐ž๐ซ ๐ฆ๐จ๐๐ž๐ฅ๐ฌ ๐œ๐จ๐ฆ๐ฉ๐š๐œ๐ญ, ๐ฌ๐ญ๐š๐ญ๐ข๐œ ๐ฆ๐จ๐๐ž๐ฅ๐ฌ. It reduces model size by up to 50x and speeds up inference by up to 500x, with minimal performance loss. Model2Vec is ideal when you have resource-constrained devices. It seamlessly integrates with ๐Œ๐ข๐ฅ๐ฏ๐ฎ๐ฌ via the Model2VecEmbeddingFunction class, enabling effortless encoding of documents and queries into Milvus-compatible dense vectors while offering deployment flexibilityโ€”load models directly from Hugging Face Hub or use local models for diverse environments. Try it here: milvus.io/docs/embed-with-moโ€ฆ
3
8
262
Make sentence transformers 50x smaller and 500x faster!! Model2Vec turns any sentence transformer into a small static model with a little drop in performance. It also gives you instant vector search over millions of documents with no pre-indexing. 100% open-source!
13
170
3
1,036
66,361
I just released embetter v0.7.0 which will start using model2vec as the default model going forward. It's simply *so* much faster that it feels like the most sensible option when you are toying around with sklearn. It also does not require PyTorch so that's also much lighter!
2
2
1
15
1,077
Announcing BERTopic v0.17 ๐Ÿฅณ This is a feature-packed update that includes the amazing Model2Vec, more interactive DataMapPlot functionalities, a method for lightweight installation, and much more!
6
79
3
462
31,572
Forget huge models! ๐Ÿคฏ Model2Vec by @minishlab shrinks sentence transformers by up to 50x & boosts speeds 500x! Minor performance trade-off for big efficiency gains. Check it out ๐Ÿ‘‡ github.com/MinishLab/model2vโ€ฆ
1
2
102
Blazingly fast keyword generation with KeyBERT v0.9 and Model2Vec ๐Ÿ”ฅ I have been a big fan of the amazing embedding models by @minishlab, so I had to integrate them with KeyBERT.ย  A release for the GPU-poor ๐Ÿ˜‰
1
16
89
3,901
Today, @minishlab released 2 more Static Embedding models; potion-base-32M & potion-retrieval-32M stronger performance than before, while still easily processing e.g. 50k sentences per second. The text embeddings can be used for retrieval, classification, clustering, etc. ๐Ÿงต
1
7
69
1,940