gaggle-reranker-0.6b-20261122
The 0.6B member of the Gaggle reranker family: the same pointwise decoder-only reranker and training recipe as
castorini/gaggle-reranker-20261005 and
castorini/gaggle-reranker-0.9b-20261108, built on
castorini/gaggle-nanochat-0.6b-pretrained-climbmix-20261121,
a 0.55B-parameter base model we pre-trained from scratch on ClimbMix. No open-weight third-party backbone is involved
at any stage: the corpus, the pre-training recipe and the relevance fine-tuning data are all public.
The name gives the size class of the backbone: the base model has 0.55B parameters, and the reranker 0.52B, because it keeps only the two output rows it scores with.
The model scores one (query, passage) pair at a time and is meant to reorder the candidates returned by a first-stage retriever. It matches the 0.9B reranker on both benchmark means (TREC DL 0.634 against 0.632, BEIR 0.533 against 0.533), and at about a sixth of the parameters it scores 0.008 nDCG@10 below the 3.2B reranker on TREC DL and 0.013 below it on BEIR (see Evaluation).
Model
| Architecture | the backbone's nanochat transformer (28 layers, width 1,024, 8 heads of dimension 128, 2,048-token context; value embeddings on every 7th layer), causal attention |
| Parameters | 0.52B. The language-model output rows are discarded except the two used for scoring, so the reranker is smaller than the 0.55B base model |
| Scoring | s(q, d) = logit(" true") − logit(" false") at the last prompt token, read from two pre-trained LM head rows (2 × 1,024 = 2,048 parameters). No classification head was added |
| Prompt | <|bos|>Query: {query}\nPassage: {passage}\nRelevant: |
| Truncation | trained with 128 query tokens and 512 passage tokens; not a hard limit at inference, where the backbone's 2,048-token context is the only bound |
| Tokenizer | the backbone's 32,768-entry byte-level BPE (the same tokenizer as the 3.3B and 0.9B models) |
Training
- Initialization: the causal pre-trained checkpoint, step 229,067 (the end of its 287B-token ClimbMix pass).
- Data: RLHN-250K (247,534 instances), a curated subset of seven retrieval collections from the BGE training mixture in which an LLM cascade relabels false negatives as positives.
- Objective: localized contrastive estimation (LCE) — a softmax over one positive and K sampled hard negatives per query at temperature τ = 1, with K ∈ {7, 15, 23} chosen per instance as the largest value its negative pool supports. No distillation, no synthetic data, no teacher.
- Optimization: one epoch, AdamW (β = 0.9/0.95, weight decay 0.01), peak learning rate 5 × 10⁻⁵ with 150 warm-up steps then cosine decay to zero, gradient clipping at global norm 12, an effective batch of 128 query groups per update, 1,928 updates on one NVIDIA H200. FP32 weights and optimizer state with TF32 matmuls.
This is the recipe of the 3.3B reranker's parent runs and of the 0.9B reranker, unchanged except for the backbone. It is a single run, not a model soup.
Evaluation
nDCG@10, reranking the top-100 BM25 candidates retrieved with Pyserini,
128/512 truncation, scored with trec_eval.
| DL19 | DL20 | DL21 | DL22 | DL23 | mean | |
|---|---|---|---|---|---|---|
| BM25 (first stage) | 0.506 | 0.480 | 0.446 | 0.269 | 0.263 | 0.393 |
| This model (0.52B) | 0.759 | 0.707 | 0.709 | 0.524 | 0.469 | 0.634 |
gaggle-reranker-0.9b-20261108 (0.85B) | 0.759 | 0.714 | 0.710 | 0.525 | 0.450 | 0.632 |
gaggle-reranker-20261005 (3.2B, soup of four runs) | 0.757 | 0.723 | 0.714 | 0.533 | 0.480 | 0.641 |
| COVID | News | Robust04 | NFCorpus | SciFact | SCIDOCS | FiQA | mean | |
|---|---|---|---|---|---|---|---|---|
| BM25 (first stage) | 0.595 | 0.395 | 0.407 | 0.322 | 0.679 | 0.149 | 0.236 | 0.398 |
| This model (0.52B) | 0.851 | 0.521 | 0.556 | 0.377 | 0.774 | 0.224 | 0.432 | 0.533 |
gaggle-reranker-0.9b-20261108 (0.85B) | 0.852 | 0.499 | 0.563 | 0.378 | 0.773 | 0.227 | 0.440 | 0.533 |
gaggle-reranker-20261005 (3.2B, soup of four runs) | 0.859 | 0.515 | 0.592 | 0.380 | 0.790 | 0.236 | 0.455 | 0.547 |
Against the 0.9B reranker, the means differ by 0.002 on TREC DL and less than 0.001 on BEIR; the largest per-collection differences are DL23 (+0.019) and News (+0.022) in this model's favour, and FiQA (−0.008), DL20 and Robust04 (−0.007 each) in the 0.9B's. Against the 3.3B backbone's single runs of the same recipe (mean of four: 0.640 / 0.544), this model is 0.006 lower on TREC DL and 0.011 lower on BEIR. The largest gaps to the 3.2B soup are Robust04 (0.036), FiQA (0.024) and DL20 (0.016). Four runs of this recipe on the 3.3B backbone span about 0.003 on each benchmark mean.
Four of the seven BEIR collections — TREC-COVID, TREC-News, Robust04 and NFCorpus — are out of domain with respect to RLHN-250K; FiQA and SCIDOCS have sibling training data in it.
Usage
Using Transformers
pip install "transformers>=4.52" "torch>=2.5"
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.",
"A balanced diet includes leafy greens, legumes, and red meat as sources of dietary iron.",
]
for score, passage in model.rerank(query, passages, tokenizer=tokenizer):
print(f"{score:+.3f} {passage[:70]}")
Output on one NVIDIA L40S GPU:
+15.756 Iron deficiency anemia causes fatigue, shortness of breath, pale skin,
+7.872 A balanced diet includes leafy greens, legumes, and red meat as source
+6.100 Iron is a metallic element with atomic number 26, widely used in const
trust_remote_code=True is needed for the tokenizer as well as the model: the architecture is
nanochat's rather than one transformers ships, so the two files in this repo define it. They are
plain PyTorch, import nothing beyond torch and transformers, and are short enough to read
first. No nanochat checkout and no Flash Attention build are involved. They are the 0.9B reranker's files, byte for
byte: the 3.3B reranker's files with one addition, the ve_every setting (value embeddings on every ve_every-th
layer), which this backbone sets to 7.
Three entry points, in increasing order of control:
model.rerank(query, passages, tokenizer=tokenizer)returns(score, passage)pairs, sorted.model.compute_score([(query, passage), ...], tokenizer=tokenizer)returns one score per pair in order, batched internally (batch_size=16by default).model(input_ids, attention_mask)returnslogitsof shape(B, 1)-- the score -- andtrue_false_logitsof shape(B, 2), for your own batching;model.build_input_ids(tokenizer, query, passage)assembles the training prompt, and both padding sides are handled.AutoModelgives the trunk alone, returning final hidden states as a tensor; note that at padded positions those states are not meaningful.
Notes:
- Scores are unbounded logit differences, not probabilities. As the example shows, all three passages score positive and only their order is meaningful: use the scores to sort candidates within one query, and do not compare or threshold them across queries without calibration.
- The model is pointwise: each pair is scored independently, so candidates can be batched and scored in parallel.
- The 128/512 caps are what the model was trained with and what every number above was measured at,
but they are not enforced at inference: change
config.max_query_len/config.max_doc_len, or build the ids yourself, and the model still scores up to the backbone's 2,048-token context. Inputs longer than training are simply untested. - bf16, as in the example, is what every number above was measured at. The two scoring rows follow the load dtype and the difference of their logits is taken in fp32, which is what the research code this was ported from does.
- The port is exact, not merely close: run against that research code on the same GPU, this repo produces
bitwise identical scores over 1,200 SciFact and 1,200 DL19 pairs -- one pair per forward and in padded
batches alike -- with identical rankings for all queries. Through the full evaluation harness on one GPU (an
NVIDIA L40S), the port and the research code give the same nDCG@10 (DL19 0.7582, NFCorpus 0.3768, SciFact
0.7716). The table above was measured on other GPUs (H200s for NFCorpus and SciFact), from which these differ
by 0.0003 to 0.0026 (0.7594, 0.3771 and 0.7742 there). Right padding is what was verified, and what the shipped
tokenizer and
compute_scoreuse; left padding is supported and differs only by bf16 rounding, because it shifts the absolute positions the rotary embeddings see.
Using Sentence Transformers
pip install "sentence-transformers>=5.4.0" "transformers>=4.45.0" "torch>=2.5"
from sentence_transformers import CrossEncoder
model = CrossEncoder("castorini/gaggle-reranker-0.6b-20261122", trust_remote_code=True)
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.",
"A balanced diet includes leafy greens, legumes, and red meat as sources of dietary iron.",
]
scores = model.predict([(query, passage) for passage in passages])
print(scores.tolist())
# [15.8211669921875, 6.082571983337402, 7.889915943145752]
rankings = model.rank(query, passages)
print([result["corpus_id"] for result in rankings])
# [0, 2, 1]
This example uses fp32. For bf16 inference, pass model_kwargs={"torch_dtype": "bfloat16"} when loading.
The input adapter calls build_input_ids to preserve the training prompt, separate 128/512 query
and passage token limits, and right padding. Adjust the limits through model.config.max_query_len
and model.config.max_doc_len. Scores are raw logit differences, with no sigmoid applied.
CrossEncoder and the transformers class give bitwise identical scores on the pairs above (fp32 and bf16) and on
1,000 DL19 pairs in bf16 batches of 64; on long TREC-COVID passages, where the two batch the pairs differently, bf16
rounding moves scores by 0.013 on average.
Files
model.safetensors: the weights in fp32 (2.1 GB). Optimizer and RNG state are not included, so the model scores but does not resume.config.json: the architecture, plus the reranker's own settings -- the prompt, its token ids, the length caps, and the" true"/" false"ids that the two rows ofscorecorrespond to.configuration_gaggle.py,modeling_gaggle.py: the architecture itself, loaded bytrust_remote_code=True.modeling_st_gaggle.py,modules.json,sentence_bert_config.json,config_sentence_transformers.json: the Sentence TransformersCrossEncoderadapter, the same files as the 3.3B and 0.9B rerankers'.tokenizer.json,tokenizer_config.json: the backbone tokenizer, with pad and eos pinned to<|assistant_end|>and right padding, so no setup helper is needed.to_nanochat_ckpt.py: rebuilds the original training checkpoint from these files, for the paper's own evaluation harness, which is why no.ptis shipped. It is a bitwise round trip: all 183 tensors it rebuilds equal the training checkpoint's.SHA256SUMS: checksums of the files above.
License and data provenance
The weights are released under the MIT license. The data they were derived from carries its own terms, which downstream users should check against their intended use:
- RLHN-250K, the relevance fine-tuning data, is CC-BY-SA-4.0. It is curated from seven collections of the BGE training mixture, whose own licenses vary.
- ClimbMix, the pre-training corpus of the backbone, is CC-BY-NC-4.0.
Please cite:
@misc{lin2026projectgreenhouseprogressfully,
title={Project Greenhouse: Progress Toward Fully Open and Sovereign Agentic Search},
author={Jimmy Lin and Sahel Sharifymoghaddam and Lingwei Gu and Nour Jedidi},
year={2026},
eprint={2610.11922},
archivePrefix={arXiv},
primaryClass={cs.IR},
url={https://arxiv.org/abs/2610.11922},
}
Related
castorini/gaggle-nanochat-0.6b-pretrained-climbmix-20261121: the causal base model this reranker was fine-tuned from.castorini/gaggle-reranker-0.9b-20261108: the 0.9B reranker, the same recipe on the 0.9B backbone.castorini/gaggle-reranker-20261005: the 3.2B reranker, the same recipe on the 3.3B backbone (a soup of four runs).