đ rank1-14b: Test-Time Compute for Reranking in Information Retrieval
rank1 is a reasoning reranker model that enhances information retrieval. It "thinks" before making relevance judgments, trained from the Qwen2.5-14B base model. This 14B parameter model uses test-time compute to generate reasoning chains, improving performance in diverse retrieval tasks.
đ Paper | đ GitHub Repository
đ Quick Start
Note that official usage is found on the Github and accounts for edge cases. But for simple use cases the minimal example below works.
Click to expand: Minimal example with vLLM
from vllm import LLM, SamplingParams
import math
model = LLM(
model="jhu-clsp/rank1-14b",
tensor_parallel_size=1,
trust_remote_code=True,
max_model_len=16000,
gpu_memory_utilization=0.9,
dtype="float16",
)
sampling_params = SamplingParams(
temperature=0,
max_tokens=8192,
logprobs=20,
stop=["</think> true", "</think> false"],
skip_special_tokens=False
)
def create_prompt(query, document):
return (
"Determine if the following passage is relevant to the query. "
"Answer only with 'true' or 'false'.\n"
f"Query: {query}\n"
f"Passage: {document}\n"
"<think>"
)
query = "What are the effects of climate change?"
document = "Climate change leads to rising sea levels, extreme weather events, and disruptions to ecosystems. These effects are caused by increasing greenhouse gas concentrations in the atmosphere due to human activities."
prompt = create_prompt(query, document)
outputs = model.generate([prompt], sampling_params)
output = outputs[0].outputs[0]
text = output.text
final_logits = output.logprobs[-1]
from transformers import AutoTokenizer
tokenizer = AutoTokenizer.from_pretrained("jhu-clsp/rank1-14b")
true_token = tokenizer(" true", add_special_tokens=False).input_ids[0]
false_token = tokenizer(" false", add_special_tokens=False).input_ids[0]
true_logit = final_logits[true_token].logprob
false_logit = final_logits[false_token].logprob
true_score = math.exp(true_logit)
false_score = math.exp(false_logit)
relevance_score = true_score / (true_score + false_score)
print(f"Reasoning chain: {text}")
print(f"Relevance score: {relevance_score}")
⨠Features
rank1 introduces a novel approach to information retrieval by generating explicit reasoning chains before making relevance judgments. Unlike traditional rerankers that directly output scores, rank1:
- Receives a query and document pair
- Generates a reasoning chain within a
<think>...</think>
section
- Makes a binary relevance judgment (
true
or false
)
- Returns a confidence score based on the logits of the true/false tokens
This approach helps the model break down complex relevance decisions into logical steps, improving performance across diverse retrieval tasks.
đĻ Installation
Please see the Github for detailed installation instructions.
đģ Usage Examples
Basic Usage
The basic usage example is shown above in the "Quick Start" section.
Advanced Usage
from mteb import MTEB
from rank1 import rank1
model = rank1(
model_name_or_path="jhu-clsp/rank1-14b",
num_gpus=1,
device="cuda"
)
evaluation = MTEB(tasks=["NevIR"])
results = evaluation.run(model)
đ Documentation
Model Family
Associated Data and Resources
Performance
rank1-14b demonstrates strong performance on retrieval benchmarks, particularly on tasks requiring complex reasoning. The model's ability to "think through" relevance decisions makes it especially effective for nuanced topics.
For specific benchmark results and comparisons with other models, please refer to the paper and the official GitHub repository.
đ License
MIT License
đ Citation
If you use rank1 in your research, please cite our work:
@misc{weller2025rank1testtimecomputereranking,
title={Rank1: Test-Time Compute for Reranking in Information Retrieval},
author={Orion Weller and Kathryn Ricci and Eugene Yang and Andrew Yates and Dawn Lawrie and Benjamin Van Durme},
year={2025},
eprint={2502.18418},
archivePrefix={arXiv},
primaryClass={cs.IR},
url={https://arxiv.org/abs/2502.18418},
}