/ Модель

Характеристики

Контекст
40 960 токенов
Параметры
7,6 млрд
Лицензия
Apache 2.0
Архитектура
qwen3 · dense
Базовая модель
Qwen3-8B
Библиотека
transformers
Опубликована
6 ноя 2026

Yuanbao-Reranker-8B

Генерация текстаТекст → текст10 профессий

Многоязычный реранкер на базе Qwen3-8B, который оценивает релевантность документов запросу для поиска и RAG.

233скачиваний за 30 дней0лайковвеса обновлены6 ноя 2026

Бенчмарки

Как модель справилась с задачами пользователей ailist и что о ней публикуют открытые лидерборды

Тесты пользователейпока нет

Никто ещё не опубликовал тест этой модели. Соберите бенчмарк из своих задач — результат появится здесь.

  1. Добавьте модель в бенчмарк

    Вместе с другими моделями категории «Текст» — сравнение идёт внутри одной категории.

  2. Опишите свои задачи

    Напишите запросы, при необходимости приложите файлы и эталонные ответы.

  3. Запустите и опубликуйте

    Модели ответят на каждую задачу, судья оценит ответы. Опубликованный результат появится на этой странице.

Публичные оценки

Из открытых лидербордов. Сравнивайте результаты одного теста при одинаковых условиях — отсутствие оценки не значит, что модель хуже.

В подключённых источниках результатов для этой модели пока нет.

Что умеет модель

Описание составлено по карточке модели и метаданным Hugging Face

Yuanbao-Reranker-8B — модель-реранкер семейства Yuanbao-Reranker от Yuanbao-Search, дообученная на базе Qwen3-8B. Она принимает инструкцию, поисковый запрос и документ-кандидат и оценивает релевантность документа вероятностью от 0 до 1; оценки можно использовать для повторного ранжирования результатов поиска и контекста для RAG. Модель рассчитана на китайский, английский и многоязычный поиск, включая поиск по длинным документам и коду.

README указывает контекст до 8 192 токенов; модель содержит 7,6 млрд параметров, использует плотную архитектуру Qwen3 и доступна в формате Safetensors. Метаданные также отмечают поддержку генерации текста, однако основное назначение модели — ранжирование.

Сценарии применения

  • повторное ранжирование результатов веб-поиска
  • отбор релевантных фрагментов для RAG
  • поиск китайских текстовых документов по запросу
  • ранжирование длинных документов по релевантности
  • поиск фрагментов кода по описанию или комментарию

Ограничения

Заявленная в README длина контекста — до 8 192 токенов. Для работы с конкретными критериями релевантности требуется сформулировать подходящую инструкцию; приведённые в карточке результаты относятся к описанным там бенчмаркам.

Для каких профессий подходит10

Разделы каталога профессий, в задачах которых используется эта модель

Все профессии

Также подходит для

Карточка модели

README от автора на Hugging Face, как он его опубликовал

Открыть на Hugging Face

Yuanbao-Reranker-8B

Document-Grounded Synthesis and Preference Distillation for Text Reranking

GitHub Hugging Face Collection License

0.6B · 4B · 8B · GitHub Repository

Introduction

Yuanbao-Reranker-8B is the 8B member of the Yuanbao-Reranker family (0.6B, 4B, and 8B) built upon the Qwen3 backbone. Given a task instruction, a search query, and candidate documents, it outputs fine-grained relevance scores in [0, 1] across Chinese, multilingual, English, long-document (up to 8,192 tokens), and code retrieval scenarios.

  • Cross-Tier Ranking Performance: Across five comprehensive benchmark panels (CMTEB-R, MMTEB-R, BEIR, MLDR, and MTEB-Code), Yuanbao-Reranker-8B reaches a state-of-the-art 74.21 Avg., outperforming Qwen3-Reranker-8B (72.68) by 1.53 points and achieving the highest score on every individual panel.
  • Document-Grounded Synthesis & Stratified Group Curation: Trained on 2.75M 1:3 ranking groups constructed via answer-first and query-type-guided synthesis, a three-stage curation funnel (teacher verification, semantic deduplication, and source-by-length quota allocation), and teacher-screened (Δ > 1) difficulty-stratified negative mining (Hard, Medium, and Moderate tiers).
  • Bounded Minimum-Gap Preference Distillation: Jointly optimizes pointwise yes/no cross-entropy and a capped one-sided pairwise hinge objective over positive–negative and negative–negative pairs, followed by layerwise Adaptive LERP model merging with zero inference overhead.

