Skip to content

all-MiniLM-L6-v2

The default embedding model of a thousand tutorials, now best kept for tests, prototypes and short English text.

Reviewed by Andrew Miller · Updated

Our rating

3.4/5

Still the fastest way to get semantic search working, and no longer the right model to ship.

What it is

all-MiniLM-L6-v2 is a small English sentence-embedding model from the sentence-transformers project, released under Apache 2.0. It turns sentences and short paragraphs into 384-dimensional vectors for semantic search, clustering and similarity. It has about 23 million parameters, according to Hugging Face.

It was fine-tuned from Microsoft's MiniLM on more than 1 billion sentence pairs, about 726 million of them Reddit comment pairs from 2015 to 2018, with the rest from sources such as Stack Exchange and academic citations, during a Hugging Face JAX/Flax community week. Training used 128-token sequences, and input longer than 256 word pieces is cut off.

The repository ships ONNX and OpenVINO exports alongside the PyTorch weights, including int8 ONNX files of about 23 MB. It remains one of the most downloaded models on Hugging Face, with about 199 million downloads in the past month.

Our review

all-MiniLM-L6-v2 has outlived its era. About 199 million downloads in the past month say more about tutorials, framework defaults and habit than about quality. Its own maintainers make a modest claim for it, five times faster than all-mpnet-base-v2 with 'good quality', and send readers to the MTEB leaderboard for stronger models.

The limits are structural. It reads English only. Anything past 256 word pieces is dropped without an error, and because training used 128-token sequences, even that limit is generous. Modern small models are a different class: EmbeddingGemma 2 reads 8K tokens in more than 100 languages with a 270-million-parameter text model, and Qwen3-Embedding-0.6B reads 32K tokens across 100+ languages.

Its virtues still count. At about 23 million parameters it runs on almost any CPU, the int8 ONNX export is roughly 23 MB, and a 384-dimension vector takes half the storage of a 768-dimension one. As a test fixture, a classroom example or a first prototype, it is hard to beat.

The real cost of starting with it arrives later. Vectors from different models are not interchangeable, so moving a production index to a better model means re-embedding every document. The cheaper the first choice was, the more data has usually piled up behind it by the time anyone measures retrieval quality.

Where it earns its place

  • A backend engineer writing CI tests for a retrieval pipeline

    Run retrieval tests on every pull request without a GPU or an API key

    The 91 MB model downloads once and embeds test fixtures on the CI runner's CPU, with nothing billed and no text leaving the build. Its rankings will differ from the production model's, so tests should check behaviour rather than exact scores.

  • A developer adding offline search to a desktop or browser app

    Find related notes or help articles on the user's own machine

    An int8 ONNX file of about 23 MB is small enough to bundle, and 384-dimension vectors keep the local index small. It covers English only, and passages must be chunked below 256 word pieces first.

  • A product manager at a small SaaS company

    Show that semantic search beats keyword search before budgeting for it

    A prototype costs no licence or API fees. If it wins, rerun the same evaluation on EmbeddingGemma 2 or Qwen3-Embedding-0.6B before launch, because re-embedding a grown corpus later is the expensive step.

Before you commit

Setup
pip install sentence-transformers and three lines of Python; the model (91 MB in safetensors) downloads on first use.
Integrations
Native in sentence-transformers and Transformers; the repository also carries ONNX, OpenVINO, TensorFlow and Rust weights, including four int8 ONNX builds for different CPU instruction sets.
Data and privacy
Apache 2.0 with no use restrictions, and it runs on your own hardware, so no text leaves it. Its training mix leans heavily on Reddit comments from 2015 to 2018.
Cost at scale
No licence or API fees; storage is the main cost. A float32 vector is 1,536 bytes, so 10 million chunks take about 15 GB before index overhead, half the size of a 768-dimension model's index.
Limits
Input beyond 256 word pieces is truncated without warning, training used 128-token sequences, and it is English only.

What's good

  • About 23M parameters; runs on almost any CPU
  • int8 ONNX export of about 23 MB ships in the repo
  • Apache 2.0; 384-dimension vectors are cheap to store

What's not

  • English only
  • Silently truncates input after 256 word pieces
  • Trained on 128-token sequences, so long text needs chunking
  • Its maintainers point to MTEB for stronger models

Best for

Learners and prototypers who need a fast, universally supported English embedding model.

Alternatives

all-MiniLM-L6-v2: common questions

Is all-MiniLM-L6-v2 worth it?
Still the fastest way to get semantic search working, and no longer the right model to ship. We rate it 3.4 out of 5.
How much does all-MiniLM-L6-v2 cost?
Free under Apache 2.0.
What are the downsides of all-MiniLM-L6-v2?
English only; silently truncates input after 256 word pieces; trained on 128-token sequences, so long text needs chunking; its maintainers point to MTEB for stronger models.
Who is all-MiniLM-L6-v2 best for?
Learners and prototypers who need a fast, universally supported English embedding model.
How much does all-MiniLM-L6-v2 cost for a team or in production?
No licence or API fees; storage is the main cost. A float32 vector is 1,536 bytes, so 10 million chunks take about 15 GB before index overhead, half the size of a 768-dimension model's index.
Is all-MiniLM-L6-v2 safe for company data?
Apache 2.0 with no use restrictions, and it runs on your own hardware, so no text leaves it. Its training mix leans heavily on Reddit comments from 2015 to 2018.
What are the best all-MiniLM-L6-v2 alternatives?
The closest alternatives we have reviewed are EmbeddingGemma 2, Qwen3-Embedding and Qwen3-Reranker and text-embedding-3-large.

Answers checked Oct 22, 2026.