SAVRN
Search Contact SAVRN

Open-weight model · Sentence similarity

all-MiniLM-L12-v2

by Sentence Transformers sentence-transformers/all-MiniLM-L12-v2

This is a sentence-transformers model: It maps sentences & paragraphs to a 384 dimensional dense vector space and can be used for tasks like clustering or semantic search.

Parameters33M
Context512
Weights1.3 GB
Licenseapache-2.0
AccessOpen weights
Monthly Downloads4.2M

Runs On

What it takes to serve all-MiniLM-L12-v2 (33M parameters): the memory its weights need at each precision, and the cheapest way to rent enough data-center GPUs to hold them.

PrecisionWeightsMemory neededCheapest setupPer hourAlso fits
16-bit 0.1 GB 0.1 GB 1x MI300X (192 GB)
Vultr
$1.85 1x H100 $1.99 · 1x MI325X $2.00
8-bit 0.0 GB 0.0 GB 1x MI300X (192 GB)
Vultr
$1.85 1x H100 $1.99 · 1x MI325X $2.00
4-bit 0.0 GB 0.0 GB 1x MI300X (192 GB)
Vultr
$1.85 1x H100 $1.99 · 1x MI325X $2.00

Memory is the weights at that precision plus 20% for the runtime and a short context; a long context needs more. Prices are the lowest on-demand hourly rates in the SAVRN Index, read Sep 18, 2026.

SAVRN's Notes on all-MiniLM-L12-v2

Most of the 1.3 GB download for all-MiniLM-L12-v2 is format duplication: 29 files spanning safetensors, onnx, openvino, pytorch and rust builds of a model whose 16-bit working set is 0.1 GB, with 8-bit and 4-bit rounding to zero, so pick your runtime's format. Underneath, 33M parameters turn up to 512 tokens into a 384-number vector for semantic search and clustering. One MI300X at $1.85 an hour is the cheapest listed setup; the real question is whether something this small rides along on hardware you already run.

Apache 2.0 permits commercial use, modification and redistribution with an express patent grant, and asks you to keep the license and NOTICE file and state significant changes. Check the training sets named in the file, from ms_marco and search_qa to stackexchange_xml, code_search_net and s2orc, against the text you will feed it. Released March 2, 2022, it was last updated March 31, 2026.

Model Card

By Sentence Transformers, published under apache-2.0, revision a50ef00143b4.

This is a sentence-transformers model: It maps sentences & paragraphs to a 384 dimensional dense vector space and can be used for tasks like clustering or semantic search.

Usage (Sentence-Transformers)

Using this model becomes easy when you have sentence-transformers installed:

pip install -U sentence-transformers

Then you can use the model like this:

from sentence_transformers import SentenceTransformer
sentences = ["This is an example sentence", "Each sentence is converted"]

model = SentenceTransformer('sentence-transformers/all-MiniLM-L12-v2')
embeddings = model.encode(sentences)
print(embeddings)

Usage (HuggingFace Transformers)

Without sentence-transformers, you can use the model like this: First, you pass your input through the transformer model, then you have to apply the right pooling-operation on-top of the contextualized word embeddings.

Read the full model card (760 words)

Configuration

Architecture
BertModel
Context length (tokens)
512
Layers
12
Hidden size
384
Feed-forward size
1,536
Attention heads
12
Vocabulary size
30,522
Model type
bert

Identity and Version

Repository
sentence-transformers/all-MiniLM-L12-v2
Publisher
Sentence Transformers
Task
Sentence similarity
Modality
Text
Library
sentence-transformers
Parameters
33M parameters
Languages
en
Revision
a50ef00143b4d5391434df20ae11632588ac25be
First published
2022-03-02
Last updated
2026-03-31

Files and Weights

29 files, 1.3 GB in total. The weights are 14 files totalling 1.3 GB in bin, onnx, ot, safetensors.

