This 15M Parameter MiniLM-L2 Reranker Scores 4,100 Search Pairs per Second
A 15.6M parameter cross-encoder reranker is quietly pulling over a million downloads a month by trading a few NDCG points for 4x speed
ProTakeaways
- ms-marco-MiniLM-L2-v2 is a 15.6M parameter Apache 2.0 cross-encoder reranker.
- Scores 71.01 NDCG@10 on TREC DL 19 and 34.85 MRR@10 on MS Marco Dev.
- Runs at roughly 4,100 pairs per second on a V100, 4x faster than the L12 variant.
- Ships in PyTorch, JAX, ONNX, Safetensors, and OpenVINO for CPU or GPU serving.
- Best for English retrieve and rerank pipelines where a strong first stage already surfaces good candidates.
- Weak on long documents, multilingual, and reasoning heavy retrieval tasks like BRIGHT.
While the spotlight chases billion parameter rerankers and LLM-based judges, a tiny cross-encoder from the sentence-transformers project keeps racking up more than a million downloads a month. ms-marco-MiniLM-L2-v2 is a 15.6M parameter model built for one job: taking a query plus a list of candidate passages from a first stage retriever and reordering them by relevance. It ships under Apache 2.0 in PyTorch, JAX, ONNX, Safetensors, and OpenVINO formats, and slots into any retrieve-and-rerank pipeline with a few lines of code.
The two-stage pattern it lives in
Modern search stacks usually split retrieval into two stages. A cheap first pass (BM25, dense embeddings, or a hybrid) pulls the top few hundred or few thousand candidates from a large corpus. A cross-encoder then scores each (query, passage) pair jointly and re-sorts them. Cross-encoders do not produce standalone sentence embeddings, so they can't be used to index a corpus, only to rescore pairs. MS MARCO Passage Retrieval, the training set behind this checkpoint, is a large collection of real Bing queries with annotated relevant passages, which is why models trained on it generalize well as rerankers.
The L2-v2 checkpoint is the smallest of the MiniLM family, distilled from microsoft/MiniLM-L12-H384-uncased. Usage is intentionally boring:
from sentence_transformers import CrossEncoder
model = CrossEncoder('cross-encoder/ms-marco-MiniLM-L2-v2')
scores = model.predict([
("How many people live in Berlin?", "Berlin had a population of 3,520,031 registered inhabitants..."),
("How many people live in Berlin?", "Berlin is well known for its museums."),
])
# [ 8.51, -4.86 ]
Passing activation_fn=torch.nn.Sigmoid() at init squashes outputs into the 0 to 1 range; otherwise raw scores can land anywhere between roughly -10 and 10. That single flag matters if you plan to threshold results or blend scores with other retrievers.
Why anyone picks the smallest one
The MiniLM v2 family gives a clean speed-versus-quality curve on TREC Deep Learning 2019 and MS Marco Dev, measured on a V100 GPU:
| Model | NDCG@10 (TREC DL 19) | MRR@10 (MS Marco Dev) | Docs / sec |
|---|---|---|---|
| TinyBERT-L2-v2 | 69.84 | 32.56 | 9000 |
| MiniLM-L2-v2 | 71.01 | 34.85 | 4100 |
| MiniLM-L4-v2 | 73.04 | 37.70 | 2500 |
| MiniLM-L6-v2 | 74.30 | 39.01 | 1800 |
| MiniLM-L12-v2 | 74.31 | 39.02 | 960 |
Numbers come from the official pretrained models table. The L2 variant gives up about 3 NDCG points against L6 and roughly 4 MRR points against L12, in exchange for 2x to 4x throughput. If your first stage already surfaces mostly correct candidates, that trade tends to pay off.
Strengths and sharp edges
- Good at: English passage ranking on short, factual queries similar in style to MS MARCO, where a strong first stage already narrows the pool.
- Good at: Latency sensitive workloads. At around 4,100 pairs per second on a V100, reranking a top-100 list costs roughly 25ms of GPU time.
- Weak at: Long documents. It inherits BERT's 512 token cap, so longer passages must be chunked.
- Weak at: Multilingual queries, code, or highly domain specific corpora without fine tuning.
- Weak at: Reasoning-heavy retrieval. Recent BRIGHT benchmark work found that MiniLM reranking tends to mirror the base retriever unless the initial candidates are already strong; gains are minimal at k=10, and at k=100 reranking often degrades results through over-saturation.
How it holds up in the wild
The model shows up constantly in academic pipelines as a lightweight baseline. In a CheckThat! 2025 scientific claim retrieval study, of the seven models tested for reranking, only ms-marco-MiniLM-L-6-v2 and a T5 variant improved on the initial retrieval, with MS Marco-trained models beating those trained on GooAQ by a wide margin. Against much larger rerankers, the cost story is stark: BGE-reranker-v2-m3 posts the best numbers across nearly every metric but takes roughly 12 seconds to score 1,000 candidates for a single query, versus fractions of a second for the MiniLM family.
Scaling limits do bite in production. One deployment thread on the L6 sibling reports reranking the top 1,000 results in 2 to 2.5 seconds, with the top 3,000 pushing average time to 6 or 7 seconds. Cross-encoders scale linearly in candidate count, so budget accordingly and lean on ONNX or OpenVINO exports for CPU serving.
When to reach for it
Pick this checkpoint when you want a drop-in reranker for an English RAG or search system, need CPU-friendly inference, or are prototyping a pipeline before paying for an LLM judge or a 500M+ parameter reranker. If quality matters more than latency, step up to MiniLM-L6-v2 or L12-v2 first; they are drop-in replacements with the same API. For anything reasoning heavy, multilingual, or beyond 512 tokens, look at newer rerankers like BAAI/bge-reranker-v2-m3 and accept the latency cost.