suryatmodulus Ricardo-H commited on
Commit
3016b52
·
0 Parent(s):

Duplicate from Kwaipilot/KAT-Coder-V2.5-Dev

Browse files

Co-authored-by: YOULING HUANG <Ricardo-H@users.noreply.huggingface.co>

.gitattributes ADDED
@@ -0,0 +1,41 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ KAT-Coder-V2.5-Dev-Benchmarks.png filter=lfs diff=lfs merge=lfs -text
37
+ KAT-Coder-V2.5-Dev-RL-Reward-Curve.png filter=lfs diff=lfs merge=lfs -text
38
+ kat_coder_benchmarks_card_style.png filter=lfs diff=lfs merge=lfs -text
39
+ kat_coder_rl_reward_curve.png filter=lfs diff=lfs merge=lfs -text
40
+ kat_logo_hd.png filter=lfs diff=lfs merge=lfs -text
41
+ tokenizer.json filter=lfs diff=lfs merge=lfs -text
KAT-Coder-V2.5-Dev-Benchmarks.png ADDED

Git LFS Details

  • SHA256: c9126b08c47c030accec54451941e3f5d83f739844b7c38a6bc7dc4be933f795
  • Pointer size: 132 Bytes
  • Size of remote file: 2.17 MB
KAT-Coder-V2.5-Dev-RL-Reward-Curve.png ADDED

Git LFS Details

  • SHA256: 4f2e1458cd4fc7c979362d30a4ee2fc9c79ec6e4fd537ee80e8ccb1b77a3e040
  • Pointer size: 131 Bytes
  • Size of remote file: 531 kB