Weights14 files · 1.3 GB
Configuration8 files · 53.9 KB
Tokenizer3 files · 698.1 KB
Documentation1 file · 10.5 KB
Other2 files · 1.1 MB
Repository1 file · 1.2 KB
Every file
FileTypeSizeSHA-256
model.safetensorsWeights133.5 MB d2d541e5f101
onnx/model.onnxWeights133.1 MB 84c56795d395
onnx/model_O1.onnxWeights133.0 MB 681eac1ec7d0
onnx/model_O2.onnxWeights133.0 MB b1bee3861e7e
onnx/model_O3.onnxWeights133.0 MB 691688efa849
onnx/model_O4.onnxWeights66.6 MB e3a8fea85d1f
onnx/model_qint8_arm64.onnxWeights34.1 MB d37479e69ddc
onnx/model_qint8_avx512.onnxWeights34.1 MB d37479e69ddc
onnx/model_qint8_avx512_vnni.onnxWeights34.1 MB d37479e69ddc
onnx/model_quint8_avx2.onnxWeights34.2 MB 3c5e33c47849
openvino/openvino_model.binWeights132.9 MB e9cb0a0124ce
openvino/openvino_model_qint8_quantized.binWeights33.8 MB 1ad4ebfa1ba2
pytorch_model.binWeights133.5 MB 54609dea3ff8
rust_model.otWeights133.5 MB e6187a301772
1_Pooling/config.jsonConfiguration190 B
config.jsonConfiguration615 B
config_sentence_transformers.jsonConfiguration116 B
data_config.jsonConfiguration39.3 KB
modules.jsonConfiguration349 B
sentence_bert_config.jsonConfiguration53 B
special_tokens_map.jsonConfiguration112 B
train_script.pyConfiguration13.2 KB
README.mdDocumentation10.5 KB
openvino/openvino_model.xmlOther398.3 KB
openvino/openvino_model_qint8_quantized.xmlOther708.1 KB
.gitattributesRepository1.2 KB
tokenizer.jsonTokenizer466.2 KB
tokenizer_config.jsonTokenizer352 B
vocab.txtTokenizer231.5 KB

License and Download

License
apache-2.0
Access
Open weights, no gate
Download size
1.3 GB
Download from Sentence Transformers

Released by Sentence Transformers through its official repository on Hugging Face. Read the license.

Built From

  • Derived from microsoft/MiniLM-L12-H384-uncased
  • Described by arXiv:1704.05179
  • Described by arXiv:1810.09305
  • Described by arXiv:1904.06472
  • Described by arXiv:2102.07033
  • Described by arXiv:2104.08727
  • Quantized from microsoft/MiniLM-L12-H384-uncased
  • Trained on (disclosed) code_search_net
  • Trained on (disclosed) eli5
  • Trained on (disclosed) embedding-data/PAQ_pairs
  • Trained on (disclosed) embedding-data/QQP
  • Trained on (disclosed) embedding-data/SPECTER
  • Trained on (disclosed) embedding-data/WikiAnswers
  • Trained on (disclosed) embedding-data/altlex
  • Trained on (disclosed) embedding-data/flickr30k-captions
  • Trained on (disclosed) embedding-data/sentence-compression
  • Trained on (disclosed) embedding-data/simple-wiki
  • Trained on (disclosed) flax-sentence-embeddings/stackexchange_xml
  • Trained on (disclosed) gooaq
  • Trained on (disclosed) ms_marco
  • Trained on (disclosed) multi_nli
  • Trained on (disclosed) natural_questions
  • Trained on (disclosed) s2orc
  • Trained on (disclosed) search_qa
  • Trained on (disclosed) snli
  • Trained on (disclosed) trivia_qa
  • Trained on (disclosed) wikihow
  • Trained on (disclosed) yahoo_answers_topics

Evaluations

Each result is shown as reported, with the conditions its reporter stated. None is a SAVRN measurement. A comparison lines two results up only when their configuration, unit and setup are all stated and identical.

BenchmarkConditionsResultReported byRevisionDate
mteb/arguana Task ArguAnaMetric ArguAnaSetup Obtained using MTEB v1.38.3Comparison conditions not established 47.128 Obtained using MTEB v1.38.3
Reported by a third party
Evaluated revision not stated 2026-03-05
mteb/arguana Task ArguAna_default_testMetric ArguAna_default_testSetup Obtained using MTEB v1.38.3Comparison conditions not established 47.128 Obtained using MTEB v1.38.3
Reported by a third party
Evaluated revision not stated 2026-03-05

Memory Requirements

PrecisionWeights in memory
As published1.3 GB
16-bit0.1 GB
8-bit0.0 GB
4-bit0.0 GB

Weights only, from the published parameter count; the key-value cache and runtime add to this.

Compare all-MiniLM-L12-v2

Questions About all-MiniLM-L12-v2

How much GPU memory does all-MiniLM-L12-v2 need?

About 0.1 GB at 16-bit and 0 GB at 4-bit: the weights (33M parameters) plus a working margin. A long context needs more.

What is the cheapest GPU to run all-MiniLM-L12-v2 on?

At 16-bit, 1x MI300X from $1.85 an hour; at 4-bit, 1x MI300X from $1.85 an hour, at the lowest on-demand prices the SAVRN Index lists.

Can I use all-MiniLM-L12-v2 commercially?

