SAVRN
Search Contact SAVRN

Open-weight model · Text ranking

ms-marco-MiniLM-L6-v2

by Sentence Transformers - Cross-Encoders cross-encoder/ms-marco-MiniLM-L6-v2

This model was trained on the MS Marco Passage Ranking task. The model can be used for Information Retrieval: Given a query, encode the query with all possible passages (e.g. retrieved with ElasticSearch). Then sort the passages in a decreasing order.

Parameters23M
Context512
Weights888.6 MB
Licenseapache-2.0
AccessOpen weights
Monthly Downloads88.6M

Runs On

What it takes to serve ms-marco-MiniLM-L6-v2 (23M 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.0 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 ms-marco-MiniLM-L6-v2

Once a first-pass search has returned its candidates, this cross-encoder puts them in order, reading the query with each passage and handing them back sorted. At 23M parameters it needs 0.1 GB at 16-bit and rounds to nothing at 8-bit or 4-bit. For $1.85 an hour on demand, the cheapest setup we price is a 192 GB MI300X, a card this ranker would leave almost empty; its sensible home is a corner of a GPU you already pay for.

Apache 2.0 puts no fence around commercial use, so you can retrain it on your query logs and redistribute the result, keeping the license and NOTICE files intact and stating what changed. Two checks: the 512-token context must hold the query and the passage together, and the lineage runs to cross-encoder/ms-marco-MiniLM-L12-v2 with sentence-transformers/msmarco as the training set. Access is open and the files were last updated 2026-08-09.

Model Card

By Sentence Transformers - Cross-Encoders, published under apache-2.0, revision 233902d25c44.

Cross-Encoder for MS Marco

This model was trained on the MS Marco Passage Ranking task.

The model can be used for Information Retrieval: Given a query, encode the query with all possible passages (e.g. retrieved with ElasticSearch). Then sort the passages in a decreasing order. See SBERT.net Retrieve & Re-rank for more details. The training code is available here: SBERT.net Training MS Marco

Usage with SentenceTransformers

The usage is easy when you have SentenceTransformers installed. Then you can use the pre-trained models like this:

from sentence_transformers import CrossEncoder

model = CrossEncoder('cross-encoder/ms-marco-MiniLM-L6-v2')
scores = model.predict([
    ("How many people live in Berlin?", "Berlin had a population of 3,520,031 registered inhabitants in an area of 891.82 square kilometers."),
    ("How many people live in Berlin?", "Berlin is well known for its museums."),
])
print(scores)
# [ 8.607138 -4.320078]

Usage with Transformers

Read the full model card (315 words)

Configuration

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

Identity and Version

Repository
cross-encoder/ms-marco-MiniLM-L6-v2
Publisher
Sentence Transformers - Cross-Encoders
Task
Text ranking
Modality
Other
Library
sentence-transformers
Parameters
23M parameters
Languages
en
Revision
233902d25c440f23af6f7d6e94d2946bac0bee0a
First published
2022-03-02
Last updated
2026-08-09

Files and Weights

23 files, 890.2 MB in total. The weights are 14 files totalling 888.6 MB in bin, msgpack, onnx, safetensors.

Weights14 files · 888.6 MB
Configuration2 files · 926 B
Tokenizer3 files · 944.2 KB
Documentation1 file · 3.7 KB
Other2 files · 576.9 KB
Repository1 file · 790 B
Every file
FileTypeSizeSHA-256
flax_model.msgpackWeights90.9 MB bc6033077e45
model.safetensorsWeights90.9 MB 821d1aa69520
onnx/model.onnxWeights91.0 MB 5d3e70fd0c9f
onnx/model_O1.onnxWeights91.0 MB cd95bda6a2f9
onnx/model_O2.onnxWeights90.9 MB ee57fbe4d156
onnx/model_O3.onnxWeights90.9 MB 26148b185fe3
onnx/model_O4.onnxWeights45.5 MB b232c2eeedd9
onnx/model_qint8_arm64.onnxWeights23.2 MB 3573b6b9593c
onnx/model_qint8_avx512.onnxWeights23.2 MB 3573b6b9593c
onnx/model_qint8_avx512_vnni.onnxWeights23.2 MB 3573b6b9593c
onnx/model_quint8_avx2.onnxWeights23.2 MB c80a8b34256e
openvino/openvino_model.binWeights90.9 MB 8a9204bfa99f
openvino/openvino_model_qint8_quantized.binWeights23.1 MB 02eaa804b1c6
pytorch_model.binWeights90.9 MB 3ae17b87eda3
config.jsonConfiguration794 B
special_tokens_map.jsonConfiguration132 B
README.mdDocumentation3.7 KB
openvino/openvino_model.xmlOther205.3 KB
openvino/openvino_model_qint8_quantized.xmlOther371.6 KB
.gitattributesRepository790 B
tokenizer.jsonTokenizer711.4 KB
tokenizer_config.jsonTokenizer1.3 KB
vocab.txtTokenizer231.5 KB

License and Download

License
apache-2.0
Access
Open weights, no gate
Download size
888.6 MB
Download from Sentence Transformers - Cross-Encoders

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

Built From

Memory Requirements

PrecisionWeights in memory
As published888.6 MB
16-bit0.0 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.

Built on This Model

Compare ms-marco-MiniLM-L6-v2

Questions About ms-marco-MiniLM-L6-v2

How much GPU memory does ms-marco-MiniLM-L6-v2 need?

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

What is the cheapest GPU to run ms-marco-MiniLM-L6-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 ms-marco-MiniLM-L6-v2 commercially?

Yes. ms-marco-MiniLM-L6-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 ms-marco-MiniLM-L6-v2's context length?

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

Similar Models

This model was trained on the MS Marco Passage Ranking task. The model can be used for Information Retrieval: Given a query, encode the query will all possible passages (e.g. retrieved with ElasticSearch). Then sort the passages in a decreasing order. See SBERT.net Retrieve & Re-rank for more details. The training code is available here: SBERT.net Training MS Marco The usage is easy when you have SentenceTransformers installed. Then you can use the pre-trained models like this: In the following table, we provide various pre-trained Cross-Encoders together with their performance on the TREC Deep Learning 2019 and the MS Marco Passage Reranking dataset.

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

This model was trained on the MS Marco Passage Ranking task. The model can be used for Information Retrieval: Given a query, encode the query will all possible passages (e.g. retrieved with ElasticSearch). Then sort the passages in a decreasing order. See SBERT.net Retrieve & Re-rank for more details. The training code is available here: SBERT.net Training MS Marco The usage is easy when you have SentenceTransformers installed. Then you can use the pre-trained models like this: In the following table, we provide various pre-trained Cross-Encoders together with their performance on the TREC Deep Learning 2019 and the MS Marco Passage Reranking dataset.

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

This model was trained on the MS Marco Passage Ranking task. The model can be used for Information Retrieval: Given a query, encode the query will all possible passages (e.g. retrieved with ElasticSearch). Then sort the passages in a decreasing order. See SBERT.net Retrieve & Re-rank for more details. The training code is available here: SBERT.net Training MS Marco The usage is easy when you have SentenceTransformers installed. Then you can use the pre-trained models like this: In the following table, we provide various pre-trained Cross-Encoders together with their performance on the TREC Deep Learning 2019 and the MS Marco Passage Reranking dataset.

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

This model was trained on the MS Marco Passage Ranking task. The model can be used for Information Retrieval: Given a query, encode the query will all possible passages (e.g. retrieved with ElasticSearch). Then sort the passages in a decreasing order. See SBERT.net Retrieve & Re-rank for more details. The training code is available here: SBERT.net Training MS Marco The usage becomes easier when you have SentenceTransformers installed. Then, you can use the pre-trained models like this: In the following table, we provide various pre-trained Cross-Encoders together with their performance on the TREC Deep Learning 2019 and the MS Marco Passage Reranking dataset.

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

This model was converted to GGUF format from madebyaris/rerank-indonesia using llama.cpp via the ggml.ai's GGUF-my-repo space. Refer to the original model card for more details on the model. Install llama.cpp through brew (works on Mac and Linux) Invoke the llama.cpp server or the CLI. Note: You can also use this checkpoint directly through the usage steps listed in the Llama.cpp repo as well. Step 2: Move into the llama.cpp folder and build it with LLAMACURL=1 flag along with other hardware-specific flags (for ex: LLAMACUDA=1 for Nvidia GPUs on Linux).

Open weights apache-2.0 sentence-transformers

Model · Text ranking

mxbai-rerank-xsmall-v1

Mixedbread

This is the smallest model in our family of powerful reranker models. You can learn more about the models in our blog post. Currently, the best way to use our models is with the most recent version of sentence-transformers. pip install -U sentence-transformers Let's say you have a query, and you want to rerank a set of documents. You can do that with only one line of code: Install transformers.js npm i @xenova/transformers Let's say you have a query, and you want to rerank a set of documents. In JavaScript, you need to add a function: You can use the large model via our API as follows: The API comes with additional features, such as a continous trained reranker! Check out the docs for more…

Open weights apache-2.0 71M parameters 512 tokens transformers