混元发布 Yuanbao-Reranker v1.5-0.4B,参数量缩减至 0.410B 并保持性能领先
tencent/Tencent-Yuanbao-Reranker-v1.5-0.4B

混元发布 Yuanbao-Reranker v1.5-0.4B,通过结构化剪枝 FFN 宽度和深度轴,参数量降至 0.410B,同时使用排名感知目标恢复质量,在 CMTEB-R、MMTEB-R 等基准上平均提升 0.4 点,优于 Qwen3-Reranker-0.6B,且部署于任何 Qwen3 兼容堆栈。
Yuanbao-Reranker v1.5 — 0.4B
A compact dense pointwise reranker obtained by structurally pruning a trained Yuanbao-Reranker v1 checkpoint along the FFN-width and depth axes, then recovering ranking quality with a ranking-aware objective at full source depth.
| Parameters | 0.410B (tied embedding counted once) |
| Source | Yuanbao-Reranker v1, 0.596B, 28 layers |
| FFN intermediate size | 3072 → 2560 |
| Layers | 28 → 18 (contiguous prefix, suffix dropped) |
| Hidden size / head dim | 1024 / 128 (unchanged) |
| Query / KV heads | 16 / 8 (unchanged) |
| Vocabulary | 151,669 |
| Precision | bfloat16 |
| Weight file | 0.76 GiB |
Decoder FLOPs at T = 2048 retain 59.21% of the source; parameters retain 68.84%.
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.
Quick start
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
model_id = "tencent/Tencent-Yuanbao-Reranker-v1.5-0.4B"
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"<|im_start|>system\n{SYSTEM}<|im_end|>\n"
f"<|im_start|>user\n: {instruction}\n: {query}\n: {document}<|im_end|>\n"
f"<|im_start|>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.9936, 2.0e-07]
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.
Prompt template
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 (<think>\n\n</think>\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.
Evaluation
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 0.4B (this model, reference) | 0.410 | 75.32 | 69.42 | 59.53 | 68.05 | 75.19 | 69.50 | — |
| Yuanbao-Reranker v1 0.6B (published) | 0.596 | 75.60 | 70.49 | 61.30 | 68.94 | 78.44 | 70.96 | +1.46 |
| Qwen3-Reranker-0.6B (published) | 0.596 | 71.43 | 65.61 | 59.61 | 66.89 | 73.03 | 67.32 | −2.18 |
| Qwen3-Reranker-0.6B I+L, same 0.410B shape | 0.410 | 74.33 | 68.88 | 59.15 | 67.75 | 75.37 | 69.10 | −0.40 |
| Qwen3-Reranker-0.6B I+H+L, 0.382B | 0.382 | 73.65 | 67.74 | 58.56 | 67.85 | 72.48 | 68.06 | −1.44 |
Every Δ is measured against this model, so a positive value means a row scores higher than the
0.410B checkpoint on this page. Two rows carry the argument:
- At equal parameters this model wins. Against the Qwen3-derived target pruned to the identical 0.410B architecture it is 0.40 points higher; the extra 0.028B of head pruning in the I+H+L row costs it a further 1.04 points.
- Against its own predecessor it gives up 1.46 points for 31% fewer parameters. Yuanbao v1 0.6B is 0.186B larger (0.596B vs 0.410B) and still 1.46 points ahead, so the trade is roughly 1.5 points of quality for a third of the weights.
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 0.410B row is a like-for-like comparison.
Limitations
- One recovery run per target; no seed variability or significance estimate, so differences of a few tenths of a point are within run-to-run variation.
- The five-panel average is a summary, not a per-panel bound: the largest panel loss here is on MTEB-Code (−3.25 versus the source).
- Trained for ranking with a two-token
yes/noreadout. Not a chat model;generate()is not the intended path, which is why nogeneration_config.jsonis shipped. - Latency was measured on the Qwen3 targets of the same shapes, not on this checkpoint.
- No data or teacher checkpoint is released; see the repository below for the pipeline that produced this file.
License
Released under the Tencent Yuanbao-Reranker license; see LICENSE. The architecture and tokenizer derive from Qwen3, Copyright 2025 Alibaba Group Holding Limited, licensed under Apache-2.0.
Citation
@techreport{yuanbao_reranker_v15_2026,
title={Yuanbao-Reranker v1.5: Joint Pruning of FFN Width, Attention Heads, and Layers},
author={Cao, Jiahao and Ye, Dezhi and Xu, Hongyuan and Liu, Jie and Liang, Haijin and Shi, Haibo and Ma, Jin},
institution={Yuanbao Search, Tencent Inc.},
type={Technical Report},
year={2026}
}
来源: 腾讯混元 · Hugging Face 新模型 · huggingface.co