README.md ADDED
@@ -0,0 +1,431 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ language:
4
+ - en
5
+ - zh
6
+ library_name: transformers
7
+ pipeline_tag: text-generation
8
+ tags:
9
+ - code
10
+ - agent
11
+ - agentic-coding
12
+ - moe
13
+ - coding
14
+ base_model:
15
+ - Qwen3.6-35B-A3B
16
+ ---
17
+
18
+ <div style="display:flex;align-items:center;gap:20px;">
19
+ <img src="kat_logo_hd.png" alt="KAT-Coder logo" width="120">
20
+ <h1 style="margin:0;border:none;padding:0;font-size:52px;color:#1a4a25;">KAT-Coder-V2.5-Dev</h1>
21
+ </div>
22
+
23
+ <a href="https://huggingface.co/papers/2607.05471"><img src="https://img.shields.io/badge/Technical%20Report-1a4a25?style=for-the-badge&logo=arxiv&logoColor=white" alt="KAT-Coder Technical Report"></a>
24
+
25
+ <table style="border-collapse:collapse;width:100%;margin:0 auto;">
26
+ <tr>
27
+ <td style="background-color:#e6f0e4;padding:14px 20px;border-left:4px solid #1a4a25;">
28
+ <span style="color:#1a4a25;">This repository contains the model weights and configuration files for the post-trained <strong>KAT-Coder-V2.5-Dev</strong> in the Hugging Face Transformers format. The artifacts are compatible with Hugging Face Transformers, vLLM, SGLang, KTransformers, etc. <strong>Note:</strong> this open-weight release ships only the language-model weights and operates as a <strong>text-only</strong> model; the vision/multimodal components are not included and are unavailable.</span>
29
+ </td>
30
+ </tr>
31
+ </table>
32
+
33
+ Following the release of KAT-Coder-V2.5 in July, we are pleased to release the open-weight version **KAT-Coder-V2.5-Dev**, an MOE model with a total parameter count of 35B and 3B activated parameters, to strengthen communication with the community and showcase our research achievements.
34
+
35
+ ## KAT-Coder-V2.5-Dev Highlights
36
+
37
+ - **Performance improvement.** Through SFT/RL training, KAT-Coder-V2.5-Dev achieves SOTA results in the field of Agentic Coding among models with similar parameter scales.
38
+ - **Optimization of abnormal behaviors.** Through RL training, certain abnormal behaviors have been significantly optimized, such as: abnormal tool labels -9pp (9.34% -> 0.28%), single-turn continuous repetition -0.34pp (0.34% -> 0%).
39
+
40
+ ## Benchmark performance
41
+
42
+ <p align="center">
43
+ <a href="https://huggingface.co/Kwaipilot/KAT-Coder-V2.5-Dev/resolve/main/KAT-Coder-V2.5-Dev-Benchmarks.png?download=true">
44
+ <img src="KAT-Coder-V2.5-Dev-Benchmarks.png" alt="KAT-Coder-V2.5-Dev benchmark performance" width="100%">
45
+ </a>
46
+ </p>
47
+
48
+ <table style="border-collapse:collapse;width:100%;margin:0 auto;font-size:12.5px;line-height:1.4;white-space:nowrap;">
49
+ <tr>
50
+ <td style="padding:11px 8px;text-align:center;border-bottom:2px solid #1a4a25;"><span style="color:#1a4a25;font-weight:700;">Benchmark</span></td>
51
+ <td style="padding:11px 8px;text-align:center;background-color:#e2eede;border-bottom:2px solid #1a4a25;"><span style="color:#1a4a25;font-weight:700;">KAT-Coder-V2.5-Dev</span></td>
52
+ <td style="padding:11px 8px;text-align:center;border-bottom:2px solid #1a4a25;"><span style="color:#1a4a25;font-weight:600;">Qwen3.5-27B</span></td>
53
+ <td style="padding:11px 8px;text-align:center;border-bottom:2px solid #1a4a25;"><span style="color:#1a4a25;font-weight:600;">Qwen3.6-35BA3B</span></td>
54
+ <td style="padding:11px 8px;text-align:center;border-bottom:2px solid #1a4a25;"><span style="color:#1a4a25;font-weight:600;">Gemma4-31B</span></td>
55
+ <td style="padding:11px 8px;text-align:center;border-bottom:2px solid #1a4a25;"><span style="color:#1a4a25;font-weight:600;">Qwen3.5-35BA3B</span></td>
56
+ <td style="padding:11px 8px;text-align:center;border-bottom:2px solid #1a4a25;"><span style="color:#1a4a25;font-weight:600;">Ornith-1.0-35B</span></td>
57
+ <td style="padding:11px 8px;text-align:center;border-bottom:2px solid #1a4a25;"><span style="color:#1a4a25;font-weight:600;">Gemma4-26BA4B</span></td>
58
+ <td style="padding:11px 8px;text-align:center;border-bottom:2px solid #1a4a25;"><span style="color:#1a4a25;font-weight:600;">Qwen3-Coder-30B</span></td>
59
+ </tr>
60
+ <tr>
61
+ <td colspan="9" style="padding:8px 12px;background-color:#eef4ea;color:#1a4a25;font-weight:700;letter-spacing:0.03em;">Coding Agent</td>
62
+ </tr>
63
+ <tr>
64
+ <td style="padding:9px 8px;text-align:left;font-weight:600;color:#333333;border-bottom:1px solid #ececec;">SWE-bench Verified</td>
65
+ <td style="padding:9px 8px;text-align:center;background-color:#e2eede;border-bottom:1px solid #d7e4d2;"><strong style="color:#1a4a25;">69.40</strong></td>
66
+ <td style="padding:9px 8px;text-align:center;color:#444444;border-bottom:1px solid #ececec;">68.60</td>
67
+ <td style="padding:9px 8px;text-align:center;color:#444444;border-bottom:1px solid #ececec;">64.40</td>
68
+ <td style="padding:9px 8px;text-align:center;color:#444444;border-bottom:1px solid #ececec;">60.60</td>
69
+ <td style="padding:9px 8px;text-align:center;color:#444444;border-bottom:1px solid #ececec;">58.60</td>
70
+ <td style="padding:9px 8px;text-align:center;color:#444444;border-bottom:1px solid #ececec;">55.80</td>
71
+ <td style="padding:9px 8px;text-align:center;color:#444444;border-bottom:1px solid #ececec;">35.80</td>
72
+ <td style="padding:9px 8px;text-align:center;color:#444444;border-bottom:1px solid #ececec;">31.80</td>
73
+ </tr>
74
+ <tr>
75
+ <td style="padding:9px 8px;text-align:left;font-weight:600;color:#333333;border-bottom:1px solid #ececec;">SWE-bench Multilingual</td>
76
+ <td style="padding:9px 8px;text-align:center;background-color:#e2eede;border-bottom:1px solid #d7e4d2;"><strong style="color:#1a4a25;">63.00</strong></td>
77
+ <td style="padding:9px 8px;text-align:center;color:#444444;border-bottom:1px solid #ececec;">57.67</td>
78
+ <td style="padding:9px 8px;text-align:center;color:#444444;border-bottom:1px solid #ececec;">57.00</td>
79
+ <td style="padding:9px 8px;text-align:center;color:#444444;border-bottom:1px solid #ececec;">49.33</td>
80
+ <td style="padding:9px 8px;text-align:center;color:#444444;border-bottom:1px solid #ececec;">47.67</td>
81
+ <td style="padding:9px 8px;text-align:center;color:#444444;border-bottom:1px solid #ececec;">51.67</td>
82
+ <td style="padding:9px 8px;text-align:center;color:#444444;border-bottom:1px solid #ececec;">27.33</td>
83
+ <td style="padding:9px 8px;text-align:center;color:#444444;border-bottom:1px solid #ececec;">20.67</td>
84
+ </tr>
85
+ <tr>
86
+ <td style="padding:9px 8px;text-align:left;font-weight:600;color:#333333;border-bottom:1px solid #ececec;">SWE-bench Pro</td>
87
+ <td style="padding:9px 8px;text-align:center;background-color:#e2eede;border-bottom:1px solid #d7e4d2;"><strong style="color:#1a4a25;">45.96</strong></td>
88
+ <td style="padding:9px 8px;text-align:center;color:#444444;border-bottom:1px solid #ececec;">42.13</td>
89
+ <td style="padding:9px 8px;text-align:center;color:#444444;border-bottom:1px solid #ececec;">40.63</td>
90
+ <td style="padding:9px 8px;text-align:center;color:#444444;border-bottom:1px solid #ececec;">32.97</td>
91
+ <td style="padding:9px 8px;text-align:center;color:#444444;border-bottom:1px solid #ececec;">38.03</td>
92
+ <td style="padding:9px 8px;text-align:center;color:#444444;border-bottom:1px solid #ececec;">34.47</td>
93
+ <td style="padding:9px 8px;text-align:center;color:#444444;border-bottom:1px solid #ececec;">9.58</td>
94
+ <td style="padding:9px 8px;text-align:center;color:#444444;border-bottom:1px solid #ececec;">19.84</td>
95
+ </tr>
96
+ <tr>
97
+ <td style="padding:9px 8px;text-align:left;font-weight:600;color:#333333;border-bottom:1px solid #ececec;vertical-align:middle;">Terminal-Bench 2.1</td>
98
+ <td style="padding:9px 8px;text-align:center;background-color:#e2eede;border-bottom:1px solid #d7e4d2;"><strong style="color:#1a4a25;">41.02</strong><br><span style="font-size:11px;color:#7c8a78;">32.60 / 49.44</span></td>
99
+ <td style="padding:9px 8px;text-align:center;color:#444444;border-bottom:1px solid #ececec;">34.84<br><span style="font-size:11px;color:#9aa596;">41.57 / 28.10</span></td>
100
+ <td style="padding:9px 8px;text-align:center;color:#444444;border-bottom:1px solid #ececec;">32.02<br><span style="font-size:11px;color:#9aa596;">34.83 / 29.20</span></td>
101
+ <td style="padding:9px 8px;text-align:center;color:#444444;border-bottom:1px solid #ececec;">32.59<br><span style="font-size:11px;color:#9aa596;">30.34 / 34.83</span></td>
102
+ <td style="padding:9px 8px;text-align:center;color:#444444;border-bottom:1px solid #ececec;">26.12<br><span style="font-size:11px;color:#9aa596;">26.44 / 25.80</span></td>
103
+ <td style="padding:9px 8px;text-align:center;color:#444444;border-bottom:1px solid #ececec;">35.98<br><span style="font-size:11px;color:#9aa596;">35.96 / 36.00</span></td>
104
+ <td style="padding:9px 8px;text-align:center;color:#444444;border-bottom:1px solid #ececec;">20.94<br><span style="font-size:11px;color:#9aa596;">27.27 / 14.60</span></td>
105
+ <td style="padding:9px 8px;text-align:center;color:#444444;border-bottom:1px solid #ececec;">13.50<br><span style="font-size:11px;color:#9aa596;">10.11 / 16.90</span></td>
106
+ </tr>
107
+ <tr>
108
+ <td style="padding:9px 8px;text-align:left;font-weight:600;color:#333333;border-bottom:1px solid #ececec;">PinchBench</td>
109
+ <td style="padding:9px 8px;text-align:center;background-color:#e2eede;border-bottom:1px solid #d7e4d2;"><strong style="color:#1a4a25;">93.43</strong></td>
110
+ <td style="padding:9px 8px;text-align:center;color:#444444;border-bottom:1px solid #ececec;">90.71</td>
111
+ <td style="padding:9px 8px;text-align:center;color:#444444;border-bottom:1px solid #ececec;">92.21</td>
112
+ <td style="padding:9px 8px;text-align:center;color:#444444;border-bottom:1px solid #ececec;">85.53</td>
113
+ <td style="padding:9px 8px;text-align:center;color:#444444;border-bottom:1px solid #ececec;">88.75</td>
114
+ <td style="padding:9px 8px;text-align:center;color:#444444;border-bottom:1px solid #ececec;">91.62</td>
115
+ <td style="padding:9px 8px;text-align:center;color:#444444;border-bottom:1px solid #ececec;">82.01</td>
116
+ <td style="padding:9px 8px;text-align:center;color:#444444;border-bottom:1px solid #ececec;">72.3</td>
117
+ </tr>
118
+ <tr>
119
+ <td style="padding:9px 8px;text-align:left;font-weight:600;color:#333333;border-bottom:1px solid #ececec;">Scicode</td>
120
+ <td style="padding:9px 8px;text-align:center;background-color:#e2eede;border-bottom:1px solid #d7e4d2;"><strong style="color:#1a4a25;">44.20</strong></td>
121
+ <td style="padding:9px 8px;text-align:center;color:#444444;border-bottom:1px solid #ececec;">25.58</td>
122
+ <td style="padding:9px 8px;text-align:center;color:#444444;border-bottom:1px solid #ececec;">37.53</td>
123
+ <td style="padding:9px 8px;text-align:center;color:#444444;border-bottom:1px solid #ececec;">33.19</td>
124
+ <td style="padding:9px 8px;text-align:center;color:#444444;border-bottom:1px solid #ececec;">27.73</td>
125
+ <td style="padding:9px 8px;text-align:center;color:#444444;border-bottom:1px solid #ececec;">30.34</td>
126
+ <td style="padding:9px 8px;text-align:center;color:#444444;border-bottom:1px solid #ececec;">30.84</td>
127
+ <td style="padding:9px 8px;text-align:center;color:#444444;border-bottom:1px solid #ececec;">18.27</td>
128
+ </tr>
129
+ <tr>
130
+ <td style="padding:9px 8px;text-align:left;font-weight:600;color:#333333;">KAT-Code-Bench</td>
131
+ <td style="padding:9px 8px;text-align:center;background-color:#e2eede;"><strong style="color:#1a4a25;">46.21</strong></td>
132
+ <td style="padding:9px 8px;text-align:center;color:#444444;">44.83</td>
133
+ <td style="padding:9px 8px;text-align:center;color:#444444;">42.76</td>
134
+ <td style="padding:9px 8px;text-align:center;color:#444444;">37.93</td>
135
+ <td style="padding:9px 8px;text-align:center;color:#444444;">35.86</td>
136
+ <td style="padding:9px 8px;text-align:center;color:#444444;">33.10</td>
137
+ <td style="padding:9px 8px;text-align:center;color:#444444;">22.06</td>
138
+ <td style="padding:9px 8px;text-align:center;color:#444444;">15.17</td>
139
+ </tr>
140
+ </table>
141
+
142
+ <sub>For **Terminal-Bench 2.1**, the bold number is the average across two agent harnesses; the small numbers below are the per-harness scores (Terminus-2 / Claude Code).</sub>
143
+
144
+ <div style="font-size:11.5px;line-height:1.5;color:#8a8a8a;margin-top:6px;">
145
+
146
+ <p style="margin:0 0 3px;"><strong style="color:#555;">1. Evaluation method.</strong> All metrics presented in the table are reproduced in-house: we download the public model checkpoints, deploy them via vLLM or SGLang, and evaluate under a unified standardized pipeline. No officially reported results of the respective models are directly adopted in this table. Each model is tested only once on each evaluation set; retests are conducted only if obvious errors are found.</p>
147
+
148
+ <p style="margin:6px 0 2px;"><strong style="color:#555;">2. Evaluation configuration.</strong></p>
149
+ <p style="margin:0 0 2px;">* SWE-bench Verified / Multilingual / Pro, KAT-Code-Bench: agent=claude_code@2.1.195, pass@k=1, temperature=1.0, top_p=0.95, 256k ctx.</p>
150
+ <p style="margin:0 0 2px;">* Terminal-Bench 2.1: agent=terminus-2 / claude_code, pass@k=1, temperature=0.7, top_p=1.0, 256k ctx.</p>
151
+ <p style="margin:0 0 2px;">* PinchBench: agent=openclaw@2026.3.13, pass@k=1, temperature=0.7, top_p=1.0, 256k ctx.</p>
152
+ <p style="margin:0 0 2px;">* Scicode: pass@k=1, temperature=0.6, top_p=1.0, 256k ctx.</p>
153
+
154
+ <p style="margin:6px 0 2px;"><strong style="color:#555;">3. Anomaly description.</strong></p>
155
+ <p style="margin:0 0 2px;">* Qwen3.6-35BA3B: We found that on the SWE-bench Verified, SWE-bench Multilingual, and SWE-bench Pro test sets, our test results this time have an approximate 10 pp gap compared with the official results. We believe this is mainly caused by the harness version and some optimizations made to the test sets by the Qwen team, and it should not be an issue with the model itself.</p>
156
+ <p style="margin:0 0 2px;">* Qwen3.5-35BA3B: We observed frequent hallucinations during evaluation, including attempts to invoke the unavailable MultiEdit tool under the current agent environment, which negatively impacts the final metric.</p>
157
+ <p style="margin:0 0 2px;">* Gemma4-26B-A4B-it: Two main factors degrade evaluation performance: context overflow (exceeding the 256k context limit) and hallucinated calls to the unsupported MultiEdit tool in this evaluation setup.</p>
158
+ <p style="margin:0;">The above deviations arise from mismatches between model tool preference and the allowed toolset in the evaluation harness, rather than inherent capability limitations of the models.</p>
159
+
160
+ </div>
161
+
162
+ ## Post-training
163
+
164
+ To provide a systematic overview of our team's work on data and algorithms, we adopt the widely recognized Qwen3.6-35B-A3B as the base model for post-training and build KAT-Coder-V2.5-Dev on top of it. Overall, KAT-Coder-V2.5-Dev largely follows the post-training recipe of KAT-V2.5, with most settings—including data construction, training pipeline, and optimization strategy—remaining unchanged. The full pipeline consists of two stages: supervised fine-tuning (SFT) and reinforcement learning (RL). We first fine-tune Qwen3.6-35B-A3B on a dataset of 127K examples and then perform RL training on the resulting SFT model.
165
+
166
+ During the RL stage, we retain the training infrastructure and key technical designs validated in KAT-V2.5, including the following four components:
167
+
168
+ 1. **Token-in-Token-out (TITO) consistency.** We use TITO to ensure that the token sequences in the rollout and training stages are strictly identical, preventing training discrepancies caused by differences in chat templates, serialization, or tokenizer behavior.
169
+ 2. **Truncated Importance Sampling (TIS).** To mitigate policy staleness and off-policy issues introduced by asynchronous rollouts, we apply TIS to truncate importance-sampling weights, reducing the variance and instability caused by excessively large weights.
170
+ 3. **Reliable sandboxes and verifiers.** We systematically inspect and validate the stability and correctness of the sandboxes and verifiers. This helps prevent infrastructure failures—such as execution timeouts, environment errors, or verifier misjudgments—from being incorrectly treated as model failures and contaminating the reward signal.
171
+ 4. **Hierarchical rewards based on harness execution feedback.** We construct hierarchical rewards from fine-grained execution feedback provided by the harness. This allows the model to optimize toward the final task objective while also receiving credit for meaningful progress in unsuccessful trajectories, thereby increasing the training value of failed attempts and providing denser reward signals.
172
+
173
+ However, Qwen3.6 exhibits trajectory patterns that differ from those observed in KAT-V2.5, requiring additional reward adaptations tailored to its behavior. In our initial experiments, a simple binary 0–1 reward caused model collapse as early as the second epoch. An analysis of the training trajectories revealed that, as training progressed, the model increasingly tended to issue a large number of parallel tool calls within a single turn—occasionally exceeding 70 calls. This behavior caused the context length to grow rapidly, generated a substantial number of invalid trajectories and execution errors, and ultimately destabilized RL training.
174
+
175
+ To address this issue, we augmented the original hierarchical reward with several Qwen3.6-specific penalties targeting (including but not limited to the following):
176
+
177
+ - Excessive parallel tool calls within a single turn;
178
+ - Failed tool calls;
179
+ - Empty tool-call blocks; and
180
+ - Large amounts of repeated content.
181
+
182
+ These targeted reward adjustments effectively suppressed pathological tool-use and repetitive-generation behaviors, enabling stable RL training for 10 epochs. Our experiments validate the effectiveness and feasibility of both the overall training pipeline and the Qwen3.6-specific reward design.
183
+
184
+ <p align="center">
185
+ <a href="https://huggingface.co/Kwaipilot/KAT-Coder-V2.5-Dev/resolve/main/KAT-Coder-V2.5-Dev-RL-Reward-Curve.png?download=true">
186
+ <img src="KAT-Coder-V2.5-Dev-RL-Reward-Curve.png" alt="RL training reward curve" width="100%">
187
+ </a>
188
+ </p>
189
+
190
+ <p align="center"><sub><em>The proportion of samples that pass the unit test (1 for pass, 0 for fail) within a batch of samples during RL training.</em></sub></p>
191
+
192
+ ## Quickstart
193
+
194
+ For streamlined integration, we recommend using KAT-Coder-V2.5-Dev via APIs. Below is a guide to use KAT-Coder-V2.5-Dev via OpenAI-compatible API.
195
+
196
+ ### Serving KAT-Coder-V2.5-Dev
197
+
198
+ KAT-Coder-V2.5-Dev can be served via APIs with popular inference frameworks. In the following, we show example commands to launch OpenAI-Compatible API servers for KAT-Coder-V2.5-Dev model.
199
+
200
+ #### SGLang
201
+
202
+ SGLang is a fast serving framework for large language models and vision language models. sglang>=0.5.10 is recommended for KAT-Coder-V2.5-Dev, which can be installed using the following command in a fresh environment:
203
+
204
+ ```shell
205
+ uv pip install sglang[all]
206
+ ```
207
+
208
+ The following will create API endpoints at `http://localhost:8000/v1`:
209
+
210
+ > **Note:** This open-weight release ships only the language-model weights (no vision tower). If your SGLang version attempts to build the multimodal/vision components at load time, startup may fail on missing vision weights; in that case, run with the version's text/language-model-only option (see `python -m sglang.launch_server --help`).
211
+
212
+ - Standard Version: The following command can be used to create an API endpoint with maximum context length 262,144 tokens using tensor parallel on 8 GPUs.
213
+ ```shell
214
+ python -m sglang.launch_server \
215
+ --model-path Kwaipilot/KAT-Coder-V2.5-Dev \
216
+ --port 8000 \
217
+ --tp-size 8 \
218
+ --mem-fraction-static 0.8 \
219
+ --context-length 262144 \
220
+ --reasoning-parser qwen3
221
+ ```
222
+ - Tool Use: To support tool use, you can use the following command.
223
+ ```shell
224
+ python -m sglang.launch_server \
225
+ --model-path Kwaipilot/KAT-Coder-V2.5-Dev \
226
+ --port 8000 \
227
+ --tp-size 8 \
228
+ --mem-fraction-static 0.8 \
229
+ --context-length 262144 \
230
+ --reasoning-parser qwen3 \
231
+ --tool-call-parser qwen3_coder
232
+ ```
233
+
234
+ #### vLLM
235
+
236
+ vLLM is a high-throughput and memory-efficient inference and serving engine for LLMs. vllm>=0.19.0 is recommended for KAT-Coder-V2.5-Dev, which can be installed using the following command in a fresh environment:
237
+
238
+ ```shell
239
+ uv pip install vllm --torch-backend=auto
240
+ ```
241
+
242
+ The following will create API endpoints at `http://localhost:8000/v1`:
243
+
244
+ > **Note:** This open-weight release ships only the language-model weights, so the `--language-model-only` flag is **required**. It tells vLLM to skip the vision encoder and multimodal profiling; without it, vLLM attempts to initialize vision-tower weights that are not present in the checkpoint and startup fails.
245
+
246
+ - Standard Version: The following command can be used to create an API endpoint with maximum context length 262,144 tokens using tensor parallel on 8 GPUs.
247
+ ```shell
248
+ vllm serve Kwaipilot/KAT-Coder-V2.5-Dev \
249
+ --port 8000 \
250
+ --tensor-parallel-size 8 \
251
+ --max-model-len 262144 \
252
+ --reasoning-parser qwen3 \
253
+ --language-model-only
254
+ ```
255
+ - Tool Call: To support tool use, you can use the following command.
256
+ ```shell
257
+ vllm serve Kwaipilot/KAT-Coder-V2.5-Dev \
258
+ --port 8000 \
259
+ --tensor-parallel-size 8 \
260
+ --max-model-len 262144 \
261
+ --reasoning-parser qwen3 \
262
+ --enable-auto-tool-choice \
263
+ --tool-call-parser qwen3_coder \
264
+ --language-model-only
265
+ ```
266
+
267
+ #### KTransformers
268
+
269
+ KTransformers is a flexible framework for experiencing cutting-edge LLM inference optimizations with CPU-GPU heterogeneous computing. For running KAT-Coder-V2.5-Dev with KTransformers, see the KTransformers Deployment Guide.
270
+
271
+ #### Hugging Face Transformers
272
+
273
+ Hugging Face Transformers contains a lightweight server which can be used for quick testing and moderate load deployment. The latest transformers is required for KAT-Coder-V2.5-Dev. Installing `accelerate` is also required for multi-GPU (sharded) loading:
274
+
275
+ ```shell
276
+ pip install "transformers[serving]" accelerate
277
+ ```
278
+
279
+ Then, run transformers serve to launch a server with API endpoints at `http://localhost:8000/v1`; it will place the model on accelerators if available:
280
+
281
+ ```shell
282
+ transformers serve Kwaipilot/KAT-Coder-V2.5-Dev --port 8000
283
+ ```
284
+
285
+ ## Using KAT-Coder-V2.5-Dev via the Chat Completions API
286
+
287
+ The chat completions API is accessible via standard HTTP requests or OpenAI SDKs. Here, we show examples using the OpenAI Python SDK.
288
+
289
+ Before starting, make sure it is installed and the API key and the API base URL is configured, e.g.:
290
+
291
+ ```shell
292
+ pip install -U openai
293
+
294
+ # Set the following accordingly
295
+ export OPENAI_BASE_URL="http://localhost:8000/v1"
296
+ export OPENAI_API_KEY="EMPTY"
297
+ ```
298
+
299
+ ### Text-Only Input
300
+
301
+ ```python
302
+ from openai import OpenAI
303
+ # Configured by environment variables
304
+ client = OpenAI()
305
+
306
+ messages = [
307
+ {"role": "user", "content": "Type \"I love KAT-Coder-V2.5-Dev\" backwards"},
308
+ ]
309
+
310
+ chat_response = client.chat.completions.create(
311
+ model="Kwaipilot/KAT-Coder-V2.5-Dev",
312
+ messages=messages,
313
+ max_tokens=81920,
314
+ temperature=1.0,
315
+ top_p=0.95,
316
+ presence_penalty=1.5,
317
+ extra_body={
318
+ "top_k": 20,
319
+ },
320
+ )
321
+ print("Chat response:", chat_response)
322
+ ```
323
+
324
+ ## Instruct (or Non-Thinking) Mode
325
+
326
+ KAT-Coder-V2.5-Dev will think by default before response. You can obtain direct response from the model without thinking by configuring the API parameters. For example,
327
+
328
+ ```python
329
+ from openai import OpenAI
330
+ # Configured by environment variables
331
+ client = OpenAI()
332
+
333
+ messages = [
334
+ {"role": "user", "content": "Write a Python function that returns the n-th Fibonacci number."},
335
+ ]
336
+
337
+ chat_response = client.chat.completions.create(
338
+ model="Kwaipilot/KAT-Coder-V2.5-Dev",
339
+ messages=messages,
340
+ max_tokens=32768,
341
+ temperature=0.7,
342
+ top_p=0.8,
343
+ presence_penalty=1.5,
344
+ extra_body={
345
+ "top_k": 20,
346
+ "chat_template_kwargs": {"enable_thinking": False},
347
+ },
348
+ )
349
+ print("Chat response:", chat_response)
350
+ ```
351
+
352
+ ## Preserve Thinking
353
+
354
+ By default, only the thinking blocks generated in handling the latest user message is retained, resulting in a pattern commonly as interleaved thinking. KAT-Coder-V2.5-Dev has been additionally trained to preserve and leverage thinking traces from historical messages. You can enable this behavior by setting the preserve_thinking option:
355
+
356
+ ```python
357
+ from openai import OpenAI
358
+ # Configured by environment variables
359
+ client = OpenAI()
360
+
361
+ messages = [...]
362
+
363
+ chat_response = client.chat.completions.create(
364
+ model="Kwaipilot/KAT-Coder-V2.5-Dev",
365
+ messages=messages,
366
+ max_tokens=32768,
367
+ temperature=0.7,
368
+ top_p=0.8,
369
+ presence_penalty=1.5,
370
+ extra_body={
371
+ "top_k": 20,
372
+ "chat_template_kwargs": {"preserve_thinking": True},
373
+ },
374
+ )
375
+ print("Chat response:", chat_response)
376
+ ```
377
+
378
+ This capability is particularly beneficial for agent scenarios, where maintaining full reasoning context can enhance decision consistency and, in many cases, reduce overall token consumption by minimizing redundant reasoning. Additionally, it can improve KV cache utilization, optimizing inference efficiency in both thinking and non-thinking modes.
379
+
380
+ ## Processing Ultra-Long Texts
381
+
382
+ KAT-Coder-V2.5-Dev natively supports context lengths of up to 262,144 tokens. For long-horizon tasks where the total length (including both input and output) exceeds this limit, we recommend using RoPE scaling techniques to handle long texts effectively, e.g., YaRN.
383
+
384
+ YaRN is currently supported by several inference frameworks, e.g., transformers, vllm, ktransformers and sglang. In general, there are two approaches to enabling YaRN for supported frameworks:
385
+
386
+ - Modifying the model configuration file: In the config.json file, change the rope_parameters fields in text_config to:
387
+ ```json
388
+ {
389
+ "mrope_interleaved": true,
390
+ "mrope_section": [
391
+ 11,
392
+ 11,
393
+ 10
394
+ ],
395
+ "rope_type": "yarn",
396
+ "rope_theta": 10000000,
397
+ "partial_rotary_factor": 0.25,
398
+ "factor": 4.0,
399
+ "original_max_position_embeddings": 262144
400
+ }
401
+ ```
402
+ - Passing command line arguments:
403
+
404
+ For vllm, you can use
405
+
406
+ ```shell
407
+ VLLM_ALLOW_LONG_MAX_MODEL_LEN=1 vllm serve ... --hf-overrides '{"text_config": {"rope_parameters": {"mrope_interleaved": true, "mrope_section": [11, 11, 10], "rope_type": "yarn", "rope_theta": 10000000, "partial_rotary_factor": 0.25, "factor": 4.0, "original_max_position_embeddings": 262144}}}' --max-model-len 1010000
408
+ ```
409
+
410
+ For sglang and ktransformers, you can use
411
+
412
+ ```shell
413
+ SGLANG_ALLOW_OVERWRITE_LONGER_CONTEXT_LEN=1 python -m sglang.launch_server ... --json-model-override-args '{"text_config": {"rope_parameters": {"mrope_interleaved": true, "mrope_section": [11, 11, 10], "rope_type": "yarn", "rope_theta": 10000000, "partial_rotary_factor": 0.25, "factor": 4.0, "original_max_position_embeddings": 262144}}}' --context-length 1010000
414
+ ```
415
+
416
+ ## Citation
417
+
418
+ If you find our work helpful, feel free to give us a cite.
419
+
420
+ ```bibtex
421
+ @misc{katcoder_v25_2026,
422
+ title={{KAT-Coder-V2.5 Technical Report}},
423
+ author={{KwaiKAT Team}},
424
+ year={2026},
425
+ month={July},
426
+ eprint={2607.05471},
427
+ archivePrefix={arXiv},
428
+ primaryClass={cs.AI},
429
+ url={https://arxiv.org/pdf/2607.05471}
430
+ }
431
+ ```
chat_template.jinja ADDED
@@ -0,0 +1,154 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ {%- if tools and tools is iterable and tools is not mapping %}
46
+ {{- '<|im_start|>system\n' }}
47
+ {{- "# Tools\n\nYou have access to the following functions:\n\n<tools>" }}
48
+ {%- for tool in tools %}
49
+ {{- "\n" }}
50
+ {{- tool | tojson }}
51
+ {%- endfor %}
52
+ {{- "\n</tools>" }}
53
+ {{- '\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>' }}
54
+ {%- if messages[0].role == 'system' %}
55
+ {%- set content = render_content(messages[0].content, false, true)|trim %}
56
+ {%- if content %}
57
+ {{- '\n\n' + content }}
58
+ {%- endif %}
59
+ {%- endif %}
60
+ {{- '<|im_end|>\n' }}
61
+ {%- else %}
62
+ {%- if messages[0].role == 'system' %}
63
+ {%- set content = render_content(messages[0].content, false, true)|trim %}
64
+ {{- '<|im_start|>system\n' + content + '<|im_end|>\n' }}
65
+ {%- endif %}
66
+ {%- endif %}
67
+ {%- set ns = namespace(multi_step_tool=true, last_query_index=messages|length - 1) %}
68
+ {%- for message in messages[::-1] %}
69
+ {%- set index = (messages|length - 1) - loop.index0 %}
70
+ {%- if ns.multi_step_tool and message.role == "user" %}
71
+ {%- set content = render_content(message.content, false)|trim %}
72
+ {%- if not(content.startswith('<tool_response>') and content.endswith('</tool_response>')) %}
73
+ {%- set ns.multi_step_tool = false %}
74
+ {%- set ns.last_query_index = index %}
75
+ {%- endif %}
76
+ {%- endif %}
77
+ {%- endfor %}
78
+ {%- if ns.multi_step_tool %}
79
+ {{- raise_exception('No user query found in messages.') }}
80
+ {%- endif %}
81
+ {%- for message in messages %}
82
+ {%- set content = render_content(message.content, true)|trim %}
83
+ {%- if message.role == "system" %}
84
+ {%- if not loop.first %}
85
+ {{- raise_exception('System message must be at the beginning.') }}
86
+ {%- endif %}
87
+ {%- elif message.role == "user" %}
88
+ {{- '<|im_start|>' + message.role + '\n' + content + '<|im_end|>' + '\n' }}
89
+ {%- elif message.role == "assistant" %}
90
+ {%- set reasoning_content = '' %}
91
+ {%- if message.reasoning_content is string %}
92
+ {%- set reasoning_content = message.reasoning_content %}
93
+ {%- else %}
94
+ {%- if '</think>' in content %}
95
+ {%- set reasoning_content = content.split('</think>')[0].rstrip('\n').split('<think>')[-1].lstrip('\n') %}
96
+ {%- set content = content.split('</think>')[-1].lstrip('\n') %}
97
+ {%- endif %}
98
+ {%- endif %}
99
+ {%- set reasoning_content = reasoning_content|trim %}
100
+ {%- if (preserve_thinking is defined and preserve_thinking is true) or (loop.index0 > ns.last_query_index) %}
101
+ {{- '<|im_start|>' + message.role + '\n<think>\n' + reasoning_content + '\n</think>\n\n' + content }}
102
+ {%- else %}
103
+ {{- '<|im_start|>' + message.role + '\n' + content }}
104
+ {%- endif %}
105
+ {%- if message.tool_calls and message.tool_calls is iterable and message.tool_calls is not mapping %}
106
+ {%- for tool_call in message.tool_calls %}
107
+ {%- if tool_call.function is defined %}
108
+ {%- set tool_call = tool_call.function %}
109
+ {%- endif %}
110
+ {%- if loop.first %}
111
+ {%- if content|trim %}
112
+ {{- '\n\n<tool_call>\n<function=' + tool_call.name + '>\n' }}
113
+ {%- else %}
114
+ {{- '<tool_call>\n<function=' + tool_call.name + '>\n' }}
115
+ {%- endif %}
116
+ {%- else %}
117
+ {{- '\n<tool_call>\n<function=' + tool_call.name + '>\n' }}
118
+ {%- endif %}
119
+ {%- if tool_call.arguments is defined %}
120
+ {%- for args_name, args_value in tool_call.arguments|items %}
121
+ {{- '<parameter=' + args_name + '>\n' }}
122
+ {%- set args_value = args_value | string if args_value is string else args_value | tojson | safe %}
123
+ {{- args_value }}
124
+ {{- '\n</parameter>\n' }}
125
+ {%- endfor %}
126
+ {%- endif %}
127
+ {{- '</function>\n</tool_call>' }}
128
+ {%- endfor %}
129
+ {%- endif %}
130
+ {{- '<|im_end|>\n' }}
131
+ {%- elif message.role == "tool" %}
132
+ {%- if loop.previtem and loop.previtem.role != "tool" %}
133
+ {{- '<|im_start|>user' }}
134
+ {%- endif %}
135
+ {{- '\n<tool_response>\n' }}
136
+ {{- content }}
137
+ {{- '\n</tool_response>' }}
138
+ {%- if not loop.last and loop.nextitem.role != "tool" %}
139
+ {{- '<|im_end|>\n' }}
140
+ {%- elif loop.last %}
141
+ {{- '<|im_end|>\n' }}
142
+ {%- endif %}
143
+ {%- else %}
144
+ {{- raise_exception('Unexpected message role.') }}
145
+ {%- endif %}
146
+ {%- endfor %}
147
+ {%- if add_generation_prompt %}
148
+ {{- '<|im_start|>assistant\n' }}
149
+ {%- if enable_thinking is defined and enable_thinking is false %}
150
+ {{- '<think>\n\n</think>\n\n' }}
151
+ {%- else %}
152
+ {{- '<think>\n' }}
153
+ {%- endif %}
154
+ {%- 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": 0,
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
+ }
configuration.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"framework":"Pytorch","task":"image-text-to-text"}
generation_config.json ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "bos_token_id": 248044,
3
+ "do_sample": true,
4
+ "eos_token_id": [
5
+ 248046,
6
+ 248044
7
+ ],
8
+ "pad_token_id": 248044,
9
+ "temperature": 1.0,
10
+ "top_k": 20,
11
+ "top_p": 0.95
12
+ }
kat_logo_hd.png ADDED

