zjzju commited on
Commit
50f82ec
·
verified ·
1 Parent(s): 98ffb7d

Simplify model card and reference EasyDistill 2.0

Browse files
Files changed (1) hide show
  1. README.md +29 -125
README.md CHANGED
@@ -11,64 +11,38 @@ tags:
11
  - search-agent
12
  - tool-use
13
  - function-calling
14
- - react
15
  - deep-search
16
- - multi-hop-qa
17
  - qwen
18
  ---
19
 
20
  # SearchQwen2.5-7B
21
 
22
- **SearchQwen2.5-7B** is a compact Search Agent model from the Alibaba Cloud PAI team. It is post-trained on environment-aligned multi-hop search tasks and solver-verified ReAct trajectories generated with the EasyDistill2 pipeline.
23
 
24
- The model is optimized for iterative **search → browse → evidence integration → answer** behavior. It supports both structured Tool-Call interaction and Search-R1-style text interaction (Qwen2.5 variants).
25
 
26
- > 中文简介:SearchQwen2.5-7B 是面向多跳问答与深度搜索任务训练的 Search Agent 小模型,重点增强结构化工具调用、网页浏览和跨来源信息整合能力。
27
-
28
- ## Model details
29
 
30
  | Item | Value |
31
  |---|---|
32
  | Base model | [Qwen/Qwen2.5-7B-Instruct](https://huggingface.co/Qwen/Qwen2.5-7B-Instruct) |
33
  | Parameters | 7.62B |
34
- | Architecture | Qwen2, 28 layers |
35
- | Context length | 32,768 tokens in the released config |
36
- | Primary interface | Structured `search` / `browse` Tool-Call |
37
- | Training | Environment-aligned trajectories, Solver-in-the-Loop verification, and process-aware post-training |
38
- | Companion dataset | [alibaba-pai/SynSearch-Data](https://huggingface.co/datasets/alibaba-pai/SynSearch-Data) |
39
-
40
-
41
-
42
- ## Evaluation
43
-
44
- We report LLM-judge accuracy (%) over two benchmark groups:
45
-
46
- - **Multi-hop QA:** 2WikiMultiHopQA, Bamboogle, HotpotQA, MuSiQue.
47
- - **Deep Search:** GAIA, WebWalkerQA, xbench-deepsearch, BrowseComp-ZH.
48
 
49
- ### Search-R1-style text interaction
50
 
51
- | Model | Multi-hop QA Avg. | Deep Search Avg. | Overall Avg. |
52
- |---|---:|---:|---:|
53
- | Qwen2.5-7B-Instruct | 45.28 | 18.65 | 31.96 |
54
- | **SearchQwen2.5-7B** | **52.95** | **26.23** | **39.59** |
55
 
56
- ### Structured Tool-Call interaction
 
 
 
 
 
57
 
58
- | Model | Multi-hop QA Avg. | Deep Search Avg. | Overall Avg. |
59
- |---|---:|---:|---:|
60
- | Qwen2.5-7B-Instruct | 45.23 | 24.35 | 33.33 |
61
- | **SearchQwen2.5-7B** | **55.90** | **33.33** | **44.61** |
62
-
63
- Deep Search gains are consistently larger than the gains on conventional multi-hop QA, indicating improved search, browsing, and evidence-integration behavior rather than answer memorization alone.
64
-
65
- ## Requirements
66
-
67
- ```bash
68
- pip install -U transformers accelerate torch
69
- ```
70
-
71
- ## Transformers quickstart
72
 
73
  ```python
74
  import torch
@@ -82,36 +56,23 @@ model = AutoModelForCausalLM.from_pretrained(
82
  device_map="auto",
83
  ).eval()
84
 
 
 
 
 
85
  tools = [
86
  {
87
  "type": "function",
88
  "function": {
89
  "name": "search",
90
- "description": "Search the web for relevant pages.",
91
  "parameters": {
92
  "type": "object",
93
  "properties": {"query": {"type": "string"}},
94
  "required": ["query"],
95
  },
96
  },
97
- },
98
- {
99
- "type": "function",
100
- "function": {
101
- "name": "browse",
102
- "description": "Read the content of a web page.",
103
- "parameters": {
104
- "type": "object",
105
- "properties": {"url": {"type": "string"}},
106
- "required": ["url"],
107
- },
108
- },
109
- },
110
- ]
111
-
112
- messages = [
113
- {"role": "system", "content": "You are a search agent. Use tools before answering."},
114
- {"role": "user", "content": "Which city is the birthplace of the author of The Old Man and the Sea?"},
115
  ]
116
 
117
  inputs = tokenizer.apply_chat_template(
@@ -123,75 +84,18 @@ inputs = tokenizer.apply_chat_template(
123
  return_dict=True,
124
  ).to(model.device)
125
 
126
- with torch.inference_mode():
127
- output = model.generate(**inputs, max_new_tokens=256, do_sample=False)
128
-
129
- new_tokens = output[0, inputs["input_ids"].shape[-1]:]
130
- print(tokenizer.decode(new_tokens, skip_special_tokens=False))
131
- ```
132
-
133
- A typical first response is a structured call:
134
-
135
- ```xml
136
- <tool_call>
137
- {"name": "search", "arguments": {"query": "..."}}
138
- </tool_call>
139
- ```
140
-
141
- Execute the requested tool, append the tool response to the conversation, and call the model again until it returns a final answer.
142
-
143
- ## vLLM deployment
144
-
145
- ```bash
146
- vllm serve alibaba-pai/SearchQwen2.5-7B \
147
- --served-model-name SearchQwen2.5-7B \
148
- --enable-auto-tool-choice \
149
- --tool-call-parser hermes \
150
- --max-model-len 8192
151
  ```
152
 
153
- For `SearchQwen2.5-7B`, the release was validated with Transformers and an OpenAI-compatible vLLM endpoint on NVIDIA L20 GPUs. The test covered checkpoint loading, structured `search` emission, tool-result consumption, and final-answer generation.
154
 
155
- ## Training data
156
 
157
- The released companion dataset contains 5,000 audited multi-hop ReAct trajectories covering 4,182 unique tasks. Each example includes a complete `messages` history and metadata for seed provenance, hop count, difficulty, rollout statistics, and answer-equivalence auditing.
158
-
159
- ## Intended use
160
-
161
- - Research on search agents and retrieval-augmented reasoning.
162
- - Search/browse tool-use experiments.
163
- - Fine-tuning, evaluation, and deployment of compact agent models.
164
-
165
- ## Limitations
166
-
167
- - The model requires an external search/browse runtime; it does not provide a search index itself.
168
- - Final-answer quality depends on tool availability and retrieved evidence quality.
169
- - Tool schemas and prompt templates should remain compatible with the released chat template.
170
- - LLM-judge scores may vary with evaluator model, decoding settings, and search backend.
171
- - Do not use the model as the sole authority for safety-critical, legal, medical, or financial decisions.
172
-
173
- ## Artifact integrity
174
-
175
- `SHA256SUMS` contains checksums for all weight shards, the weight index, configuration, and tokenizer.
176
-
177
- ## Related releases
178
-
179
- - [SearchQwen2.5-7B](https://huggingface.co/alibaba-pai/SearchQwen2.5-7B)
180
- - [SearchQwen2.5-3B](https://huggingface.co/alibaba-pai/SearchQwen2.5-3B)
181
- - [SearchQwen3-8B](https://huggingface.co/alibaba-pai/SearchQwen3-8B)
182
- - [SynSearch-Data](https://huggingface.co/datasets/alibaba-pai/SynSearch-Data)
183
-
184
- ## Citation
185
-
186
- ```bibtex
187
- @misc{searchqwen2026,
188
- title = {Fake It Till You Make It: Training Deep Search Agents on Synthetic Reality},
189
- author = {Alibaba Cloud PAI Team},
190
- year = {2026},
191
- note = {SearchQwen model family and SynSearch-Data}
192
- }
193
- ```
194
 
195
  ## License
196
 
197
- This derivative model is released under the license file included in this repository and remains subject to the terms of its base model.
 
11
  - search-agent
12
  - tool-use
13
  - function-calling
 
14
  - deep-search
 
15
  - qwen
16
  ---
17
 
18
  # SearchQwen2.5-7B
19
 
20
+ **SearchQwen2.5-7B** 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](https://github.com/modelscope/easydistill/tree/v2.0.0), and is designed for multi-hop search, browsing, and evidence integration.
21
 
22
+ > SearchQwen2.5-7B 是基于 EasyDistill 2.0 环境对齐轨迹蒸馏链路训练的 Search Agent 小模型,支持结构化 `search` / `browse` 工具调用。
23
 
24
+ ## Model overview
 
 
25
 
26
  | Item | Value |
27
  |---|---|
28
  | Base model | [Qwen/Qwen2.5-7B-Instruct](https://huggingface.co/Qwen/Qwen2.5-7B-Instruct) |
29
  | Parameters | 7.62B |
30
+ | Context length | 32,768 |
31
+ | Recommended interface | Structured Tool-Call |
32
+ | Training data | [SynSearch-Data](https://huggingface.co/datasets/alibaba-pai/SynSearch-Data) |
 
 
 
 
 
 
 
 
 
 
 
33
 
34
+ ## Results
35
 
36
+ LLM-judge accuracy (%). Multi-hop QA averages 2WikiMultiHopQA, Bamboogle, HotpotQA, and MuSiQue; Deep Search averages GAIA, WebWalkerQA, xbench-deepsearch, and BrowseComp-ZH.
 
 
 
37
 
38
+ | Interaction | Model | Multi-hop QA | Deep Search | Overall |
39
+ |---|---|---:|---:|---:|
40
+ | Search-R1 style | Qwen2.5-7B-Instruct | 45.28 | 18.65 | 31.96 |
41
+ | Search-R1 style | **SearchQwen2.5-7B** | **52.95** | **26.23** | **39.59** |
42
+ | Tool-Call | Qwen2.5-7B-Instruct | 45.23 | 24.35 | 33.33 |
43
+ | Tool-Call | **SearchQwen2.5-7B** | **55.90** | **33.33** | **44.61** |
44
 
45
+ ## Quickstart
 
 
 
 
 
 
 
 
 
 
 
 
 
46
 
47
  ```python
48
  import torch
 
56
  device_map="auto",
57
  ).eval()
58
 
59
+ messages = [
60
+ {"role": "system", "content": "You are a search agent. Use tools before answering."},
61
+ {"role": "user", "content": "Which city is the birthplace of the author of The Old Man and the Sea?"},
62
+ ]
63
  tools = [
64
  {
65
  "type": "function",
66
  "function": {
67
  "name": "search",
68
+ "description": "Search the web.",
69
  "parameters": {
70
  "type": "object",
71
  "properties": {"query": {"type": "string"}},
72
  "required": ["query"],
73
  },
74
  },
75
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
76
  ]
77
 
78
  inputs = tokenizer.apply_chat_template(
 
84
  return_dict=True,
85
  ).to(model.device)
86
 
87
+ output = model.generate(**inputs, max_new_tokens=256, do_sample=False)
88
+ print(tokenizer.decode(output[0, inputs["input_ids"].shape[-1]:], skip_special_tokens=False))
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
89
  ```
90
 
91
+ 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.
92
 
93
+ ## Related resources
94
 
95
+ - Framework: [EasyDistill 2.0](https://github.com/modelscope/easydistill/tree/v2.0.0)
96
+ - Data: [SynSearch-Data](https://huggingface.co/datasets/alibaba-pai/SynSearch-Data)
97
+ - Paper: [EasyDistill: A Comprehensive Toolkit for Effective Knowledge Distillation of Large Language Models](https://aclanthology.org/2025.emnlp-demos.60/)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
98
 
99
  ## License
100
 
101
+ This model follows the license included in this repository and the terms of its base model. Checksums are provided in `SHA256SUMS`.