CoolFace
Modelpublic

alibaba-pai/SearchQwen2.5-3B

sourceHugging Faceotherupdated 29d agoView on Hugging Face
3likes659downloads
Model Card

SearchQwen2.5-3B

SearchQwen2.5-3B is a compact Search Agent model from the Alibaba Cloud PAI team. It is trained with environment-aligned, solver-verified search trajectories generated by EasyDistill 2.0, and is designed for multi-hop search, browsing, and evidence integration.

SearchQwen2.5-3B 是基于 EasyDistill 2.0 环境对齐轨迹蒸馏链路训练的 Search Agent 小模型,支持结构化 search / browse 工具调用。

Model overview

ItemValue
Base modelQwen/Qwen2.5-3B-Instruct
Parameters3.09B
Context length32,768
Recommended interfaceStructured Tool-Call
Training dataSynSearch-Data

Results

LLM-judge accuracy (%). Multi-hop QA averages 2WikiMultiHopQA, Bamboogle, HotpotQA, and MuSiQue; Deep Search averages GAIA, WebWalkerQA, xbench-deepsearch, and BrowseComp-ZH.

InteractionModelMulti-hop QADeep SearchOverall
Search-R1 styleQwen2.5-3B-Instruct30.1214.9522.54
Search-R1 styleSearchQwen2.5-3B39.5521.1530.35
Tool-CallQwen2.5-3B-Instruct36.107.0521.60
Tool-CallSearchQwen2.5-3B48.5821.4035.00

Quickstart

python
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer

model_id = "alibaba-pai/SearchQwen2.5-3B"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(
    model_id,
    torch_dtype=torch.bfloat16,
    device_map="auto",
).eval()

messages = [
    {"role": "system", "content": "You are a search agent. Use tools before answering."},
    {"role": "user", "content": "Which city is the birthplace of the author of The Old Man and the Sea?"},
]
tools = [
    {
        "type": "function",
        "function": {
            "name": "search",
            "description": "Search the web.",
            "parameters": {
                "type": "object",
                "properties": {"query": {"type": "string"}},
                "required": ["query"],
            },
        },
    }
]

inputs = tokenizer.apply_chat_template(
    messages,
    tools=tools,
    add_generation_prompt=True,
    tokenize=True,
    return_tensors="pt",
    return_dict=True,
).to(model.device)

output = model.generate(**inputs, max_new_tokens=256, do_sample=False)
print(tokenizer.decode(output[0, inputs["input_ids"].shape[-1]:], skip_special_tokens=False))

The model returns a structured <tool_call>; execute the tool, append its response, and continue until a final answer is produced. An external search/browse backend is required.

Related resources

License

This model follows the license included in this repository and the terms of its base model. Checksums are provided in SHA256SUMS.