all-MiniLM-L6-v2
by Sentence Transformers
Small, fast search by meaning.
Embeddings and searchCommercial useRuns on 16 GB
1. Commercial use
“language: en license: apache-2.0”
Apache 2.0 allows commercial use free of charge.
huggingface.co/sentence-transformers/all-MiniLM-L6-v2/raw/main/README.md2. On your machine
Our estimate: about 0.6 GB per billion parameters at 4-bit, with room for the context.
huggingface.co/sentence-transformers/all-MiniLM-L6-v23. Through an API
Hugging Face Inference Providers that serve it live.
huggingface.co/sentence-transformers/all-MiniLM-L6-v24. Momentum
Likes and the trending score are Hugging Face's own figures; attention, not quality.
huggingface.co/sentence-transformers/all-MiniLM-L6-v2Checked against its official pages on Nov 23, 2026. Tap a verdict to see its source.How we checkedReport an error
What all-MiniLM-L6-v2 does
all-MiniLM-L6-v2 is an open text model by the Sentence Transformers project that turns English sentences and short paragraphs into lists of 384 numbers, so apps can find texts by meaning. It is published on Hugging Face and is free to use in paid products under Apache 2.0.
What people use it for
Search notes and help articles by meaning
Turn your texts into number lists once, then find those closest to a question even when the words differ.
Group similar texts together
Sort feedback, tickets or headlines into groups of texts that talk about the same thing.
Use it without the helper library
Load it with plain Hugging Face Transformers and average the word vectors yourself, for example inside an existing app.
A fast default when speed matters
Pick it over larger models when you have many texts or a small server; it is about five times faster than the bigger all-mpnet-base-v2.
Suggest related articles Idea
Show "you may also like" links under a post by finding the posts whose meaning is closest.
all-MiniLM-L6-v2 popularity
As reported by Hugging Face, checked Nov 26, 2026. Downloads include automated ones; some repositories report none.
Where to run all-MiniLM-L6-v2
Through an API
- hf-inference (Hugging Face Inference Providers)
all-MiniLM-L6-v2 license
Apache 2.0 lets you use, change and share the model for free, also in paid products and client work. Include a copy of the license when you pass the files on.
Give recipients a copy of the Apache 2.0 license and mark any files you changed.
“You must give any other recipients of the Work or Derivative Works a copy of this License” source
Apache 2.0 allows use in work for clients; keep the license with any files you hand over.
“each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license” source
Alternatives
all-MiniLM-L6-v2 This page
BAAI · sentence-similarity
google · feature-extraction
google · sentence-similarity
paraphrase-multilingual-MiniLM-L12-v2
sentence-transformers · sentence-similarity
Get started
Tell your AI assistant
“Add search by meaning with sentence-transformers and sentence-transformers/all-MiniLM-L6-v2, split my texts into short passages, encode them once, store the 384-number vectors, and rank passages by cosine similarity to each query.”
Install the library.
pip install -U sentence-transformersFrom huggingface.co/sentence-transformers/all-MiniLM-L6-v2/raw/main/README.md
Load the model by name and encode a list of sentences.
from sentence_transformers import SentenceTransformer model = SentenceTransformer('sentence-transformers/all-MiniLM-L6-v2') embeddings = model.encode(sentences)From huggingface.co/sentence-transformers/all-MiniLM-L6-v2/raw/main/README.md
Mistakes to avoid
Anything past 256 word pieces is dropped without warning.
The model card says the pooling step is required without sentence-transformers.
The model card lists English only, while those models cover more than 100 languages.
Questions
How many numbers does it produce per text?
384 for each sentence or paragraph.
How long can a text be?
Up to 256 word pieces; longer text is cut off.
Can I use it in a paid product?
Yes. It is released under Apache 2.0.
Is there a better-quality model from the same project?
all-mpnet-base-v2 gives the best quality of the general models; all-MiniLM-L6-v2 is about five times faster.