Downloads · 30 days
16
41% of all-time downloads
utahnlp/tevatron3-reranker-8b-contrastive
tevatron3-reranker-8b-contrastive is a text ranking model from utahnlp. Use it for the text ranking task on the model card, and read the license before you ship it in a product. It is set up for transformers. The card lists the license as apache-2.0.
A pointwise passage reranker built on Qwen3-8B (dense), trained with the Tevatron 3.0 toolkit.
Downloads · 30 days
16
41% of all-time downloads
All-time downloads
39
Public
Parameters
8.2B
16.4 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors16.4 GB · 100%
From the Hugging Face model README
A pointwise passage reranker built on Qwen3-8B (dense), trained with the Tevatron 3.0 toolkit.
This checkpoint is a causal-LM yes/no scorer, saved as Qwen3ForCausalLM
(Qwen3MoeForCausalLM for MoE). The relevance score of a (query, passage) pair
is the yes/no log-odds at the final prompt token:
score = logit(" yes") − logit(" no")
evaluated right after the prompt suffix "\nIs the passage relevant to the query?".
The prompt is "query: {{query}} passage: {{title}} {{text}}\nIs the passage relevant to the query?"
and no EOS token is appended.
This differs from the HF sequence-classification rerankers in this release (
*-hf,*-lora-hf), which score a single regression logit at EOS.
Score with Tevatron's reranker eval backend (see the Tevatron repo), or directly:
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
name = "brutusxu/tevatron3-reranker-8b-contrastive"
tok = AutoTokenizer.from_pretrained(name)
model = AutoModelForCausalLM.from_pretrained(name, dtype=torch.bfloat16).cuda().eval()
yes_id = tok.encode(" yes", add_special_tokens=False)[-1]
no_id = tok.encode(" no", add_special_tokens=False)[-1]
prompt = ("query: what is the capital of france "
"passage: Paris is the capital of France.\n"
"Is the passage relevant to the query?")
ids = tok(prompt, return_tensors="pt").to("cuda")
with torch.no_grad():
logits = model(**ids).logits[0, -1]
print((logits[yes_id] - logits[no_id]).item())
If you use this model, please cite the Tevatron toolkit.