castorini/gaggle-reranker-0.6b-20261122
a compact reranker for search engines
2 min readupdated
Built by the Castorini team, this 0.52B-parameter compact reranker (ranking model) is based on their custom pretrained castorini/gaggle-nanochat-0.6b-pretrained-climbmix-20261121 model. It evaluates query-passage pairs sequentially, reordering candidates retrieved by primary search (such as BM25 or Pyserini). Despite its modest size, the model nearly matches larger counterparts (0.9B and 3.2B) on the TREC DL and BEIR benchmarks. It is a solid fit for developers building search engines, RAG (retrieval-augmented generation) pipelines, and assistants that need accurate document ranking.
Key features
- Compact size: 0.52 billion parameters offering high efficiency while retaining the quality of larger versions.
- Clean data: Pretrained on the ClimbMix dataset and fine-tuned on RLHN-250K without closed third-party backends.
- Precise matching: Calculates relevance scores using the logit difference between key tokens
" true"and" false". - Ready integration: Works out of the box with standard
transformersandsentence-transformerslibraries.
What you can do
- Improve RAG: Plug the reranker in after initial retrieval in search and chat bots to pick out the most relevant document snippets.
- Knowledge base search: Upgrade search result relevance for internal enterprise search or documentation and article portals.
- Reduce hallucinations: Filter out false positives before passing context to a language model.
Example
import torch
from transformers import AutoModelForSequenceClassification, AutoTokenizer
repo = "castorini/gaggle-reranker-0.6b-20261122"
tokenizer = AutoTokenizer.from_pretrained(repo, trust_remote_code=True)
model = AutoModelForSequenceClassification.from_pretrained(
repo, trust_remote_code=True, dtype=torch.bfloat16).to("cuda").eval()
query = "what are the symptoms of iron deficiency anemia?"
passages = [
"Iron deficiency anemia causes fatigue, shortness of breath, pale skin, and brittle nails.",
"Iron is a metallic element with atomic number 26, widely used in construction and manufacturing.",
]
for score, passage in model.rerank(query, passages, tokenizer=tokenizer):
print(f"{score:+.3f} {passage[:70]}")
Read more
DetailsBenchmarks: average nDCG@10 is 0.634 on TREC DL and 0.533 on BEIR.
Requirements: supports BF16 and runs on modern GPUs (such as NVIDIA L40S or H200).
Architecture: 28 layers, width 1024, 8 attention heads of dimension 128, 2048-token context window.
License: MIT (weights), RLHN-250K (CC-BY-SA-4.0), ClimbMix (CC-BY-NC-4.0).










Comments