Skip to content
Agents tracked: 506 Releases (7d): 634 Agent status: 3 with issuesSince last limit reset: Claude 15d · Codex 0d For AI agents: Markdown Updated Nov 26, 2026

all-MiniLM-L6-v2

by Sentence Transformers

Small, fast search by meaning.

Embeddings and searchCommercial useRuns on 16 GB

Hugging FaceDemos

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.md

Checked 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

6,182
likes on Hugging Face
163M
downloads, last 30 days
25
Hugging Face trending score

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.

In a paid product
Yes

Apache 2.0 allows commercial use free of charge.

“language: en license: apache-2.0” source

Ship the weights to users
With conditions

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

Work for clients
Yes

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

6,182 likesApache 2.0

bge-m3

BAAI · sentence-similarity

4,041 likesMIT

embeddinggemma-2

google · feature-extraction

3,507 likesApache 2.0

embeddinggemma-300m

google · sentence-similarity

2,158 likesGemma terms

paraphrase-multilingual-MiniLM-L12-v2

sentence-transformers · sentence-similarity

1,519 likesApache 2.0

All embeddings and search models

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.”

  1. Install the library.

    pip install -U sentence-transformers

    From huggingface.co/sentence-transformers/all-MiniLM-L6-v2/raw/main/README.md

  2. 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

Feeding whole documents in one piece.
Split documents into passages of a few sentences and store a number list for each passage.

Anything past 256 word pieces is dropped without warning.

Taking the raw output of AutoModel as the sentence vector.
Apply mean pooling over the tokens and normalise, or simply use the sentence-transformers library.

The model card says the pooling step is required without sentence-transformers.

Using it to search Russian, Chinese or mixed-language texts.
Use a multilingual model such as BGE-M3 or Qwen3-Embedding-0.6B for non-English text.

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.