Model Family & Specifications

ModelParametersLayersContext LengthWeight FormatFive-Panel Avg.
Yuanbao-Search/Yuanbao-Reranker-0.6B0.6B288,192Safetensors, BF1670.96
Yuanbao-Search/Yuanbao-Reranker-4B4B368,192Safetensors, BF1673.63
Yuanbao-Search/Yuanbao-Reranker-8B8B368,192Safetensors, BF1674.21
  • Input: Task instruction (<Instruct>), search query (<Query>), candidate document (<Document>)
  • Output: Relevance probability in [0, 1] normalized over the yes and no decision tokens
  • Context Length: Up to 8,192 tokens

Quickstart: Scoring Query–Document Relevance

You can compute query–document relevance scores directly with standalone Hugging Face Transformers or vLLM (no external wrapper required), or via our yuanbao-reranker package.

1. Standalone Usage with Hugging Face Transformers

import math
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer

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_INSTRUCTION = "Given a web search query, retrieve relevant passages that answer the query"
PREFIX = f"<|im_start|>system\n{SYSTEM}<|im_end|>\n<|im_start|>user\n"
SUFFIX = "<|im_end|>\n<|im_start|>assistant\n<think>\n\n</think>\n\n"

model_name = "Yuanbao-Search/Yuanbao-Reranker-8B"
tokenizer = AutoTokenizer.from_pretrained(model_name, trust_remote_code=False)
if tokenizer.pad_token_id is None:
    tokenizer.pad_token = tokenizer.eos_token

model = AutoModelForCausalLM.from_pretrained(
    model_name, torch_dtype=torch.bfloat16, device_map="auto", trust_remote_code=False
).eval()

yes_id = tokenizer.encode("yes", add_special_tokens=False)[0]
no_id = tokenizer.encode("no", add_special_tokens=False)[0]
suffix_ids = tokenizer.encode(SUFFIX, add_special_tokens=False)

def encode_pair(query: str, document: str, instruction: str = DEFAULT_INSTRUCTION, max_length: int = 8192):
    content = f"<Instruct>: {instruction}\n\n<Query>: {query}\n\n<Document>: {document}"
    body = tokenizer.encode(PREFIX + content, add_special_tokens=False)[:max_length]
    return body + suffix_ids

@torch.inference_mode()
def score_pairs(pairs, instruction: str = DEFAULT_INSTRUCTION, max_length: int = 8192):
    encoded = [encode_pair(q, d, instruction, max_length) for q, d in pairs]
    batch = tokenizer.pad({"input_ids": encoded}, padding=True, return_attention_mask=True, return_tensors="pt")
    batch = {k: v.to(model.device) for k, v in batch.items()}
    mask = batch["attention_mask"]
    positions = (mask.long().cumsum(-1) - 1).masked_fill(mask == 0, 0)
    logits = model(**batch, position_ids=positions, use_cache=False).logits
    last = torch.arange(mask.shape[1], device=mask.device).expand_as(mask).masked_fill(mask == 0, -1).max(dim=1).values
    selected = logits[torch.arange(len(encoded), device=mask.device), last][:, [yes_id, no_id]].float()
    logprobs = selected.log_softmax(dim=-1).cpu().tolist()
    return [math.exp(y) / (math.exp(y) + math.exp(n)) for y, n in logprobs]