Yes. all-MiniLM-L12-v2 is released under Apache License 2.0. The Apache License 2.0 is a permissive open-source license. It permits commercial use, modification and redistribution. It requires keeping the license and copyright notices and any NOTICE file, stating significant changes, and it includes an express patent grant from contributors.

What is all-MiniLM-L12-v2's context length?

512 tokens, from the maximum position embeddings in its published configuration.

Similar Models

Model · Sentence similarity

gte-small

Dingkun Long

General Text Embeddings (GTE) model. Towards General Text Embeddings with Multi-stage Contrastive Learning The GTE models are trained by Alibaba DAMO Academy. They are mainly based on the BERT framework and currently offer three different sizes of models, including GTE-large, GTE-base, and GTE-small. The GTE models are trained on a large-scale corpus of relevance text pairs, covering a wide range of domains and scenarios. This enables the GTE models to be applied to various downstream tasks of text embeddings, including information retrieval, semantic textual similarity, text reranking, etc. We compared the performance of the GTE models with other popular text embedding models on the MTEB…

Open weights mit 33M parameters 512 tokens sentence-transformers

Model · Sentence similarity

e5-small-v2

Liang Wang

Liang Wang, Nan Yang, Xiaolong Huang, Binxing Jiao, Linjun Yang, Daxin Jiang, Rangan Majumder, Furu Wei, arXiv 2022 This model has 12 layers and the embedding size is 384. Below is an example to encode queries and passages from the MS-MARCO passage ranking dataset. Please refer to our paper at https://arxiv.org/pdf/2212.03533.pdf. Check out unilm/e5 to reproduce evaluation results on the BEIR and MTEB benchmark. Below is an example for usage with sentencetransformers. Package requirements pip install sentencetransformers~=2.2.2 1. Do I need to add the prefix "query: " and "passage: " to input texts? Yes, this is how the model is trained, otherwise you will see a performance degradation.…

Open weights mit 33M parameters 512 tokens sentence-transformers

Model · Sentence similarity

snowflake-arctic-embed-s

Snowflake

12/04/2024: Release of snowflake-arctic-embed-l-v2.0 and snowflake-arctic-embed-m-v2.0 our newest models with multilingual workloads in mind. These models outperform prior versions of Arctic Embed and we suggest these replace prior versions! 07/26/2024: Release preprint [[2407.18887] Embedding And Clustering Your Data Can Improve Contrastive Pretraining](https://arxiv.org/abs/2407.18887) on arXiv. 07/18/2024: Release of snowflake-arctic-embed-m-v1.5, capable of producing highly compressible embedding vectors that preserve quality even when squished as small as 128 bytes per vector. Details about the development of this model are available in the launch post on the Snowflake engineering…

Open weights apache-2.0 33M parameters 512 tokens sentence-transformers

Model · Sentence similarity

rubert-tiny2

David Dale

This is an updated version of cointegrated/rubert-tiny: a small Russian BERT-based encoder with high-quality sentence embeddings. This post in Russian gives more details. The differences from the previous version include: - sentence embeddings approximate LaBSE closer than before; - meaningful segment embeddings (tuned on the NLI task) - the model is focused only on Russian. The model should be used as is to produce sentence embeddings (e.g. for KNN classification of short texts) or fine-tuned for a downstream task. Sentence embeddings can be produced as follows: Alternatively, you can use the model with sentencetransformers: For those who want to run the inference with VLLM, there is a…

Open weights mit 29M parameters 2,048 tokens sentence-transformers

Model · Sentence similarity

all-MiniLM-L6-v2

Sentence Transformers

This is a sentence-transformers model: It maps sentences & paragraphs to a 384 dimensional dense vector space and can be used for tasks like clustering or semantic search. Using this model becomes easy when you have sentence-transformers installed: Then you can use the model like this: Without sentence-transformers, you can use the model like this: First, you pass your input through the transformer model, then you have to apply the right pooling-operation on-top of the contextualized word embeddings. The project aims to train sentence embedding models on very large sentence level datasets using a self-supervised contrastive learning objective. We used the pretrained…

Open weights apache-2.0 23M parameters 512 tokens sentence-transformers

Model · Sentence similarity

paraphrase-MiniLM-L6-v2

Sentence Transformers

This is a sentence-transformers model: It maps sentences & paragraphs to a 384 dimensional dense vector space and can be used for tasks like clustering or semantic search. Using this model becomes easy when you have sentence-transformers installed: Then you can use the model like this: Without sentence-transformers, you can use the model like this: First, you pass your input through the transformer model, then you have to apply the right pooling-operation on-top of the contextualized word embeddings. This model was trained by sentence-transformers. If you find this model helpful, feel free to cite our publication Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks

Open weights apache-2.0 23M parameters 512 tokens sentence-transformers