The 0.9B member of the Gaggle reranker family: the same pointwise decoder-only reranker and training recipe as
castorini/gaggle-reranker-20261005, built on
castorini/gaggle-nanochat-0.9b-pretrained-climbmix-20261105,
a 0.89B-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.89B parameters, and the reranker 0.85B, 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. At about a quarter of the parameters, it scores 0.009 nDCG@10 below the 3.2B reranker on TREC DL and 0.014 below it on BEIR (see Evaluation).
| Architecture | the backbone's nanochat transformer (32 layers, width 1,152, 9 heads of dimension 128, 2,048-token context; value embeddings on every 4th layer), causal attention |
| Parameters | 0.85B. The language-model output rows are discarded except the two used for scoring, so the reranker is smaller than the 0.89B 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,152 = 2,304 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 models) |
This is the recipe of the 3.3B reranker's parent runs, unchanged except for the backbone. It is a single run, not a model soup.
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.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.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 3.3B backbone's single runs of the same recipe (mean of four: 0.640 / 0.544), this model is 0.008 lower on TREC DL and 0.011 lower on BEIR. Most of the DL gap is DL23 and the largest BEIR gap is Robust04. 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.
pip install "transformers>=4.52" "torch>=2.5"
import torch
from transformers import AutoModelForSequenceClassification, AutoTokenizer
repo = "castorini/gaggle-reranker-0.9b-20261108"
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:
+21.087 Iron deficiency anemia causes fatigue, shortness of breath, pale skin,
+13.002 A balanced diet includes leafy greens, legumes, and red meat as source
+10.675 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 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 4.
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=16 by default).model(input_ids, attention_mask) returns logits of shape (B, 1) -- the score -- and
true_false_logits of shape (B, 2), for your own batching;
model.build_input_ids(tokenizer, query, passage) assembles the training prompt, and both
padding sides are handled. AutoModel gives the trunk alone, returning final hidden states as a
tensor; note that at padded positions those states are not meaningful.Notes:
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.compute_score use; left padding is supported and differs only by bf16
rounding, because it shifts the absolute positions the rotary embeddings see.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.9b-20261108", 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())
# [21.093608856201172, 10.694791793823242, 13.057291984558105]
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.016 on average.
model.safetensors: the weights in fp32 (3.4 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 of score correspond to.configuration_gaggle.py, modeling_gaggle.py: the architecture itself, loaded by
trust_remote_code=True.modeling_st_gaggle.py, modules.json, sentence_bert_config.json, config_sentence_transformers.json: the
Sentence Transformers CrossEncoder adapter, the same files as the 3.3B reranker's.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 .pt is shipped. It is a bitwise round trip: all 215 tensors it rebuilds equal the training
checkpoint's.SHA256SUMS: checksums of the files above.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:
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},
}
castorini/gaggle-nanochat-0.9b-pretrained-climbmix-20261105:
the causal base model this reranker was fine-tuned from.castorini/gaggle-reranker-20261005: the 3.2B
reranker, the same recipe on the 3.3B backbone (a soup of four runs).castorini/gaggle-nanochat-0.9b-pretrained-climbmix-20261105