Git LFS Details

  • SHA256: c902d7374ae778e7cde2257253fd11562fce1715da8fbc56f1401462422321fc
  • Pointer size: 131 Bytes
  • Size of remote file: 132 kB
merges.txt ADDED
The diff for this file is too large to render. See raw diff
 
model-00000-of-00013.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8276a6a03028202c6defdee72e36a7bc6a1ca2818f07b59db25d79d4a4807f49
3
+ size 5368997288
model-00001-of-00013.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2889ed15439b5b36a5465e1d065f77eb21cc43bbdc3c3c6e6a66ba53adf5754e
3
+ size 5369063800
model-00002-of-00013.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:16fcbe70f06b9ac0b32c355c5ae0f878b52321ef4b979fea906a3feda3eafbee
3
+ size 5369063512
model-00003-of-00013.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:15a4c1bb2211711e2daa1f9143383b340ac7c98278234ebb667cb76529820627
3
+ size 5369065752
model-00004-of-00013.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9d5ad2057e25a891e5c2f24c45cef64579e57880ee8be19232055e99430c9df5
3
+ size 5369066360
model-00005-of-00013.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:edad43eb0037fefbacf5cdde56543647f7bba63f99278cf5475f92e4bfa90f09
3
+ size 5369066072
model-00006-of-00013.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8705adf12efa80281e2a68ab1ad44c924986f31a289e205b37b24e0046fc04aa
3
+ size 5369066240
model-00007-of-00013.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:972d23a1059d97b6084c736461af11acfa5d7bb9ca165e9268a10a6838712782
3
+ size 5369066360
model-00008-of-00013.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e3e184b01839de133a417c7ae6c35f2be8f5bc48549aca31450e51395608ae33
3
+ size 5369066072
model-00009-of-00013.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7fb7c5f1f62a2f9cf18ee6dbc91c213f1207e66a8126fd26e00b5b1859d894ba
3
+ size 5369066240
model-00010-of-00013.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:39621376256b15785678e758f78c7842f0b4cb8c681b4dc139c1ce856d887c64
3
+ size 5369066360
model-00011-of-00013.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d8760910a5aa83d6e5481804cd65f6284ed6f13a6998bf2bc7524e81f2026d52
3
+ size 5369066072
model-00012-of-00013.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:237e9d4e0f89135d609d516c30e7b169276db6a0c888e56924212217471fdf9a
3
+ size 4896861568
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
+ }
tokenizer.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5f9e4d4901a92b997e463c1f46055088b6cca5ca61a6522d1b9f64c4bb81cb42
3
+ size 12807982
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{%- 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 {%- 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 {{- '<|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
+ }
vocab.json ADDED
The diff for this file is too large to render. See raw diff