query = "What is the capital of China?"
documents = [
    "Beijing is the capital of China.",
    "Shanghai is a major financial center.",
    "北京是中国的首都。",
]
scores = score_pairs([(query, doc) for doc in documents])
for doc, score in sorted(zip(documents, scores), key=lambda x: x[1], reverse=True):
    print(f"Score: {score:.4f} | Document: {doc}")

2. Standalone Usage with vLLM

import math
from transformers import AutoTokenizer
from vllm import LLM, SamplingParams
from vllm.inputs import TokensPrompt

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_INSTRUCTION = "Given a web search query, retrieve relevant passages that answer the query"
PREFIX = f"<|im_start|>system\n{SYSTEM}<|im_end|>\n<|im_start|>user\n"
SUFFIX = "<|im_end|>\n<|im_start|>assistant\n<think>\n\n</think>\n\n"

model_name = "Yuanbao-Search/Yuanbao-Reranker-8B"
tokenizer = AutoTokenizer.from_pretrained(model_name, trust_remote_code=False)
yes_id = tokenizer.encode("yes", add_special_tokens=False)[0]
no_id = tokenizer.encode("no", add_special_tokens=False)[0]
suffix_ids = tokenizer.encode(SUFFIX, add_special_tokens=False)

llm = LLM(
    model=model_name, dtype="float16", max_model_len=10000,
    enable_prefix_caching=True, gpu_memory_utilization=0.8, trust_remote_code=False,
)
sampling = SamplingParams(
    temperature=0, top_p=0.95, max_tokens=1, logprobs=20, allowed_token_ids=[yes_id, no_id],
)

def score_pairs_vllm(pairs, instruction: str = DEFAULT_INSTRUCTION, max_length: int = 8192):
    prompts = []
    for q, d in pairs:
        content = f"<Instruct>: {instruction}\n\n<Query>: {q}\n\n<Document>: {d}"
        body = tokenizer.encode(PREFIX + content, add_special_tokens=False)[:max_length]
        prompts.append(TokensPrompt(prompt_token_ids=body + suffix_ids))
    outputs = llm.generate(prompts, sampling, use_tqdm=False)
    scores = []
    for out in outputs:
        lp = out.outputs[0].logprobs[-1]
        yes = -10.0 if yes_id not in lp else float(lp[yes_id].logprob)
        no = -10.0 if no_id not in lp else float(lp[no_id].logprob)
        y_p, n_p = math.exp(yes), math.exp(no)
        scores.append(y_p / (y_p + n_p))
    return scores

3. Using the yuanbao-reranker Package

Clone our GitHub repository to use the unified Python API or CLI with either backend="vllm" or backend="transformers":

from yuanbao_reranker import YuanbaoReranker

model = YuanbaoReranker("Yuanbao-Search/Yuanbao-Reranker-8B", backend="transformers")
results = model.rerank(
    query="Sort a list of integers in ascending order.",
    documents=["sorted(values)", "sum(values)"],
    instruction="Given a code comment, retrieve the code snippet corresponding to that comment.",
    top_n=2,
)
print(results)

Recommended Task Instructions

Yuanbao-Reranker is instruction-aware. You can customize <Instruct> to specify the target relevance criteria for your scenario:

Retrieval ScenarioRecommended instruction
General Web Search & RAG (Default)Given a web search query, retrieve relevant passages that answer the query
Chinese Web Passage RetrievalGiven a Chinese search query, retrieve web passages that answer the question
Long-Document Retrieval (up to 8K)Given a web search query, retrieve relevant passages that answer the query
Natural Language to Code SearchGiven a code comment, retrieve the code snippet corresponding to that comment.
Technical & Coding QAGiven a question about coding, retrieval code or passage that can solve user's question
Fact & Claim VerificationGiven a claim, retrieve documents that support or refute the claim
Legal Statute & Case RetrievalIdentifying the most relevant statutes for a given situation

