Model reference · open weights
Tencent-Yuanbao-Reranker-v1.5 is an open-weight reranker from tencent. Tencent-Yuanbao-Reranker-v1.5-2B (BF16) weighs 4.7 GB; the smallest configuration that runs it is RTX 3060 12 GB.
For self-hosting, compare this build's requirements below with the GPU you plan to rent.
Summary of the tencent/Tencent-Yuanbao-Reranker-v1.5-2B model card, 2026-12-03
What it is
| Released by | tencent |
|---|---|
| Released | 2026-11-30 |
| Parameters | 2.4B |
| VRAM | 4.7 GB for the weights |
What it runs on
| Card | Runs | Memory |
|---|---|---|
| RTX 3060 12 GB | fits | 11.6 GB |
| RTX 4060 Ti 16 GB | fits | 15.4 GB |
| RTX 3090 24 GB | fits | 23.4 GB |
| RTX 4090 24 GB | fits | 23.4 GB |
| RTX 5090 32 GB | fits | 31.0 GB |
| L40S 48 GB | fits | 44.0 GB |
| A100 80 GB | fits | 78.2 GB |
| H100 80 GB | fits | 78.1 GB |
| RTX PRO 6000 Blackwell 96 GB | fits | 93.8 GB |
| DGX Spark (GB10) 128 GB unified | fits | 107 GB |
| H200 141 GB | fits | 138 GB |
| B200 180 GB | fits | 176 GB |
Builds
| Build | Params | Precision | Weights | Smallest setup |
|---|---|---|---|---|
| Tencent-Yuanbao-Reranker-v1.5-2B (above) ↗ | 2.4B | BF16 | 4.7 GB | RTX 3060 12 GB |
| Tencent-Yuanbao-Reranker-v1.5-0.4B ↗ | 410M | BF16 | 820 MB | RTX 3060 12 GB |
From the model card
A compact dense pointwise reranker obtained by structurally pruning a trained Yuanbao-Reranker v1 checkpoint along all three axes — FFN width, GQA head groups, and depth — then recovering ranking quality with a ranking-aware objective at full source depth.
| Parameters | 2.370B (tied embedding counted once) |
| Source | Yuanbao-Reranker v1, 4.022B, 36 layers |
| FFN intermediate size | 9728 → 8192 |
| Attention heads | Q32/KV8 → Q24/KV6 (G = 4 preserved) |
| Layers | 36 → 24 (contiguous prefix, suffix dropped) |
| Hidden size / head dim | 2560 / 128 (unchanged) |
| Vocabulary | 151,669 |
| Precision | bfloat16 |
| Weight file | 4.41 GiB |
Parameters retain 58.93% of the source, linear FLOPs 54.55%, and decoder FLOPs at T = 2048
54.20%. Relative to the same model's FFN-and-layer-only target (2.527B), head pruning removes a
further 6.2% of parameters for 0.55 average points.
The model is a plain dense Qwen3 architecture — no mask, no sparse kernel, no custom code — so it
loads through the standard transformers path and serves on any Qwen3-compatible stack.
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
model_id = "tencent/Tencent-Yuanbao-Reranker-v1.5-2B"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(model_id, torch_dtype=torch.bfloat16, device_map="cuda").eval()
SYSTEM = (
"Judge whether the Document meets the requirements based on the Query and the Instruct "
'provided. Note that the answer can only be "yes" or "no".'
)
DEFAULT_INSTRUCT = "Given a web search query, retrieve relevant passages that answer the query"
YES_ID, NO_ID = 9693, 2152 # "yes" and "no" are single tokens
CUE = "\n" * 4
def build_prompt(query: str, document: str, instruction: str = DEFAULT_INSTRUCT) -> str:
"""Yuanbao v1 layout.
``CUE`` is the answer cue the model was trained to emit. The assistant header already ends
with a newline, so the token sequence ends with five newlines in total.
"""
return (
f"system\n{SYSTEM}\n"
f"user\n: {instruction}\n: {query}\n: {document}\n"
f"assistant\n" + CUE
)
@torch.no_grad()
def score(query: str, documents: list[str], instruction: str = DEFAULT_INSTRUCT) -> list[float]:
scores = []
for document in documents:
batch = tokenizer(
build_prompt(query, document, instruction),
add_special_tokens=False,
return_tensors="pt",
).to(model.device)
logits = model(**batch, use_cache=False).logits[0, -1].float()
scores.append(torch.sigmoid(logits[YES_ID] - logits[NO_ID]).item())
return scores
docs = ["Beijing is the capital of China.", "Gravity attracts two bodies."]
print(score("what is the capital of china", docs))
# [0.9908, 8.4e-09]
Scoring is pointwise, so one candidate per forward pass is the reference path. If you batch,
pad on the left (tokenizer.padding_side = "left") so index -1 stays the decision position;
right padding silently reads the logits of a pad token.
The margin z_yes - z_no and the two-token probability softmax([z_no, z_yes])[yes] rank
identically, because the probability is monotone in the margin.
This checkpoint uses the Yuanbao-Reranker v1 layout, not the Qwen3 layout. The difference is the
assistant prefix: v1 emits the newline block as part of the answer, so the serving prompt ends with
the four-newline cue (five newline tokens counting the header's own) and the relevance logits are
read from that last position. Scoring with the Qwen3
template (\n\n\n\n) silently changes the token sequence and therefore the score.
Fields are colon-prefixed and the instruction defaults to the string above when omitted.
Five-panel protocol from Yuanbao-Reranker v1: rerank the Top-100 candidates retrieved by Qwen3-Embedding-0.6B, MTEB v1.38.9, FP16 inference, nDCG@10 × 100.
| Model | Params | CMTEB-R | MMTEB-R | BEIR | MLDR | MTEB-Code | Avg. | Δ vs this |
|---|---|---|---|---|---|---|---|---|
| Yuanbao-Reranker v1.5 2B (this model, reference) | 2.370 | 77.05 | 72.27 | 62.73 | 67.61 | 78.28 | 71.59 | — |
| Yuanbao-Reranker v1 4B (published) | 4.022 | 78.31 | 74.08 | 64.74 | 70.04 | 80.98 | 73.63 | +2.04 |
| Yuanbao-Reranker v1.5, I+L only | 2.527 | 77.23 | 72.54 | 62.91 | 68.86 | 79.15 | 72.14 | +0.55 |
| Qwen3-Reranker-4B (published) | 4.022 | 76.05 | 71.29 | 63.66 | 69.35 | 80.33 | 72.13 | +0.54 |
| Qwen3-Reranker-4B I+L, same 2.527B shape | 2.527 | 77.28 | 72.13 | 62.72 | 68.27 | 79.41 | 71.96 | +0.37 |
| Qwen3-Reranker-4B I+H+L, same 2.370B shape | 2.370 | 75.70 | 70.84 | 61.82 | 68.02 | 76.95 | 70.67 | −0.92 |
Every Δ is measured against this model, so a positive value means a row scores higher than the
2.370B checkpoint on this page. Three rows carry the argument:
Any Δ that crosses a parameter boundary has to be read with the Params column: a row above this model is usually also larger. Only the two rows at 2.527B and 2.370B are like-for-like comparisons.
Quoted from the model card on Hugging Face. The full card is behind the Hugging Face link above.