Lonepic BoZhang commited on
Commit
3882c7b
·
0 Parent(s):

Super-squash branch 'main' using huggingface_hub

Browse files

Co-authored-by: BoZhang <BoZhang@users.noreply.huggingface.co>

.gitattributes ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ *.7z filter=lfs diff=lfs merge=lfs -text
2
+ *.arrow filter=lfs diff=lfs merge=lfs -text
3
+ *.bin filter=lfs diff=lfs merge=lfs -text
4
+ *.bz2 filter=lfs diff=lfs merge=lfs -text
5
+ *.ckpt filter=lfs diff=lfs merge=lfs -text
6
+ *.ftz filter=lfs diff=lfs merge=lfs -text
7
+ *.gz filter=lfs diff=lfs merge=lfs -text
8
+ *.h5 filter=lfs diff=lfs merge=lfs -text
9
+ *.joblib filter=lfs diff=lfs merge=lfs -text
10
+ *.lfs.* filter=lfs diff=lfs merge=lfs -text
11
+ *.mlmodel filter=lfs diff=lfs merge=lfs -text
12
+ *.model filter=lfs diff=lfs merge=lfs -text
13
+ *.msgpack filter=lfs diff=lfs merge=lfs -text
14
+ *.npy filter=lfs diff=lfs merge=lfs -text
15
+ *.npz filter=lfs diff=lfs merge=lfs -text
16
+ *.onnx filter=lfs diff=lfs merge=lfs -text
17
+ *.ot filter=lfs diff=lfs merge=lfs -text
18
+ *.parquet filter=lfs diff=lfs merge=lfs -text
19
+ *.pb filter=lfs diff=lfs merge=lfs -text
20
+ *.pickle filter=lfs diff=lfs merge=lfs -text
21
+ *.pkl filter=lfs diff=lfs merge=lfs -text
22
+ *.pt filter=lfs diff=lfs merge=lfs -text
23
+ *.pth filter=lfs diff=lfs merge=lfs -text
24
+ *.rar filter=lfs diff=lfs merge=lfs -text
25
+ *.safetensors filter=lfs diff=lfs merge=lfs -text
26
+ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
27
+ *.tar.* filter=lfs diff=lfs merge=lfs -text
28
+ *.tar filter=lfs diff=lfs merge=lfs -text
29
+ *.tflite filter=lfs diff=lfs merge=lfs -text
30
+ *.tgz filter=lfs diff=lfs merge=lfs -text
31
+ *.wasm filter=lfs diff=lfs merge=lfs -text
32
+ *.xz filter=lfs diff=lfs merge=lfs -text
33
+ *.zip filter=lfs diff=lfs merge=lfs -text
34
+ *.zst filter=lfs diff=lfs merge=lfs -text
35
+ *tfevents* filter=lfs diff=lfs merge=lfs -text
36
+ tokenizer.json filter=lfs diff=lfs merge=lfs -text
37
+ figures/Sage-A1.5-benchmark.png filter=lfs diff=lfs merge=lfs -text
38
+ figures/Sage-A1p5-benchmark.png filter=lfs diff=lfs merge=lfs -text
README.md ADDED
@@ -0,0 +1,655 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ library_name: transformers
3
+ license: apache-2.0
4
+ pipeline_tag: text-generation
5
+ tags:
6
+ - moe
7
+ - vlm
8
+ - vision
9
+ - agentic
10
+ - code
11
+ - tool-use
12
+ ---
13
+
14
+ # Sage-A1.5
15
+
16
+ <div style="display: flex; flex-direction: column; align-items: center; line-height: 1.2;">
17
+ <div style="display: flex; justify-content: center; align-items: center; gap: 10px; height: 30px;">
18
+ <span style="font-size: 16px;" role="img" aria-label="Homepage">🏠</span>
19
+ <a href="https://alpha-innovator.github.io/Sage-A1.5/"><b>Homepage</b></a>
20
+ <span style="color: #ccc;">|</span>
21
+ <img src="./figures/24px.svg" width="16" height="16" alt="Technical Report" style="filter: invert(0.5);">
22
+ <a href="https://arxiv.org/abs/2610.28578"><b>Technical Report</b></a>
23
+ </div>
24
+
25
+ <div style="display: flex; justify-content: center; align-items: center; gap: 10px; height: 30px; margin-top: 2px;">
26
+ <img src="./figures/hf-logo.svg" width="16" height="16" alt="Hugging Face">
27
+ <a href="https://huggingface.co/InternScience/Sage-A1.5"><b>Hugging Face</b></a>
28
+ <span style="color: #ccc;">|</span>
29
+ <img src="./figures/github-logo.svg" width="16" height="16" alt="GitHub">
30
+ <a href="https://github.com/InternScience/Agents-A1"><b>Github</b></a>
31
+ <span style="color: #ccc;">|</span>
32
+ <img src="./figures/modelscope-logo.svg" width="16" height="16" alt="Model Scope">
33
+ <a href="https://modelscope.cn/models/InternScience/Sage-A1.5"><b>ModelScope</b></a>
34
+ </div>
35
+ </div>
36
+
37
+ > [!Note]
38
+ > This repository contains model weights and configuration files for Sage-A1.5 in the Hugging Face Transformers format.
39
+ >
40
+ > These artifacts are compatible with Hugging Face Transformers, vLLM, SGLang, etc.
41
+
42
+ ---
43
+
44
+ **Sage‑A1.5** is a 35B Mixture‑of‑Experts agentic model from Shanghai AI Laboratory, built to advance long-horizon scientific problem solving through adaptive capability composition. Building upon **A1**, **Sage‑A1.5** learns not only to solve individual tasks, but also to organize work and revise its approach during execution, highlighting three key capabilities: **Agentic Orchestration, Verification, and Open Scientific Discovery**.
45
+
46
+ First, agentic orchestration extends single-agent execution through task delegation and parallel collaboration among subagents with isolated contexts,
47
+ enabling complex tasks to be decomposed and addressed concurrently while reducing interference across concurrent subagents.
48
+ Second, agentic verification strengthens long-horizon reliability through progress checking, evidence validation, and reflective strategy revision,
49
+ allowing **Sage‑A1.5** to recognize unproductive search paths and pursue alternative approaches.
50
+ Third, open scientific discovery extends agentic capabilities beyond answering predefined questions to conducting exploratory research,
51
+ connecting scientific inquiry with interactive analysis and inspectable research artifacts.
52
+ We hope **Sage‑A1.5** provides the community with an accessible foundation for open scientific discovery,
53
+ offering a practical path from long-horizon task execution to collaborative, verifiable, and inspectable scientific exploration.
54
+
55
+ ![Sage-A1 Benchmark Overview](./figures/Sage-A1p5-benchmark.png)
56
+
57
+ ## Highlights
58
+ - **Agentic Orchestration**: Orchestrates parallel investigations across subagents with independent contexts, enabling them to challenge assumptions, refine conclusions through evidence, and synthesize their findings into comprehensive results.
59
+ - **Verification Mode**: An opt-in self-review capability that lives inside the model's own chain of thought — the model pauses mid-trajectory to review what it has established and what has failed, then acts on a revised direction in the same turn, with no external critic.
60
+ - **Agentic Reasoning**: Sage-A1.5 excels at decomposing complex tasks into executable sub-steps, planning ahead, and adapting its strategy based on intermediate results.
61
+ - **Tool Use**: Natively supports function calling and tool integration, enabling seamless interaction with APIs, code interpreters, search engines, and other external tools.
62
+ - **Scientific and Professional Reasoning**: Handles tool-integrated scientific reasoning and professional knowledge question answering.
63
+ - **Instruction Following**: Precisely follows detailed, multi-constraint instructions across diverse domains.
64
+
65
+ We welcome developers and enterprises to integrate and try Sage-A1.5 and share their feedback.
66
+
67
+ ## Performance
68
+
69
+ We evaluate Sage-A1.5 in real-world agentic and research-oriented workflows across six
70
+ directions — long-horizon search, engineering tasks, instruction following, scientific research,
71
+ general agentic tasks, and scientific agentic tasks. Despite operating in the ~35B model class,
72
+ Sage-A1.5 delivers highly competitive performance against frontier-scale systems such as
73
+ Kimi-K3, GLM-5.3, and GPT-5.6-sol. It achieves overall SOTA on XBench-DS-2510 (92.0),
74
+ IFBench (81.6), PinchBench (90.0), FrontierScience-Olympiad (81.0), FrontierScience-Research (48.3),
75
+ CMT (80.0), and OmniDocBench (91.5), and reaches 95.1 on GAIA — higher than every
76
+ larger-scale model we compare against. Among comparable ~35B models it ranks first on a broad
77
+ range of tasks, including BrowseComp (81.7), SWE-bench Pro (61.2), MLE-Lite (65.2),
78
+ SciCode (44.3, tied with Agents-A1), AA-LCR (81.0), HLE w/ tools (55.1),
79
+ VitaBench (45.4), and ChemCOTBench (66.5).
80
+ Compared with A1, it improves substantially on engineering and agentic workloads
81
+ (SWE-bench Pro +17.6, SWE-bench Multilingual +14.0, PinchBench +13.1, MLE-Lite +21.3).
82
+ These results show that Sage-A1.5 combines strong long-horizon search ability, robust
83
+ scientific reasoning, and reliable instruction following, establishing it as a highly capable and
84
+ efficient agentic model that narrows the gap with much larger frontier models.
85
+
86
+
87
+ <p>
88
+ 🥇 Overall SOTA &nbsp;&nbsp;
89
+ 🟢 Best Among Comparable Models (~35B)
90
+ </p>
91
+
92
+ <table>
93
+ <thead>
94
+ <tr>
95
+ <th rowspan="2" align="left">Benchmark</th>
96
+ <th colspan="3" align="center" style="text-align:center;">
97
+ 📏 Comparable Models (~35B)
98
+ </th>
99
+
100
+ <th colspan="3" align="center" style="text-align:center;">
101
+ 🚀 Larger-scale Models
102
+ </th>
103
+ </tr>
104
+
105
+ <tr>
106
+ <th align="center">Sage-A1.5</th>
107
+ <th align="center">Agents-A1</th>
108
+ <th align="center">Ornith-1.5</th>
109
+
110
+ <th align="center">Kimi-K3</th>
111
+ <th align="center">GLM-5.3</th>
112
+ <th align="center">GPT-5.6-sol</th>
113
+
114
+ </tr>
115
+ </thead>
116
+
117
+ <tbody>
118
+
119
+ <tr>
120
+ <td colspan="8" align="left"><b>🔍 Long-horizon Search</b></td>
121
+ </tr>
122
+
123
+ <tr>
124
+ <td align="left">GAIA</td>
125
+ <td align="center">95.1</td>
126
+ <td align="center">96.0 🥇</td>
127
+ <td align="center">77.6</td>
128
+ <td align="center">92.2</td>
129
+ <td align="center">92.2</td>
130
+ <td align="center">88.3</td>
131
+ </tr>
132
+
133
+ <tr>
134
+ <td align="left">BrowseComp</td>
135
+ <td align="center">81.7 w/o Agentic Orchestration<br>82.8 🟢 w/ Agentic Orchestration</td>
136
+ <td align="center">75.5</td>
137
+ <td align="center">67.6</td>
138
+ <td align="center">91.2 🥇</td>
139
+ <td align="center">76.2</td>
140
+ <td align="center">90.4</td>
141
+ </tr>
142
+
143
+ <tr>
144
+ <td align="left">DeepResearch-Bench2</td>
145
+ <td align="center">43.7 w/o Agentic Orchestration<br>47.5 w/ Agentic Orchestration</td>
146
+ <td align="center">37.5</td>
147
+ <td align="center">48.6 🟢</td>
148
+ <td align="center">52.4</td>
149
+ <td align="center">55.7</td>
150
+ <td align="center">57.9 🥇</td>
151
+ </tr>
152
+
153
+ <tr>
154
+ <td align="left">XBench-DS-2510</td>
155
+ <td align="center">92.0 🥇</td>
156
+ <td align="center">86.0</td>
157
+ <td align="center">80.0</td>
158
+ <td align="center">85.0</td>
159
+ <td align="center">84.0</td>
160
+ <td align="center">90.0</td>
161
+ </tr>
162
+
163
+
164
+
165
+ <tr>
166
+ <td colspan="8" align="left"><b>⚙️ Engineering Tasks</b></td>
167
+ </tr>
168
+
169
+ <tr>
170
+ <td align="left">MLE-Lite</td>
171
+ <td align="center">65.2 🟢</td>
172
+ <td align="center">43.9</td>
173
+ <td align="center">39.4</td>
174
+ <td align="center">72.7</td>
175
+ <td align="center">72.7</td>
176
+ <td align="center">77.3 🥇</td>
177
+ </tr>
178
+
179
+ <tr>
180
+ <td align="left">SciCode</td>
181
+ <td align="center">44.3 🟢</td>
182
+ <td align="center">44.3</td>
183
+ <td align="center">39.5</td>
184
+ <td align="center">58.7</td>
185
+ <td align="center">59.0 🥇</td>
186
+ <td align="center">56.1</td>
187
+ </tr>
188
+
189
+ <tr>
190
+ <td align="left">SWE-bench Pro</td>
191
+ <td align="center">61.2 🟢</td>
192
+ <td align="center">43.6</td>
193
+ <td align="center">59.6</td>
194
+ <td align="center">63.3</td>
195
+ <td align="center">64.6</td>
196
+ <td align="center">64.6 🥇</td>
197
+ </tr>
198
+
199
+ <tr>
200
+ <td align="left">SWE-bench Multilingual</td>
201
+ <td align="center">72.7 🟢</td>
202
+ <td align="center">58.7</td>
203
+ <td align="center">71.4</td>
204
+ <td align="center">80.8</td>
205
+ <td align="center">81.3 🥇</td>
206
+ <td align="center">74.1</td>
207
+ </tr>
208
+
209
+ <tr>
210
+ <td colspan="8" align="left"><b>📋 Instruction Following</b></td>
211
+ </tr>
212
+
213
+ <tr>
214
+ <td align="left">IFBench</td>
215
+ <td align="center">81.6 🥇</td>
216
+ <td align="center">80.6</td>
217
+ <td align="center">44.6</td>
218
+ <td align="center">72.1</td>
219
+ <td align="center">53.4</td>
220
+ <td align="center">72.7</td>
221
+ </tr>
222
+
223
+ <tr>
224
+ <td align="left">AA-LCR</td>
225
+ <td align="center">81.0 🟢</td>
226
+ <td align="center">74.2</td>
227
+ <td align="center">73.2</td>
228
+ <td align="center">88.7 🥇</td>
229
+ <td align="center">79.7</td>
230
+ <td align="center">84.0</td>
231
+ </tr>
232
+
233
+
234
+ <tr>
235
+ <td colspan="8" align="left"><b>🧪 Scientific Research</b></td>
236
+ </tr>
237
+
238
+ <tr>
239
+ <td align="left">FrontierScience-Olympiad</td>
240
+ <td align="center">81.0 🥇</td>
241
+ <td align="center">79.0</td>
242
+ <td align="center">70.0</td>
243
+ <td align="center">69.0</td>
244
+ <td align="center">67.0</td>
245
+ <td align="center">73.0</td>
246
+ </tr>
247
+
248
+ <tr>
249
+ <td align="left">FrontierScience-Research</td>
250
+ <td align="center">48.3 🥇</td>
251
+ <td align="center">40.0</td>
252
+ <td align="center">6.7</td>
253
+ <td align="center">21.7</td>
254
+ <td align="center">16.7</td>
255
+ <td align="center">26.7</td>
256
+ </tr>
257
+
258
+ <tr>
259
+ <td align="left">HiPhO</td>
260
+ <td align="center">45.3</td>
261
+ <td align="center">46.4 🥇</td>
262
+ <td align="center">39.5</td>
263
+ <td align="center">42.4</td>
264
+ <td align="center">39.7</td>
265
+ <td align="center">46.2</td>
266
+ </tr>
267
+
268
+ <tr>
269
+ <td align="left">HLE w/ tools</td>
270
+ <td align="center">55.1 🟢</td>
271
+ <td align="center">47.6</td>
272
+ <td align="center">33.4</td>
273
+ <td align="center">56.0</td>
274
+ <td align="center">62.5</td>
275
+ <td align="center">64.5 🥇</td>
276
+ </tr>
277
+
278
+ <tr>
279
+ <td align="left">CMT</td>
280
+ <td align="center">80.0 🥇</td>
281
+ <td align="center">72.0</td>
282
+ <td align="center">26.0</td>
283
+ <td align="center">34.0</td>
284
+ <td align="center">40.0</td>
285
+ <td align="center">50.0</td>
286
+ </tr>
287
+
288
+ <tr>
289
+ <td align="left">CritPt</td>
290
+ <td align="center">20.0 🟢</td>
291
+ <td align="center">4.3</td>
292
+ <td align="center">2.9</td>
293
+ <td align="center">23.4</td>
294
+ <td align="center">19.1</td>
295
+ <td align="center">32.3 🥇</td>
296
+ </tr>
297
+
298
+
299
+ <tr>
300
+ <td colspan="8" align="left"><b>🤖 General Agentic Tasks</b></td>
301
+ </tr>
302
+
303
+ <tr>
304
+ <td align="left">Agents' Last Exam (ALE-CLI)</td>
305
+ <td align="center">19.1 🟢</td>
306
+ <td align="center">10.2</td>
307
+ <td align="center">14.3</td>
308
+ <td align="center">27.6</td>
309
+ <td align="center">28.5</td>
310
+ <td align="center">28.6 🥇</td>
311
+ </tr>
312
+
313
+ <tr>
314
+ <td align="left">VitaBench</td>
315
+ <td align="center">45.4 🟢</td>
316
+ <td align="center">38.7</td>
317
+ <td align="center">44.6</td>
318
+ <td align="center">59.0 🥇</td>
319
+ <td align="center">58.7</td>
320
+ <td align="center">46.8</td>
321
+ </tr>
322
+
323
+ <tr>
324
+ <td align="left">PinchBench</td>
325
+ <td align="center">90.0 🥇</td>
326
+ <td align="center">76.9</td>
327
+ <td align="center">88.6</td>
328
+ <td align="center">88.2</td>
329
+ <td align="center">86.6</td>
330
+ <td align="center">87.3</td>
331
+ </tr>
332
+
333
+ <tr>
334
+ <td colspan="8" align="left"><b>🔬 Scientific Agentic Tasks</b></td>
335
+ </tr>
336
+
337
+ <tr>
338
+ <td align="left">ChemCOTBench</td>
339
+ <td align="center">66.5 🟢</td>
340
+ <td align="center">64.0</td>
341
+ <td align="center">53.8</td>
342
+ <td align="center">82.5 🥇</td>
343
+ <td align="center">78.3</td>
344
+ <td align="center">77.9</td>
345
+ </tr>
346
+
347
+
348
+ <tr>
349
+ <td align="left">MatTools</td>
350
+ <td align="center">42.6</td>
351
+ <td align="center">47.1 🟢</td>
352
+ <td align="center">38.6</td>
353
+ <td align="center">24.3</td>
354
+ <td align="center">53.2 🥇</td>
355
+ <td align="center">45.6</td>
356
+ </tr>
357
+
358
+ <tr>
359
+ <td align="left">OmniDocBench</td>
360
+ <td align="center">91.5 🥇</td>
361
+ <td align="center">89.5</td>
362
+ <td align="center">89.6</td>
363
+ <td align="center">91.1</td>
364
+ <td align="center">-</td>
365
+ <td align="center">85.8</td>
366
+ </tr>
367
+
368
+ </tbody>
369
+ </table>
370
+
371
+ > [!Note]
372
+ > SWE-Bench Series: We use the mini-SWE-agent harness with a temperature of 1.0, top-p of 0.95, a 200K-token context window, and automatic context compaction enabled. All evaluations are conducted in a fully offline environment without internet access.
373
+ >
374
+ > GLM-5.3 on OmniDocBench: GLM-5.3 is a text-only (unimodal) model without multimodal input support, so its results on OmniDocBench, a multimodal benchmark, are not reported.
375
+
376
+
377
+ ## Usage
378
+
379
+ ### SGLang
380
+
381
+ [SGLang](https://github.com/sgl-project/sglang) is a fast serving framework for large language models and vision language models.
382
+
383
+ Install SGLang with uv:
384
+
385
+ ```shell
386
+ uv venv --python 3.12 --seed --managed-python
387
+ source .venv/bin/activate
388
+
389
+ uv pip install sglang
390
+ ```
391
+
392
+ See [its documentation](https://docs.sglang.ai/get_started/install.html) for more details.
393
+
394
+ The following commands create API endpoints at `http://localhost:8000/v1`:
395
+
396
+ - **Standard Version**:
397
+
398
+ ```shell
399
+ python -m sglang.launch_server \
400
+ --model-path InternScience/Sage-A1.5 \
401
+ --port 8000 \
402
+ --mem-fraction-static 0.8 \
403
+ --context-length 262144 \
404
+ --reasoning-parser qwen3 \
405
+ --tool-call-parser qwen3_coder
406
+ ```
407
+
408
+ - **Multi-Token Prediction (MTP)**:
409
+
410
+ ```shell
411
+ python -m sglang.launch_server \
412
+ --model-path InternScience/Sage-A1.5 \
413
+ --port 8000 \
414
+ --mem-fraction-static 0.8 \
415
+ --context-length 262144 \
416
+ --reasoning-parser qwen3 \
417
+ --tool-call-parser qwen3_coder \
418
+ --speculative-algorithm EAGLE \
419
+ --speculative-num-steps 3 \
420
+ --speculative-eagle-topk 1 \
421
+ --speculative-num-draft-tokens 4
422
+ ```
423
+
424
+ ### vLLM
425
+
426
+ [vLLM](https://github.com/vllm-project/vllm) is a high-throughput and memory-efficient inference and serving engine for LLMs.
427
+
428
+ Install vLLM from the main branch via uv:
429
+
430
+ ```shell
431
+ uv venv --python 3.12 --seed --managed-python
432
+ source .venv/bin/activate
433
+
434
+ uv pip install vllm --torch-backend=auto
435
+ ```
436
+
437
+ See [its documentation](https://docs.vllm.ai/en/stable/getting_started/installation/index.html) for more details.
438
+
439
+ The following commands create API endpoints at `http://localhost:8000/v1`:
440
+
441
+ - **Standard Version** (1 GPUs, 262K context):
442
+
443
+ ```shell
444
+ vllm serve InternScience/Sage-A1.5 \
445
+ --port 8000 \
446
+ --max-model-len 262144 \
447
+ --reasoning-parser qwen3 \
448
+ --enable-auto-tool-choice \
449
+ --tool-call-parser qwen3_coder
450
+
451
+ ```
452
+ - **Text-Only** (skips vision encoder to free KV cache memory):
453
+
454
+ ```shell
455
+ vllm serve InternScience/Sage-A1.5 \
456
+ --port 8000 \
457
+ --tensor-parallel-size 1 \
458
+ --max-model-len 262144 \
459
+ --reasoning-parser qwen3 \
460
+ --language-model-only
461
+ ```
462
+
463
+ - **Multi-Token Prediction (MTP)**:
464
+ ```shell
465
+ vllm serve InternScience/Sage-A1.5 \
466
+ --port 8000 \
467
+ --max-model-len 262144 \
468
+ --reasoning-parser qwen3 \
469
+ --enable-auto-tool-choice \
470
+ --tool-call-parser qwen3_coder \
471
+ --speculative-config '{"method":"mtp","num_speculative_tokens":3,"moe_backend":"triton"}'
472
+ ```
473
+
474
+ ### Advanced Modes
475
+
476
+ Sage-A1.5 ships two opt-in modes that build on the standard serving setup above. Both are off by
477
+ default: Agentic Orchestration Mode is turned on by registering a tool, Verification Mode by a chat-template flag.
478
+
479
+ #### Agentic Orchestration
480
+
481
+ Agentic Orchestration Mode (see [Highlights](#highlights)) lets the model fan out independent sub-questions to
482
+ sub-agents that run **in parallel**, each with its own context window and its own tool access. It is
483
+ enabled by exposing a `spawn_subagent` tool to the model: the model calls it whenever a task
484
+ decomposes into independent investigations, and your harness runs each sub-task and returns the
485
+ structured results.
486
+
487
+ Sub-agents are not restricted to any fixed tool set — they can be given whatever tools your
488
+ deployment registers (search, page reading, code execution, retrieval, internal APIs, …). By default
489
+ they inherit the main agent's tools; set `subagent_tools` if you want them to have a different, for
490
+ instance narrower, set.
491
+
492
+ Register the following tool schema alongside your other tools:
493
+
494
+ ```python
495
+ SPAWN_SUBAGENT_SCHEMA = {
496
+ "type": "function",
497
+ "function": {
498
+ "name": "spawn_subagent",
499
+ "description": (
500
+ "Dispatch one or more sub-agents IN PARALLEL to investigate independent "
501
+ "sub-questions. Each sub-agent has access to google_search and read_page "
502
+ "but CANNOT see your conversation. You MUST give each sub-agent everything "
503
+ "it needs via the `task`, `context`, and `expected_output` fields. Sub-agents "
504
+ "return structured JSON: {answer, status, evidence, unresolved_issues}."
505
+ ),
506
+ "parameters": {
507
+ "type": "object",
508
+ "properties": {
509
+ "tasks": {
510
+ "type": "array",
511
+ "minItems": 1,
512
+ "description": "List of independent sub-tasks to dispatch in parallel.",
513
+ "items": {
514
+ "type": "object",
515
+ "properties": {
516
+ "task": {
517
+ "type": "string",
518
+ "description": "Self-contained sub-question. The sub-agent has no other context.",
519
+ },
520
+ "context": {
521
+ "type": "string",
522
+ "description": "Background facts and constraints the sub-agent needs.",
523
+ },
524
+ "expected_output": {
525
+ "type": "string",
526
+ "description": "Form of the desired answer (e.g. 'a year YYYY', 'a person name').",
527
+ },
528
+ },
529
+ "required": ["task", "context", "expected_output"],
530
+ },
531
+ },
532
+ },
533
+ "required": ["tasks"],
534
+ },
535
+ },
536
+ }
537
+ ```
538
+
539
+ Because a sub-agent cannot see the main conversation, every task must be self-contained — `task`,
540
+ `context`, and `expected_output` are all required. Each sub-agent returns one compact JSON object
541
+ `{answer, status, evidence, unresolved_issues}`, and the batch is handed back to the main model in
542
+ input order.
543
+
544
+ **Notes:**
545
+
546
+ - Keep each sub-task **independent**. Tasks in one batch run concurrently and cannot see each
547
+ other's results, so anything sequential belongs in separate `spawn_subagent` calls.
548
+ - `expected_output` acts as a format constraint on the sub-agent's `answer` (e.g. `'a year YYYY'`,
549
+ `'a person name'`), which keeps results short and easy to merge.
550
+ - A sub-agent that cannot resolve its task returns `"UNKNOWN"` with a `status` of `unknown` or
551
+ `insufficient_evidence` rather than guessing — check `status` before using an answer.
552
+ - Batch size and per-sub-agent turn budget are harness-side settings
553
+ (`max_tasks_per_spawn`, default 5; `subagent_max_turns`, default 20). Oversized batches are
554
+ rejected with an error message instead of being truncated.
555
+ - The schema's `description` above names `google_search` and `read_page` because that is the
556
+ reference setup. If you give sub-agents a different tool set, update that sentence to match —
557
+ it is what tells the main model what its sub-agents can actually do.
558
+
559
+ #### Verification Mode
560
+
561
+ Verification Mode (see [Highlights](#highlights)) is **opt-in** and off by default. Enable it per request by
562
+ passing `verification` through `chat_template_kwargs`; the chat template then appends the verification
563
+ protocol trigger to the end of your system message.
564
+
565
+ - **OpenAI Python client** (via `extra_body`):
566
+
567
+ ```python
568
+ from openai import OpenAI
569
+
570
+ client = OpenAI(base_url="http://localhost:8000/v1", api_key="EMPTY")
571
+
572
+ response = client.chat.completions.create(
573
+ model="InternScience/Sage-A1.5",
574
+ messages=[
575
+ {"role": "system", "content": "You are a helpful assistant."},
576
+ {"role": "user", "content": "Find the population of Beijing and cross-check it."},
577
+ ],
578
+ tools=TOOLS,
579
+ extra_body={"chat_template_kwargs": {"verification": True}},
580
+ )
581
+
582
+ message = response.choices[0].message
583
+ print(message.reasoning_content) # self-review happens inside the chain of thought
584
+ print(message.content)
585
+ ```
586
+
587
+ - **curl**:
588
+
589
+ ```shell
590
+ curl http://localhost:8000/v1/chat/completions \
591
+ -H 'Content-Type: application/json' \
592
+ -d '{
593
+ "model": "InternScience/Sage-A1.5",
594
+ "messages": [
595
+ {"role": "system", "content": "You are a helpful assistant."},
596
+ {"role": "user", "content": "Find the population of Shanghai and cross-check it."}
597
+ ],
598
+ "chat_template_kwargs": {"verification": true}
599
+ }'
600
+ ```
601
+
602
+ **Notes:**
603
+
604
+ - A **non-empty system message is required**. Because the trigger is appended to the end of the system
605
+ content, a request with `verification: true` and no system message (or a whitespace-only one) is
606
+ rejected with HTTP 400.
607
+ - Pass a **JSON boolean**, not a string: `{"verification": true}`, not `{"verification": "true"}`.
608
+ - Omitting `chat_template_kwargs` is equivalent to `{"verification": false}`, which renders the prompt
609
+ unchanged.
610
+ - Verification Mode is independent of tool use — it works with or without `tools`.
611
+ - The self-review is emitted as reasoning content, so read `reasoning_content` in addition to `content`.
612
+
613
+ ### Recommended Sampling Parameters
614
+
615
+ For the best generation quality, we recommend the following sampling parameters:
616
+
617
+ - `temperature`: 1.0
618
+ - `top_p`: 0.95
619
+ - `top_k`: 20
620
+ - `min_p`: 0.0
621
+ - `presence_penalty`: 1.5
622
+ - `repetition_penalty`: 1.0
623
+
624
+
625
+ ## Agent Capability Evaluation
626
+
627
+ To provide the community with a unified agent evaluation codebase for fair comparison,
628
+ we have also open-sourced an evaluation framework for assessing agentic models across core capabilities, including tool use and multi-step reasoning.
629
+ The evaluation code is included in the [Sage-A1/evaluation](https://github.com/InternScience/Agents-A1/tree/main/evaluation) of this repository.
630
+
631
+ We use this framework to evaluate the released model under a standardized and reproducible setting.
632
+ Specifically, the model is tested on a set of agent-oriented tasks that require it to understand user goals, decompose complex instructions,
633
+ interact with tools or environments when necessary, and produce final results.
634
+ The evaluation results reported in [Model Card](https://huggingface.co/InternScience/Sage-A1.5) are generated using the open-source framework above,
635
+ so that users can reproduce the experiments, compare other models under the same protocol, and further extend the benchmark for new agent scenarios.
636
+ (**Note that:** To ensure a fair comparison, we report the benchmark results from their original technical reports.
637
+ If a model does not report the corresponding benchmark results, we evaluate it using the same evaluation protocol as our model.)
638
+
639
+ For detailed evaluation scripts, task definitions, metrics, and reproduction instructions, please refer to the evaluation codebase.
640
+
641
+ ## Citation
642
+
643
+ If you find our work helpful, feel free to give us a cite.
644
+
645
+ ```
646
+ @misc{lou2026sagea15longhorizonexecutionscientific,
647
+ title={Sage-A1.5: From Long-Horizon Execution to Scientific Exploration with Capability Composition},
648
+ author={Sage-A1.5 Team},
649
+ year={2026},
650
+ eprint={2610.28578},
651
+ archivePrefix={arXiv},
652
+ primaryClass={cs.AI},
653
+ url={https://arxiv.org/abs/2610.28578},
654
+ }
655
+ ```
chat_template.jinja ADDED
@@ -0,0 +1,168 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {%- set image_count = namespace(value=0) %}
2
+ {%- set video_count = namespace(value=0) %}
3
+ {%- macro render_content(content, do_vision_count, is_system_content=false) %}
4
+ {%- if content is string %}
5
+ {{- content }}
6
+ {%- elif content is iterable and content is not mapping %}
7
+ {%- for item in content %}
8
+ {%- if 'image' in item or 'image_url' in item or item.type == 'image' %}
9
+ {%- if is_system_content %}
10
+ {{- raise_exception('System message cannot contain images.') }}
11
+ {%- endif %}
12
+ {%- if do_vision_count %}
13
+ {%- set image_count.value = image_count.value + 1 %}
14
+ {%- endif %}
15
+ {%- if add_vision_id %}
16
+ {{- 'Picture ' ~ image_count.value ~ ': ' }}
17
+ {%- endif %}
18
+ {{- '<|vision_start|><|image_pad|><|vision_end|>' }}
19
+ {%- elif 'video' in item or item.type == 'video' %}
20
+ {%- if is_system_content %}
21
+ {{- raise_exception('System message cannot contain videos.') }}
22
+ {%- endif %}
23
+ {%- if do_vision_count %}
24
+ {%- set video_count.value = video_count.value + 1 %}
25
+ {%- endif %}
26
+ {%- if add_vision_id %}
27
+ {{- 'Video ' ~ video_count.value ~ ': ' }}
28
+ {%- endif %}
29
+ {{- '<|vision_start|><|video_pad|><|vision_end|>' }}
30
+ {%- elif 'text' in item %}
31
+ {{- item.text }}
32
+ {%- else %}
33
+ {{- raise_exception('Unexpected item type in content.') }}
34
+ {%- endif %}
35
+ {%- endfor %}
36
+ {%- elif content is none or content is undefined %}
37
+ {{- '' }}
38
+ {%- else %}
39
+ {{- raise_exception('Unexpected content type.') }}
40
+ {%- endif %}
41
+ {%- endmacro %}
42
+ {%- if not messages %}
43
+ {{- raise_exception('No messages provided.') }}
44
+ {%- endif %}
45
+ {#- Verification protocol switch, turned on with chat_template_kwargs={"verification": true}.
46
+ At training time this exact suffix is appended to the end of the system content
47
+ (script/build_verify_trigger.py); it must stay byte-for-byte identical here. #}
48
+ {%- set verify_tail = 'Verification protocol: enabled' %}
49
+ {%- set verify_trigger = '\n\n' + verify_tail %}
50
+ {%- set verify_on = verification is defined and verification %}
51
+ {%- if verify_on and verification is string and verification|lower not in ['true', '1', 'yes', 'on'] %}
52
+ {{- raise_exception('verification must be a boolean, not the string ' ~ verification|tojson ~ '. Send a JSON boolean: {"chat_template_kwargs": {"verification": true}}.') }}
53
+ {%- endif %}
54
+ {%- if verify_on and (messages[0].role != 'system' or not render_content(messages[0].content, false, true)|trim) %}
55
+ {{- raise_exception('verification=true requires a non-empty system message: the verification protocol trigger is appended to the end of the system content.') }}
56
+ {%- endif %}
57
+ {%- if tools and tools is iterable and tools is not mapping %}
58
+ {{- '<|im_start|>system\n' }}
59
+ {{- "# Tools\n\nYou have access to the following functions:\n\n<tools>" }}
60
+ {%- for tool in tools %}
61
+ {{- "\n" }}
62
+ {{- tool | tojson }}
63
+ {%- endfor %}
64
+ {{- "\n</tools>" }}
65
+ {{- '\n\nIf you choose to call a function ONLY reply in the following format with NO suffix:\n\n<tool_call>\n<function=example_function_name>\n<parameter=example_parameter_1>\nvalue_1\n</parameter>\n<parameter=example_parameter_2>\nThis is the value for the second parameter\nthat can span\nmultiple lines\n</parameter>\n</function>\n</tool_call>\n\n<IMPORTANT>\nReminder:\n- Function calls MUST follow the specified format: an inner <function=...></function> block must be nested within <tool_call></tool_call> XML tags\n- Required parameters MUST be specified\n- You may provide optional reasoning for your function call in natural language BEFORE the function call, but NOT after\n- If there is no function call available, answer the question like normal with your current knowledge and do not tell the user about function calls\n</IMPORTANT>' }}
66
+ {%- if messages[0].role == 'system' %}
67
+ {%- set content = render_content(messages[0].content, false, true)|trim %}
68
+ {%- set content = content + verify_trigger if (verify_on and not content.endswith(verify_tail)) else content %}
69
+ {%- if content %}
70
+ {{- '\n\n' + content }}
71
+ {%- endif %}
72
+ {%- endif %}
73
+ {{- '<|im_end|>\n' }}
74
+ {%- else %}
75
+ {%- if messages[0].role == 'system' %}
76
+ {%- set content = render_content(messages[0].content, false, true)|trim %}
77
+ {%- set content = content + verify_trigger if (verify_on and not content.endswith(verify_tail)) else content %}
78
+ {{- '<|im_start|>system\n' + content + '<|im_end|>\n' }}
79
+ {%- endif %}
80
+ {%- endif %}
81
+ {%- set ns = namespace(multi_step_tool=true, last_query_index=messages|length - 1) %}
82
+ {%- for message in messages[::-1] %}
83
+ {%- set index = (messages|length - 1) - loop.index0 %}
84
+ {%- if ns.multi_step_tool and message.role == "user" %}
85
+ {%- set content = render_content(message.content, false)|trim %}
86
+ {%- if not(content.startswith('<tool_response>') and content.endswith('</tool_response>')) %}
87
+ {%- set ns.multi_step_tool = false %}
88
+ {%- set ns.last_query_index = index %}
89
+ {%- endif %}
90
+ {%- endif %}
91
+ {%- endfor %}
92
+ {%- if ns.multi_step_tool %}
93
+ {{- raise_exception('No user query found in messages.') }}
94
+ {%- endif %}
95
+ {%- for message in messages %}
96
+ {%- set content = render_content(message.content, true)|trim %}
97
+ {%- if message.role == "system" %}
98
+ {%- if not loop.first %}
99
+ {{- raise_exception('System message must be at the beginning.') }}
100
+ {%- endif %}
101
+ {%- elif message.role == "user" %}
102
+ {{- '<|im_start|>' + message.role + '\n' + content + '<|im_end|>' + '\n' }}
103
+ {%- elif message.role == "assistant" %}
104
+ {%- set reasoning_content = '' %}
105
+ {%- if message.reasoning_content is string %}
106
+ {%- set reasoning_content = message.reasoning_content %}
107
+ {%- else %}
108
+ {%- if '</think>' in content %}
109
+ {%- set reasoning_content = content.split('</think>')[0].rstrip('\n').split('<think>')[-1].lstrip('\n') %}
110
+ {%- set content = content.split('</think>')[-1].lstrip('\n') %}
111
+ {%- endif %}
112
+ {%- endif %}
113
+ {%- set reasoning_content = reasoning_content|trim %}
114
+ {%- if (preserve_thinking is defined and preserve_thinking is true) or (loop.index0 > ns.last_query_index) %}
115
+ {{- '<|im_start|>' + message.role + '\n<think>\n' + reasoning_content + '\n</think>\n\n' + content }}
116
+ {%- else %}
117
+ {{- '<|im_start|>' + message.role + '\n' + content }}
118
+ {%- endif %}
119
+ {%- if message.tool_calls and message.tool_calls is iterable and message.tool_calls is not mapping %}
120
+ {%- for tool_call in message.tool_calls %}
121
+ {%- if tool_call.function is defined %}
122
+ {%- set tool_call = tool_call.function %}
123
+ {%- endif %}
124
+ {%- if loop.first %}
125
+ {%- if content|trim %}
126
+ {{- '\n\n<tool_call>\n<function=' + tool_call.name + '>\n' }}
127
+ {%- else %}
128
+ {{- '<tool_call>\n<function=' + tool_call.name + '>\n' }}
129
+ {%- endif %}
130
+ {%- else %}
131
+ {{- '\n<tool_call>\n<function=' + tool_call.name + '>\n' }}
132
+ {%- endif %}
133
+ {%- if tool_call.arguments is defined %}
134
+ {%- for args_name, args_value in tool_call.arguments|items %}
135
+ {{- '<parameter=' + args_name + '>\n' }}
136
+ {%- set args_value = args_value | string if args_value is string else args_value | tojson | safe %}
137
+ {{- args_value }}
138
+ {{- '\n</parameter>\n' }}
139
+ {%- endfor %}
140
+ {%- endif %}
141
+ {{- '</function>\n</tool_call>' }}
142
+ {%- endfor %}
143
+ {%- endif %}
144
+ {{- '<|im_end|>\n' }}
145
+ {%- elif message.role == "tool" %}
146
+ {%- if loop.previtem and loop.previtem.role != "tool" %}
147
+ {{- '<|im_start|>user' }}
148
+ {%- endif %}
149
+ {{- '\n<tool_response>\n' }}
150
+ {{- content }}
151
+ {{- '\n</tool_response>' }}
152
+ {%- if not loop.last and loop.nextitem.role != "tool" %}
153
+ {{- '<|im_end|>\n' }}
154
+ {%- elif loop.last %}
155
+ {{- '<|im_end|>\n' }}
156
+ {%- endif %}
157
+ {%- else %}
158
+ {{- raise_exception('Unexpected message role.') }}
159
+ {%- endif %}
160
+ {%- endfor %}
161
+ {%- if add_generation_prompt %}
162
+ {{- '<|im_start|>assistant\n' }}
163
+ {%- if enable_thinking is defined and enable_thinking is false %}
164
+ {{- '<think>\n\n</think>\n\n' }}
165
+ {%- else %}
166
+ {{- '<think>\n' }}
167
+ {%- endif %}
168
+ {%- endif %}
config.json ADDED
@@ -0,0 +1,119 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "Qwen3_5MoeForConditionalGeneration"
4
+ ],
5
+ "image_token_id": 248056,
6
+ "model_type": "qwen3_5_moe",
7
+ "text_config": {
8
+ "attention_bias": false,
9
+ "attention_dropout": 0.0,
10
+ "attn_output_gate": true,
11
+ "bos_token_id": 248044,
12
+ "dtype": "bfloat16",
13
+ "eos_token_id": 248044,
14
+ "full_attention_interval": 4,
15
+ "head_dim": 256,
16
+ "hidden_act": "silu",
17
+ "hidden_size": 2048,
18
+ "initializer_range": 0.02,
19
+ "layer_types": [
20
+ "linear_attention",
21
+ "linear_attention",
22
+ "linear_attention",
23
+ "full_attention",
24
+ "linear_attention",
25
+ "linear_attention",
26
+ "linear_attention",
27
+ "full_attention",
28
+ "linear_attention",
29
+ "linear_attention",
30
+ "linear_attention",
31
+ "full_attention",
32
+ "linear_attention",
33
+ "linear_attention",
34
+ "linear_attention",
35
+ "full_attention",
36
+ "linear_attention",
37
+ "linear_attention",
38
+ "linear_attention",
39
+ "full_attention",
40
+ "linear_attention",
41
+ "linear_attention",
42
+ "linear_attention",
43
+ "full_attention",
44
+ "linear_attention",
45
+ "linear_attention",
46
+ "linear_attention",
47
+ "full_attention",
48
+ "linear_attention",
49
+ "linear_attention",
50
+ "linear_attention",
51
+ "full_attention",
52
+ "linear_attention",
53
+ "linear_attention",
54
+ "linear_attention",
55
+ "full_attention",
56
+ "linear_attention",
57
+ "linear_attention",
58
+ "linear_attention",
59
+ "full_attention"
60
+ ],
61
+ "linear_conv_kernel_dim": 4,
62
+ "linear_key_head_dim": 128,
63
+ "linear_num_key_heads": 16,
64
+ "linear_num_value_heads": 32,
65
+ "linear_value_head_dim": 128,
66
+ "mamba_ssm_dtype": "float32",
67
+ "max_position_embeddings": 262144,
68
+ "model_type": "qwen3_5_moe_text",
69
+ "moe_intermediate_size": 512,
70
+ "mtp_num_hidden_layers": 1,
71
+ "mtp_use_dedicated_embeddings": false,
72
+ "num_attention_heads": 16,
73
+ "num_experts": 256,
74
+ "num_experts_per_tok": 8,
75
+ "num_hidden_layers": 40,
76
+ "num_key_value_heads": 2,
77
+ "output_router_logits": false,
78
+ "pad_token_id": null,
79
+ "partial_rotary_factor": 0.25,
80
+ "rms_norm_eps": 1e-06,
81
+ "rope_parameters": {
82
+ "mrope_interleaved": true,
83
+ "mrope_section": [
84
+ 11,
85
+ 11,
86
+ 10
87
+ ],
88
+ "partial_rotary_factor": 0.25,
89
+ "rope_theta": 10000000,
90
+ "rope_type": "default"
91
+ },
92
+ "router_aux_loss_coef": 0.001,
93
+ "shared_expert_intermediate_size": 512,
94
+ "tie_word_embeddings": false,
95
+ "use_cache": true,
96
+ "vocab_size": 248320
97
+ },
98
+ "tie_word_embeddings": false,
99
+ "transformers_version": "4.57.1",
100
+ "video_token_id": 248057,
101
+ "vision_config": {
102
+ "deepstack_visual_indexes": [],
103
+ "depth": 27,
104
+ "hidden_act": "gelu_pytorch_tanh",
105
+ "hidden_size": 1152,
106
+ "in_channels": 3,
107
+ "initializer_range": 0.02,
108
+ "intermediate_size": 4304,
109
+ "model_type": "qwen3_5_moe",
110
+ "num_heads": 16,
111
+ "num_position_embeddings": 2304,
112
+ "out_hidden_size": 2048,
113
+ "patch_size": 16,
114
+ "spatial_merge_size": 2,
115
+ "temporal_patch_size": 2
116
+ },
117
+ "vision_end_token_id": 248054,
118
+ "vision_start_token_id": 248053
119
+ }
figures/24px.svg ADDED
figures/Sage-A1p5-benchmark.png ADDED

Git LFS Details

  • SHA256: e75de0a519e29dc1dc309072f0cd222c5f0f505f13d49787a4dc4dbd7bc516bd
  • Pointer size: 131 Bytes
  • Size of remote file: 191 kB
figures/github-logo.svg ADDED
figures/hf-logo.svg ADDED
figures/modelscope-logo.svg ADDED
model-00000-of-00014.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7d3409417fa5f1e3edd85909392a2f0765a01f65827f1fface7453f1442bcec8
3
+ size 5368997288
model-00001-of-00014.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:671387ecd4e1a09f94055c2f9a06cd4d132a711b52c9fee314bd1baeb8d198f8
3
+ size 5369063800
model-00002-of-00014.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a2d35969e7a8b428bad518f77bee6ef2dccf2e81bfa42e6be77b5540ade3286d
3
+ size 5369063512
model-00003-of-00014.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c266d9026b8b722aab6d9a31d884605b0ead4447a88bd4a3c1ae29a6e3c66083
3
+ size 5369065752
model-00004-of-00014.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:93d865bb4125d9a7ed4b8cbcb3a736989f65d70ea107aa59775e074681bda507
3
+ size 5369066360
model-00005-of-00014.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d76e6af642b41f241c10e369995b8bc6ffacde97c69c1ac5f1047e5dbdec925d
3
+ size 5369066072
model-00006-of-00014.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b09f79a48f4fbadab908d3424e7263a2f115bdace0bdb151b341223e1c5e0afb
3
+ size 5369066240
model-00007-of-00014.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f2e8663737513dfbb6a92c3f616a5864db8e257d731aac4230360371597de991
3
+ size 5369066360
model-00008-of-00014.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5f737a41be7bdb4915eec15d02a5702166de4fb6a000c0b851520479a59d7722
3
+ size 5369066072
model-00009-of-00014.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:20b7acf194b67f8ec53dc64db9ad861f6788d6037f1ff52bb4ff1bc31e79b041
3
+ size 5369066240
model-00010-of-00014.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c2c8d703eea94c4fd06b49d044f23da05bdd4d1499fef481cad62dcb8d3cd781
3
+ size 5369066360
model-00011-of-00014.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5c5dac281c922d8eb0fd84b4079eae022db7008d3c063c4abc92d88f327d9ee5
3
+ size 5369066072
model-00012-of-00014.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c0a325bfd8b30aa7235103b1bf366e7c9088af9a7d884b624e6576a738fe4601
3
+ size 5364702376
model-00013-of-00014.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8d39a38b6b6968400db10786e06254b563c2034978de55fef0d6137a0a59c82a
3
+ size 425339080
model-mtp.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e6c8f36002c1db3906a771f613a7295486402f5c39e782df1607f01bce5f2e3f
3
+ size 1689376064
model.safetensors.index.json ADDED
The diff for this file is too large to render. See raw diff
 
preprocessor_config.json ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "size": {
3
+ "longest_edge": 16777216,
4
+ "shortest_edge": 65536
5
+ },
6
+ "patch_size": 16,
7
+ "temporal_patch_size": 2,
8
+ "merge_size": 2,
9
+ "image_mean": [
10
+ 0.5,
11
+ 0.5,
12
+ 0.5
13
+ ],
14
+ "image_std": [
15
+ 0.5,
16
+ 0.5,
17
+ 0.5
18
+ ],
19
+ "processor_class": "Qwen3VLProcessor",
20
+ "image_processor_type": "Qwen2VLImageProcessorFast"
21
+ }
processor_config.json ADDED
@@ -0,0 +1,63 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "image_processor": {
3
+ "data_format": "channels_first",
4
+ "do_convert_rgb": true,
5
+ "do_normalize": true,
6
+ "do_rescale": true,
7
+ "do_resize": true,
8
+ "image_mean": [
9
+ 0.5,
10
+ 0.5,
11
+ 0.5
12
+ ],
13
+ "image_processor_type": "Qwen2VLImageProcessorFast",
14
+ "image_std": [
15
+ 0.5,
16
+ 0.5,
17
+ 0.5
18
+ ],
19
+ "merge_size": 2,
20
+ "patch_size": 16,
21
+ "resample": 3,
22
+ "rescale_factor": 0.00392156862745098,
23
+ "size": {
24
+ "longest_edge": 16777216,
25
+ "shortest_edge": 65536
26
+ },
27
+ "temporal_patch_size": 2
28
+ },
29
+ "processor_class": "Qwen3VLProcessor",
30
+ "video_processor": {
31
+ "data_format": "channels_first",
32
+ "default_to_square": true,
33
+ "do_convert_rgb": true,
34
+ "do_normalize": true,
35
+ "do_rescale": true,
36
+ "do_resize": true,
37
+ "do_sample_frames": true,
38
+ "fps": 2,
39
+ "image_mean": [
40
+ 0.5,
41
+ 0.5,
42
+ 0.5
43
+ ],
44
+ "image_std": [
45
+ 0.5,
46
+ 0.5,
47
+ 0.5
48
+ ],
49
+ "max_frames": 768,
50
+ "merge_size": 2,
51
+ "min_frames": 4,
52
+ "patch_size": 16,
53
+ "resample": 3,
54
+ "rescale_factor": 0.00392156862745098,
55
+ "return_metadata": false,
56
+ "size": {
57
+ "longest_edge": 25165824,
58
+ "shortest_edge": 4096
59
+ },
60
+ "temporal_patch_size": 2,
61
+ "video_processor_type": "Qwen3VLVideoProcessor"
62
+ }
63
+ }
tokenizer.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:87a7830d63fcf43bf241c3c5242e96e62dd3fdc29224ca26fed8ea333db72de4
3
+ size 19989343
tokenizer_config.json ADDED
@@ -0,0 +1,305 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "add_prefix_space": false,
3
+ "added_tokens_decoder": {
4
+ "248044": {
5
+ "content": "<|endoftext|>",
6
+ "lstrip": false,
7
+ "normalized": false,
8
+ "rstrip": false,
9
+ "single_word": false,
10
+ "special": true
11
+ },
12
+ "248045": {
13
+ "content": "<|im_start|>",
14
+ "lstrip": false,
15
+ "normalized": false,
16
+ "rstrip": false,
17
+ "single_word": false,
18
+ "special": true
19
+ },
20
+ "248046": {
21
+ "content": "<|im_end|>",
22
+ "lstrip": false,
23
+ "normalized": false,
24
+ "rstrip": false,
25
+ "single_word": false,
26
+ "special": true
27
+ },
28
+ "248047": {
29
+ "content": "<|object_ref_start|>",
30
+ "lstrip": false,
31
+ "normalized": false,
32
+ "rstrip": false,
33
+ "single_word": false,
34
+ "special": true
35
+ },
36
+ "248048": {
37
+ "content": "<|object_ref_end|>",
38
+ "lstrip": false,
39
+ "normalized": false,
40
+ "rstrip": false,
41
+ "single_word": false,
42
+ "special": true
43
+ },
44
+ "248049": {
45
+ "content": "<|box_start|>",
46
+ "lstrip": false,
47
+ "normalized": false,
48
+ "rstrip": false,
49
+ "single_word": false,
50
+ "special": true
51
+ },
52
+ "248050": {
53
+ "content": "<|box_end|>",
54
+ "lstrip": false,
55
+ "normalized": false,
56
+ "rstrip": false,
57
+ "single_word": false,
58
+ "special": true
59
+ },
60
+ "248051": {
61
+ "content": "<|quad_start|>",
62
+ "lstrip": false,
63
+ "normalized": false,
64
+ "rstrip": false,
65
+ "single_word": false,
66
+ "special": true
67
+ },
68
+ "248052": {
69
+ "content": "<|quad_end|>",
70
+ "lstrip": false,
71
+ "normalized": false,
72
+ "rstrip": false,
73
+ "single_word": false,
74
+ "special": true
75
+ },
76
+ "248053": {
77
+ "content": "<|vision_start|>",
78
+ "lstrip": false,
79
+ "normalized": false,
80
+ "rstrip": false,
81
+ "single_word": false,
82
+ "special": true
83
+ },
84
+ "248054": {
85
+ "content": "<|vision_end|>",
86
+ "lstrip": false,
87
+ "normalized": false,
88
+ "rstrip": false,
89
+ "single_word": false,
90
+ "special": true
91
+ },
92
+ "248055": {
93
+ "content": "<|vision_pad|>",
94
+ "lstrip": false,
95
+ "normalized": false,
96
+ "rstrip": false,
97
+ "single_word": false,
98
+ "special": true
99
+ },
100
+ "248056": {
101
+ "content": "<|image_pad|>",
102
+ "lstrip": false,
103
+ "normalized": false,
104
+ "rstrip": false,
105
+ "single_word": false,
106
+ "special": true
107
+ },
108
+ "248057": {
109
+ "content": "<|video_pad|>",
110
+ "lstrip": false,
111
+ "normalized": false,
112
+ "rstrip": false,
113
+ "single_word": false,
114
+ "special": true
115
+ },
116
+ "248058": {
117
+ "content": "<tool_call>",
118
+ "lstrip": false,
119
+ "normalized": false,
120
+ "rstrip": false,
121
+ "single_word": false,
122
+ "special": false
123
+ },
124
+ "248059": {
125
+ "content": "</tool_call>",
126
+ "lstrip": false,
127
+ "normalized": false,
128
+ "rstrip": false,
129
+ "single_word": false,
130
+ "special": false
131
+ },
132
+ "248060": {
133
+ "content": "<|fim_prefix|>",
134
+ "lstrip": false,
135
+ "normalized": false,
136
+ "rstrip": false,
137
+ "single_word": false,
138
+ "special": false
139
+ },
140
+ "248061": {
141
+ "content": "<|fim_middle|>",
142
+ "lstrip": false,
143
+ "normalized": false,
144
+ "rstrip": false,
145
+ "single_word": false,
146
+ "special": false
147
+ },
148
+ "248062": {
149
+ "content": "<|fim_suffix|>",
150
+ "lstrip": false,
151
+ "normalized": false,
152
+ "rstrip": false,
153
+ "single_word": false,
154
+ "special": false
155
+ },
156
+ "248063": {
157
+ "content": "<|fim_pad|>",
158
+ "lstrip": false,
159
+ "normalized": false,
160
+ "rstrip": false,
161
+ "single_word": false,
162
+ "special": false
163
+ },
164
+ "248064": {
165
+ "content": "<|repo_name|>",
166
+ "lstrip": false,
167
+ "normalized": false,
168
+ "rstrip": false,
169
+ "single_word": false,
170
+ "special": false
171
+ },
172
+ "248065": {
173
+ "content": "<|file_sep|>",
174
+ "lstrip": false,
175
+ "normalized": false,
176
+ "rstrip": false,
177
+ "single_word": false,
178
+ "special": false
179
+ },
180
+ "248066": {
181
+ "content": "<tool_response>",
182
+ "lstrip": false,
183
+ "normalized": false,
184
+ "rstrip": false,
185
+ "single_word": false,
186
+ "special": false
187
+ },
188
+ "248067": {
189
+ "content": "</tool_response>",
190
+ "lstrip": false,
191
+ "normalized": false,
192
+ "rstrip": false,
193
+ "single_word": false,
194
+ "special": false
195
+ },
196
+ "248068": {
197
+ "content": "<think>",
198
+ "lstrip": false,
199
+ "normalized": false,
200
+ "rstrip": false,
201
+ "single_word": false,
202
+ "special": false
203
+ },
204
+ "248069": {
205
+ "content": "</think>",
206
+ "lstrip": false,
207
+ "normalized": false,
208
+ "rstrip": false,
209
+ "single_word": false,
210
+ "special": false
211
+ },
212
+ "248070": {
213
+ "content": "<|audio_start|>",
214
+ "lstrip": false,
215
+ "normalized": false,
216
+ "rstrip": false,
217
+ "single_word": false,
218
+ "special": true
219
+ },
220
+ "248071": {
221
+ "content": "<|audio_end|>",
222
+ "lstrip": false,
223
+ "normalized": false,
224
+ "rstrip": false,
225
+ "single_word": false,
226
+ "special": true
227
+ },
228
+ "248072": {
229
+ "content": "<tts_pad>",
230
+ "lstrip": false,
231
+ "normalized": false,
232
+ "rstrip": false,
233
+ "single_word": false,
234
+ "special": true
235
+ },
236
+ "248073": {
237
+ "content": "<tts_text_bos>",
238
+ "lstrip": false,
239
+ "normalized": false,
240
+ "rstrip": false,
241
+ "single_word": false,
242
+ "special": true
243
+ },
244
+ "248074": {
245
+ "content": "<tts_text_eod>",
246
+ "lstrip": false,
247
+ "normalized": false,
248
+ "rstrip": false,
249
+ "single_word": false,
250
+ "special": true
251
+ },
252
+ "248075": {
253
+ "content": "<tts_text_bos_single>",
254
+ "lstrip": false,
255
+ "normalized": false,
256
+ "rstrip": false,
257
+ "single_word": false,
258
+ "special": true
259
+ },
260
+ "248076": {
261
+ "content": "<|audio_pad|>",
262
+ "lstrip": false,
263
+ "normalized": false,
264
+ "rstrip": false,
265
+ "single_word": false,
266
+ "special": true
267
+ }
268
+ },
269
+ "additional_special_tokens": [
270
+ "<|im_start|>",
271
+ "<|im_end|>",
272
+ "<|object_ref_start|>",
273
+ "<|object_ref_end|>",
274
+ "<|box_start|>",
275
+ "<|box_end|>",
276
+ "<|quad_start|>",
277
+ "<|quad_end|>",
278
+ "<|vision_start|>",
279
+ "<|vision_end|>",
280
+ "<|vision_pad|>",
281
+ "<|image_pad|>",
282
+ "<|video_pad|>"
283
+ ],
284
+ "bos_token": null,
285
+ "chat_template": "{%- set image_count = namespace(value=0) %}\n{%- set video_count = namespace(value=0) %}\n{%- macro render_content(content, do_vision_count, is_system_content=false) %}\n {%- if content is string %}\n {{- content }}\n {%- elif content is iterable and content is not mapping %}\n {%- for item in content %}\n {%- if 'image' in item or 'image_url' in item or item.type == 'image' %}\n {%- if is_system_content %}\n {{- raise_exception('System message cannot contain images.') }}\n {%- endif %}\n {%- if do_vision_count %}\n {%- set image_count.value = image_count.value + 1 %}\n {%- endif %}\n {%- if add_vision_id %}\n {{- 'Picture ' ~ image_count.value ~ ': ' }}\n {%- endif %}\n {{- '<|vision_start|><|image_pad|><|vision_end|>' }}\n {%- elif 'video' in item or item.type == 'video' %}\n {%- if is_system_content %}\n {{- raise_exception('System message cannot contain videos.') }}\n {%- endif %}\n {%- if do_vision_count %}\n {%- set video_count.value = video_count.value + 1 %}\n {%- endif %}\n {%- if add_vision_id %}\n {{- 'Video ' ~ video_count.value ~ ': ' }}\n {%- endif %}\n {{- '<|vision_start|><|video_pad|><|vision_end|>' }}\n {%- elif 'text' in item %}\n {{- item.text }}\n {%- else %}\n {{- raise_exception('Unexpected item type in content.') }}\n {%- endif %}\n {%- endfor %}\n {%- elif content is none or content is undefined %}\n {{- '' }}\n {%- else %}\n {{- raise_exception('Unexpected content type.') }}\n {%- endif %}\n{%- endmacro %}\n{%- if not messages %}\n {{- raise_exception('No messages provided.') }}\n{%- endif %}\n{#- Verification protocol switch, turned on with chat_template_kwargs={\"verification\": true}.\n At training time this exact suffix is appended to the end of the system content\n (script/build_verify_trigger.py); it must stay byte-for-byte identical here. #}\n{%- set verify_tail = 'Verification protocol: enabled' %}\n{%- set verify_trigger = '\\n\\n' + verify_tail %}\n{%- set verify_on = verification is defined and verification %}\n{%- if verify_on and verification is string and verification|lower not in ['true', '1', 'yes', 'on'] %}\n {{- raise_exception('verification must be a boolean, not the string ' ~ verification|tojson ~ '. Send a JSON boolean: {\"chat_template_kwargs\": {\"verification\": true}}.') }}\n{%- endif %}\n{%- if verify_on and (messages[0].role != 'system' or not render_content(messages[0].content, false, true)|trim) %}\n {{- raise_exception('verification=true requires a non-empty system message: the verification protocol trigger is appended to the end of the system content.') }}\n{%- endif %}\n{%- if tools and tools is iterable and tools is not mapping %}\n {{- '<|im_start|>system\\n' }}\n {{- \"# Tools\\n\\nYou have access to the following functions:\\n\\n<tools>\" }}\n {%- for tool in tools %}\n {{- \"\\n\" }}\n {{- tool | tojson }}\n {%- endfor %}\n {{- \"\\n</tools>\" }}\n {{- '\\n\\nIf you choose to call a function ONLY reply in the following format with NO suffix:\\n\\n<tool_call>\\n<function=example_function_name>\\n<parameter=example_parameter_1>\\nvalue_1\\n</parameter>\\n<parameter=example_parameter_2>\\nThis is the value for the second parameter\\nthat can span\\nmultiple lines\\n</parameter>\\n</function>\\n</tool_call>\\n\\n<IMPORTANT>\\nReminder:\\n- Function calls MUST follow the specified format: an inner <function=...></function> block must be nested within <tool_call></tool_call> XML tags\\n- Required parameters MUST be specified\\n- You may provide optional reasoning for your function call in natural language BEFORE the function call, but NOT after\\n- If there is no function call available, answer the question like normal with your current knowledge and do not tell the user about function calls\\n</IMPORTANT>' }}\n {%- if messages[0].role == 'system' %}\n {%- set content = render_content(messages[0].content, false, true)|trim %}\n {%- set content = content + verify_trigger if (verify_on and not content.endswith(verify_tail)) else content %}\n {%- if content %}\n {{- '\\n\\n' + content }}\n {%- endif %}\n {%- endif %}\n {{- '<|im_end|>\\n' }}\n{%- else %}\n {%- if messages[0].role == 'system' %}\n {%- set content = render_content(messages[0].content, false, true)|trim %}\n {%- set content = content + verify_trigger if (verify_on and not content.endswith(verify_tail)) else content %}\n {{- '<|im_start|>system\\n' + content + '<|im_end|>\\n' }}\n {%- endif %}\n{%- endif %}\n{%- set ns = namespace(multi_step_tool=true, last_query_index=messages|length - 1) %}\n{%- for message in messages[::-1] %}\n {%- set index = (messages|length - 1) - loop.index0 %}\n {%- if ns.multi_step_tool and message.role == \"user\" %}\n {%- set content = render_content(message.content, false)|trim %}\n {%- if not(content.startswith('<tool_response>') and content.endswith('</tool_response>')) %}\n {%- set ns.multi_step_tool = false %}\n {%- set ns.last_query_index = index %}\n {%- endif %}\n {%- endif %}\n{%- endfor %}\n{%- if ns.multi_step_tool %}\n {{- raise_exception('No user query found in messages.') }}\n{%- endif %}\n{%- for message in messages %}\n {%- set content = render_content(message.content, true)|trim %}\n {%- if message.role == \"system\" %}\n {%- if not loop.first %}\n {{- raise_exception('System message must be at the beginning.') }}\n {%- endif %}\n {%- elif message.role == \"user\" %}\n {{- '<|im_start|>' + message.role + '\\n' + content + '<|im_end|>' + '\\n' }}\n {%- elif message.role == \"assistant\" %}\n {%- set reasoning_content = '' %}\n {%- if message.reasoning_content is string %}\n {%- set reasoning_content = message.reasoning_content %}\n {%- else %}\n {%- if '</think>' in content %}\n {%- set reasoning_content = content.split('</think>')[0].rstrip('\\n').split('<think>')[-1].lstrip('\\n') %}\n {%- set content = content.split('</think>')[-1].lstrip('\\n') %}\n {%- endif %}\n {%- endif %}\n {%- set reasoning_content = reasoning_content|trim %}\n {%- if (preserve_thinking is defined and preserve_thinking is true) or (loop.index0 > ns.last_query_index) %}\n {{- '<|im_start|>' + message.role + '\\n<think>\\n' + reasoning_content + '\\n</think>\\n\\n' + content }}\n {%- else %}\n {{- '<|im_start|>' + message.role + '\\n' + content }}\n {%- endif %}\n {%- if message.tool_calls and message.tool_calls is iterable and message.tool_calls is not mapping %}\n {%- for tool_call in message.tool_calls %}\n {%- if tool_call.function is defined %}\n {%- set tool_call = tool_call.function %}\n {%- endif %}\n {%- if loop.first %}\n {%- if content|trim %}\n {{- '\\n\\n<tool_call>\\n<function=' + tool_call.name + '>\\n' }}\n {%- else %}\n {{- '<tool_call>\\n<function=' + tool_call.name + '>\\n' }}\n {%- endif %}\n {%- else %}\n {{- '\\n<tool_call>\\n<function=' + tool_call.name + '>\\n' }}\n {%- endif %}\n {%- if tool_call.arguments is defined %}\n {%- for args_name, args_value in tool_call.arguments|items %}\n {{- '<parameter=' + args_name + '>\\n' }}\n {%- set args_value = args_value | string if args_value is string else args_value | tojson | safe %}\n {{- args_value }}\n {{- '\\n</parameter>\\n' }}\n {%- endfor %}\n {%- endif %}\n {{- '</function>\\n</tool_call>' }}\n {%- endfor %}\n {%- endif %}\n {{- '<|im_end|>\\n' }}\n {%- elif message.role == \"tool\" %}\n {%- if loop.previtem and loop.previtem.role != \"tool\" %}\n {{- '<|im_start|>user' }}\n {%- endif %}\n {{- '\\n<tool_response>\\n' }}\n {{- content }}\n {{- '\\n</tool_response>' }}\n {%- if not loop.last and loop.nextitem.role != \"tool\" %}\n {{- '<|im_end|>\\n' }}\n {%- elif loop.last %}\n {{- '<|im_end|>\\n' }}\n {%- endif %}\n {%- else %}\n {{- raise_exception('Unexpected message role.') }}\n {%- endif %}\n{%- endfor %}\n{%- if add_generation_prompt %}\n {{- '<|im_start|>assistant\\n' }}\n {%- if enable_thinking is defined and enable_thinking is false %}\n {{- '<think>\\n\\n</think>\\n\\n' }}\n {%- else %}\n {{- '<think>\\n' }}\n {%- endif %}\n{%- endif %}",
286
+ "clean_up_tokenization_spaces": false,
287
+ "eos_token": "<|im_end|>",
288
+ "errors": "replace",
289
+ "model_max_length": 262144,
290
+ "pad_token": "<|endoftext|>",
291
+ "split_special_tokens": false,
292
+ "tokenizer_class": "Qwen2Tokenizer",
293
+ "unk_token": null,
294
+ "add_bos_token": false,
295
+ "pretokenize_regex": "(?i:'s|'t|'re|'ve|'m|'ll|'d)|[^\\r\\n\\p{L}\\p{N}]?[\\p{L}\\p{M}]+|\\p{N}| ?[^\\s\\p{L}\\p{M}\\p{N}]+[\\r\\n]*|\\s*[\\r\\n]+|\\s+(?!\\S)|\\s+",
296
+ "extra_special_tokens": {
297
+ "audio_bos_token": "<|audio_start|>",
298
+ "audio_eos_token": "<|audio_end|>",
299
+ "audio_token": "<|audio_pad|>",
300
+ "image_token": "<|image_pad|>",
301
+ "video_token": "<|video_pad|>",
302
+ "vision_bos_token": "<|vision_start|>",
303
+ "vision_eos_token": "<|vision_end|>"
304
+ }
305
+ }
video_preprocessor_config.json ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "size": {
3
+ "longest_edge": 25165824,
4
+ "shortest_edge": 4096
5
+ },
6
+ "patch_size": 16,
7
+ "temporal_patch_size": 2,
8
+ "merge_size": 2,
9
+ "image_mean": [
10
+ 0.5,
11
+ 0.5,
12
+ 0.5
13
+ ],
14
+ "image_std": [
15
+ 0.5,
16
+ 0.5,
17
+ 0.5
18
+ ],
19
+ "processor_class": "Qwen3VLProcessor",
20
+ "video_processor_type": "Qwen3VLVideoProcessor"
21
+ }