Tip: For custom domain tasks, formulate a concise English instruction describing what constitutes a relevant document for the query (e.g., "Given a financial inquiry, retrieve relevant earnings report passages that answer the question").

Benchmark Results

1. Main Results on Qwen Top-100

All models rerank the shared Qwen Top-100 candidate pool (Top-100 candidates per query retrieved by Qwen3-Embedding-0.6B) across five comprehensive benchmark panels (nDCG@10 × 100):

ModelParams (Act. / Tot.)CMTEB-RMMTEB-RBEIRMLDRMTEB-CodeAvg.
Sub-1B Compact Models (< 1B Active)
mxbai-rerank-base-v20.5B69.7759.0458.2242.9968.0159.61
bge-reranker-v2-m30.57B72.1458.2755.4859.4141.3457.33
Querit-Reranker-A0.4B0.43B / 4.92B70.4461.4257.7856.5565.7862.39
KaLM-Reranker-Nano-R20.27B / 0.79B70.0062.2658.4766.1365.3864.45
jina-reranker-v3.50.6B73.9666.7161.3265.0173.9068.18
Qwen3-Reranker-0.6B0.6B71.4365.6159.6166.8973.0367.32
Yuanbao-Reranker-0.6B0.6B75.6070.4961.3068.9478.4470.96
Mid-Sized Models (1B–4B Active)
KaLM-Reranker-Small-R21B / 2.12B73.1864.1760.9067.2969.0966.93
mxbai-rerank-large-v21.54B72.0964.7460.2354.2572.7864.82
bge-reranker-v2-gemma2.51B72.3565.8960.2947.3064.2662.02
Querit-Reranker-Dense-4B4B73.0266.5559.8749.9873.7664.64
KaLM-Reranker-Large-R24B / 7.51B75.5866.8662.7269.7273.7569.73
Qwen3-Reranker-4B4B76.0571.2963.6669.3580.3372.13
Yuanbao-Reranker-4B4B78.3174.0864.7470.0480.9873.63
Large Models (8B)
Qwen3-Reranker-8B8B77.6170.9064.7469.6380.5072.68
Yuanbao-Reranker-8B8B78.9974.8465.5170.1281.5874.21

2. Cross-Retriever Generalization on Harrier Top-100

Evaluations on Top-100 candidate pools retrieved by Harrier-OSS-v1-0.6B verify that these gains generalize robustly across distinct first-stage candidate generators:

ModelCMTEB-RMMTEB-RBEIRMLDRMTEB-CodeAvg.
Qwen3-Reranker-0.6B71.1667.5560.3063.2572.9067.03
Yuanbao-Reranker-0.6B75.4174.8161.6865.2978.1571.07 (+4.03)
Qwen3-Reranker-4B75.7473.1864.2466.0179.9271.82
Yuanbao-Reranker-4B78.1181.8265.3365.9880.6074.37 (+2.55)
Qwen3-Reranker-8B77.3972.8765.3765.7480.1372.30
Yuanbao-Reranker-8B78.7681.2166.0266.2481.1574.68 (+2.37)

Training and Evaluation Pipeline

The GitHub repository provides the complete training, inference, and benchmark evaluation codebase.

Citation

@article{yuanbao_reranker_2026,
  title={Yuanbao-Reranker: Document-Grounded Synthesis and Preference Distillation for Text Reranking},
  author={Xu, Hongyuan and Ye, Dezhi and Cao, Jiahao and Liu, Jie and Liang, Haijin and Shi, Haibo and Ma, Jin},
  journal={arXiv preprint},
  year={2026}
}

Acknowledgments

This model is built upon the Qwen3 model family.

Как запустить

На своей GPU в ailist. Цена — по текущим предложениям провайдеров

GPU в ailist

Универсальный рантайм · transformers

Можно запустить

Подбираем GPU…

Класс архитектуры
Qwen3ForCausalLM
Ревизия весов
3868680

0 моделей