Skip to content

Models

sentence-transformers/all-minilm-l6-v2

For machines ♡ Like 0
Share X LinkedIn Reddit Bluesky Email
Sentence similarity Sentence Transformers licence: Apache-2.0 text embeddings onnx english

Maps sentences and short paragraphs to 384-dimensional vectors for semantic search, clustering and similarity. Small and fast.

About

A six-layer MiniLM model fine-tuned by the Sentence Transformers project on over a billion sentence pairs. It turns text into a 384-dimensional vector so that similar meanings land close together — the usual starting point for semantic search and retrieval-augmented generation. Input longer than 256 word pieces is truncated.

Use it

from sentence_transformers import SentenceTransformer

model = SentenceTransformer("sentence-transformers/all-MiniLM-L6-v2")
vectors = model.encode(["A man is eating food.", "Someone is having a meal."])

The ONNX export (onnx/model.onnx) runs without PyTorch, for example with ONNX Runtime; pair it with tokenizer.json and apply mean pooling and normalisation yourself.

Files

Files link to the original repository on Hugging Face. English only.

Licence

Apache-2.0, from the Sentence Transformers project.

Learn with this model

Courses and guides on this site that work with it.

Related models

Browse models →

Question answering model from mradermacher, built for Transformers. 2.6k downloads on Hugging Face in the last month.

Question answering · Updated 1w ago · ↓ 50 For machines

Zero-shot image classification model from BAAI, built for Transformers. 12.1k downloads on Hugging Face in the last month.

Zero-shot image classification · Updated 2d ago · ↓ 30 For machines

Classifies English text as positive or negative. DistilBERT fine-tuned on the Stanford Sentiment Treebank.

Text classification · Updated 1w ago · ↓ 24 For machines

Speech recognition model from KaanAydinli, built for Duyu Small. 83 downloads on Hugging Face in the last month.

Speech recognition · Updated 5h ago · ↓ 17 For machines

Text to speech model from oddadmix, built for Transformers. 793 downloads on Hugging Face in the last month.

Text to speech · Updated 5h ago · ↓ 15 For machines

Sentence similarity model from dangvantuan, built for Sentence Transformers. 30.6k downloads on Hugging Face in the last month.

Sentence similarity · Updated 1d ago · ↓ 36 For machines