yzhwang commited on
Commit
5b0685b
·
0 Parent(s):

Qwen3.6-35B-A3B-Escha-W2 — 2-bit eschamoe model card (verified per-GPU configs, 5-GPU benchmarks)

Browse files
.gitattributes ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
LICENSE ADDED
@@ -0,0 +1,202 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright 2024-2026 Alibaba Cloud (Qwen Team) — base model Qwen3.6-35B-A3B.
190
+ 2-bit quantized derivative Copyright 2026 EschaLabs.
191
+
192
+ Licensed under the Apache License, Version 2.0 (the "License");
193
+ you may not use this file except in compliance with the License.
194
+ You may obtain a copy of the License at
195
+
196
+ http://www.apache.org/licenses/LICENSE-2.0
197
+
198
+ Unless required by applicable law or agreed to in writing, software
199
+ distributed under the License is distributed on an "AS IS" BASIS,
200
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
+ See the License for the specific language governing permissions and
202
+ limitations under the License.
README.md ADDED
@@ -0,0 +1,549 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ base_model:
4
+ - Qwen/Qwen3.6-35B-A3B
5
+ base_model_relation: quantized
6
+ pipeline_tag: text-generation
7
+ language:
8
+ - en
9
+ tags:
10
+ - mixture-of-experts
11
+ - moe
12
+ - qwen3
13
+ - 2-bit
14
+ - quantization
15
+ - eschamoe
16
+ - sglang
17
+ - zml
18
+ - code
19
+ - reasoning
20
+ - conversational
21
+ metrics:
22
+ - accuracy
23
+ - code_eval
24
+ model-index:
25
+ - name: Qwen3.6-35B-A3B-Escha-W2
26
+ results:
27
+ - task: {type: text-generation, name: Code Generation}
28
+ dataset: {type: evalplus/humanevalplus, name: HumanEval+}
29
+ metrics:
30
+ - {type: pass@1, value: 92.07, name: pass@1 (greedy, thinking-off)}
31
+ - task: {type: text-generation, name: Code Reasoning}
32
+ dataset: {type: cruxeval, name: CRUXEval-O}
33
+ metrics:
34
+ - {type: accuracy, value: 61.75, name: acc (n=800)}
35
+ - task: {type: text-generation, name: Code Generation}
36
+ dataset: {type: livecodebench, name: LiveCodeBench v6 (release_v6, N=182 subset)}
37
+ metrics:
38
+ - {type: pass@1, value: 62.64, name: pass@1 (subset — retention vs FP8)}
39
+ - task: {type: text-generation, name: Commonsense Reasoning}
40
+ dataset: {type: commonsense, name: Commonsense-6 (avg)}
41
+ metrics:
42
+ - {type: accuracy, value: 76.06, name: avg acc (thinking-off)}
43
+ - task: {type: text-generation, name: Knowledge & Reasoning}
44
+ dataset: {type: TIGER-Lab/MMLU-Pro, name: MMLU-Pro}
45
+ metrics:
46
+ - {type: accuracy, value: 80.9, name: acc (5-shot CoT, thinking-on)}
47
+ - task: {type: text-generation, name: Math Reasoning}
48
+ dataset: {type: math-500, name: MATH-500}
49
+ metrics:
50
+ - {type: accuracy, value: 93.8, name: acc (thinking-on, budget-capped)}
51
+ - task: {type: text-generation, name: Graduate-level Science}
52
+ dataset: {type: gpqa, name: GPQA-Diamond}
53
+ metrics:
54
+ - {type: accuracy, value: 77.8, name: acc (thinking-on)}
55
+ ---
56
+
57
+ # Qwen3.6-35B-A3B-Escha-W2 — 2-bit quantized (`eschamoe`)
58
+
59
+ By **[Escha Labs Inc.](https://eschalabs.com/)**
60
+
61
+ **Escha-W2** is a 2-bit quantized build of **Qwen3.6-35B-A3B**, a Mixture-of-Experts model with
62
+ 256 experts, packaged with everything needed to serve it locally through an **OpenAI-compatible
63
+ HTTP API**. (The runtime and served model id keep the `escha` name — see *Connecting a client*.)
64
+
65
+ The whole thing is **12.3 GB on disk** and runs on a **single 24 GB consumer GPU** — or on a
66
+ **16 GB card** (e.g. RTX 5060 Ti) with a reduced context window.
67
+
68
+ | | |
69
+ |---|---|
70
+ | Base model | Qwen3.6-35B-A3B (MoE, 256 experts) |
71
+ | Quantization | 2-bit experts (`eschamoe`; mixed 2/3-bit per projection), int8 dense layers |
72
+ | Size on disk | 12.3 GB |
73
+ | Minimum GPU | **16 GB** VRAM (reduced context), **24 GB** recommended; NVIDIA Ampere (sm_80) → Blackwell (sm_120) |
74
+ | Platform | Linux x86-64, **glibc ≥ 2.28** (Ubuntu 20.04+, RHEL/Rocky/Alma 8+) — the wheel is `manylinux_2_28` |
75
+ | CUDA | an NVIDIA **driver** — no CUDA toolkit needed (`ptxas` ships inside `triton`, a PyTorch dependency) |
76
+ | Python | **3.12**, for the SGLang engine — the ZML engine needs no Python at all |
77
+ | Interface | OpenAI-compatible `/v1` on port 30000 |
78
+
79
+ ---
80
+
81
+ ## Contents
82
+
83
+ | Path | What it is |
84
+ |---|---|
85
+ | `*.safetensors`, `config.json`, `tokenizer*`, `vocab.json`, `merges.txt`, `*.jinja` | the quantized weights, tokenizer and config (at the repo root) |
86
+ | `opencode.json` | example client config (see *Connecting a client*) |
87
+ | `LICENSE`, `THIRD_PARTY_LICENSES/` | Apache-2.0 plus the upstream license texts |
88
+
89
+ This repo holds **only the model**. The **runtimes** live in a separate repo,
90
+ **[EschaLabs/escha-runtime-qwen3moe](https://huggingface.co/EschaLabs/escha-runtime-qwen3moe)**,
91
+ one directory per engine: **`sglang/`** (the `escha` wheel + `serve.sh` — servers, concurrency,
92
+ tools, structured output) and **`zml/`** (a single-binary runtime — no Python, no dependencies,
93
+ and the stronger single-user decode on most cards).
94
+
95
+ ### Which engine?
96
+
97
+ **Use `sglang/` unless you have a specific reason not to.** It is the engine every number on this
98
+ page was measured with, and the only one that supports concurrency, tool calling, structured
99
+ output and a reasoning parser.
100
+
101
+ Choose `zml/` when you want a single-user box with **no Python at all** — one binary, no venv, no
102
+ CUDA toolkit, 14-second install — and you generate long answers. It is the only way to run this
103
+ model without a Python environment.
104
+
105
+ Two things decide whether that trade is worth it on **your** box:
106
+
107
+ - **The decode lead is card-dependent.** On answers ≥1k tokens, measured 2026-07-27: **+15–26%**
108
+ on an RTX 5090 or 3090, **+8–11%** on a 5080, **+2–5%** on a 4090 (against a fully tuned SGLang),
109
+ and a **tie** on a 5060 Ti. ZML loses short replies on every card, and its first start compiles
110
+ graphs — 75–145 s on a 4090, minutes on a 16 GB card, versus ~33 s for SGLang.
111
+ - **The lead is greedy-only.** ZML's fast path fuses 16 decode steps per GPU dispatch with
112
+ on-device argmax; any `temperature > 0` falls back to a per-token loop that is **~2.15× slower**
113
+ (RTX 4090, 512-token answer: 218 tok/s at `temperature: 0` vs 102 at `0.6`). Send
114
+ `"temperature": 0` for the quoted numbers — including with `opencode.json` below, which sets
115
+ `0.6`. The SGLang engine samples at full speed.
116
+
117
+ > **ZML needs the 24 GB it asks for.** On 16 GB cards long prompts fail with an opaque
118
+ > `HTTP 500` — measured from ≥2,048 tokens on a 5080 and from ~700 on a 5060 Ti. Use the
119
+ > SGLang engine on 16 GB.
120
+
121
+ ---
122
+
123
+ ## Quickstart
124
+
125
+ Install the **[Escha runtime](https://huggingface.co/EschaLabs/escha-runtime-qwen3moe)** first (wheel +
126
+ `serve.sh` + full detail, including two requirements that fail **quietly**) — then download this
127
+ model and serve it:
128
+
129
+ ```bash
130
+ python3.12 -m venv .venv && source .venv/bin/activate
131
+ pip install -U pip wheel "huggingface_hub[cli]"
132
+
133
+ # torch MUST be pinned to 2.9.x. `escha._C` is ABI-linked to libtorch and the wheel does
134
+ # NOT declare a torch dependency, so a bare ">=2.9.0" resolves to 2.11 and `import escha`
135
+ # then fails with `undefined symbol: _ZN3c10...` — after two multi-GB downloads.
136
+ pip install "torch==2.9.*" --index-url https://download.pytorch.org/whl/cu128
137
+
138
+ # 1. runtime: fetch the sglang/ engine dir (wheel + serve.sh), install the wheel.
139
+ # Use the glob — a pinned wheel filename goes stale on every rebuild.
140
+ hf download EschaLabs/escha-runtime-qwen3moe --include "sglang/*" --local-dir .
141
+ pip install ./sglang/escha-*.whl # pulls transformers>=5.8 + the full dep closure
142
+
143
+ # 2. this model:
144
+ hf download EschaLabs/Qwen3.6-35B-A3B-Escha-W2 --local-dir ./escha-w2
145
+
146
+ MODEL=./escha-w2 bash sglang/serve.sh
147
+ ```
148
+
149
+ Sanity-check the stack before serving — the first line must print three `True`s:
150
+
151
+ ```bash
152
+ python -c "import torch, escha, sglang; print(torch.cuda.is_available(), hasattr(torch.ops.escha, 'escham_moe_linear'), bool(sglang.__version__))"
153
+ python -c "import escha; print(escha.__version__)" # paste this into bug reports
154
+ ```
155
+
156
+ Then:
157
+
158
+ ```bash
159
+ curl -s http://127.0.0.1:30000/v1/models | python3 -m json.tool
160
+ ```
161
+
162
+ > **If generation looks like fluent nonsense, check your `transformers` version first.**
163
+ > Below 5.8 the server does not fail — it logs one warning and then serves with the wrong
164
+ > architecture parameters. This is the single most likely cause of bad output.
165
+
166
+ ---
167
+
168
+ ## Connecting a client
169
+
170
+ The server speaks the standard OpenAI API, so anything that can point at a custom base URL works —
171
+ LM Studio, opencode, Open WebUI, the `openai` Python package, plain `curl`.
172
+
173
+ ```
174
+ Base URL : http://127.0.0.1:30000/v1
175
+ Model : escha-qwen36-35b-a3b-w2 (override with SERVED_NAME=...)
176
+ API key : not required for localhost
177
+ ```
178
+
179
+ `opencode.json` in this folder is a ready-made config for [opencode](https://opencode.ai) — copy it
180
+ to `~/.config/opencode/opencode.json`. It sets `temperature: 0.6` (Qwen's recommended sampling for
181
+ answer quality); on the **ZML** engine that halves decode speed — set `0` there if you want the
182
+ headline throughput instead.
183
+
184
+ If you expose the server beyond your own machine, set `HOST=0.0.0.0` **and** `API_KEY=...`, and put
185
+ it behind a VPN or tunnel rather than opening the port directly to the internet.
186
+
187
+ ---
188
+
189
+ ## Thinking mode
190
+
191
+ The model can reason before answering. Toggle it **per request** via `chat_template_kwargs` — a
192
+ top-level `enable_thinking` field is ignored:
193
+
194
+ ```json
195
+ {
196
+ "model": "escha-qwen36-35b-a3b-w2",
197
+ "messages": [{"role": "user", "content": "..."}],
198
+ "chat_template_kwargs": {"enable_thinking": true}
199
+ }
200
+ ```
201
+
202
+ With thinking **on**, the reasoning arrives in `reasoning_content` and the answer in `content` —
203
+ read both. To turn thinking off for the whole server instead, start it with `THINK=0`.
204
+
205
+ `usage.reasoning_tokens` reports how much of the answer went to reasoning — use it to size a
206
+ [thinking budget](https://huggingface.co/EschaLabs/escha-runtime-qwen3moe/blob/main/sglang/INSTALL.md).
207
+
208
+ ---
209
+
210
+ ## Tuning
211
+
212
+ `serve.sh` documents every knob at the top of the file. The ones that matter most on a 24 GB card:
213
+
214
+ | Variable | Default | Notes |
215
+ |---|---|---|
216
+ | `MEM` | `0.78` | Fraction of VRAM reserved for the weight + KV pool. **Too low fails**, with "Not enough memory … increase --mem-fraction-static". Lower it only together with `CTXLEN`. |
217
+ | `CTXLEN` | `32768` | Context length. Raise once the defaults work. |
218
+ | `GRAPHS` | `1` | CUDA graphs — **mandatory for performance** on this launch-bound hybrid MoE (eager is ~4.4× slower). Set `0` only to debug a capture failure. |
219
+ | `RADIX` | `1` | Prefix caching. **`RADIX=0` is worth ~20% single-stream decode** here — the default is `1` for multi-turn agent reuse, so set it explicitly. See below. |
220
+ | `THINK` | `1` | `0` serves with thinking disabled by default. |
221
+ | `SERVED_NAME` | `escha-qwen36-35b-a3b-w2` | The model id clients must use. |
222
+
223
+ For per-architecture (incl. the RTX 50-series `ATTN_BACKEND=triton` knob) and per-VRAM
224
+ (16 / 24 / 40 GB+) launch recipes, see the **[runtime's "Running on your GPU" cookbook](https://huggingface.co/EschaLabs/escha-runtime-qwen3moe/blob/main/sglang/INSTALL.md)**.
225
+
226
+ ---
227
+
228
+ ## Verified configurations
229
+
230
+ Each command below was run on 2026-07-27 on the **first** card named in its heading, and produced
231
+ the numbers in [Performance across GPUs](#performance-across-gpus); a second name is a same-arch,
232
+ same-VRAM sibling the recipe should carry to, not a separately measured card. Copy the line for
233
+ your card. `MODEL=` and `VENV=` are omitted for brevity — set `MODEL` to your download directory.
234
+
235
+ **RTX 4090 / L40S — 24 GB, sm_89**
236
+
237
+ ```bash
238
+ RADIX=0 MAXMAMBA=32 MAXREQ=32 CUDA_GRAPH_BS="1 2 4 8 16 32" \
239
+ MEM=0.78 CTXLEN=32768 bash sglang/serve.sh # 225 tok/s bs1 · 1,321 tok/s @ bs32
240
+ ```
241
+
242
+ **RTX 3090 / A6000 — 24 GB, sm_86 (Ampere)**
243
+
244
+ ```bash
245
+ RADIX=0 MAXMAMBA=16 MAXREQ=16 CUDA_GRAPH_BS="1 2 4 8 16" \
246
+ MEM=0.78 CTXLEN=32768 bash sglang/serve.sh # 154 tok/s bs1 · 390 tok/s @ bs16
247
+ # serving ≥8 concurrent streams? add INT8=off (+12–20% aggregate, costs 2.2 GB of KV pool)
248
+ ```
249
+
250
+ **RTX 5090 — 32 GB, sm_120**
251
+
252
+ ```bash
253
+ # single user (best latency)
254
+ INT8=on ATTN_BACKEND=triton MEM=0.82 CTXLEN=32768 bash sglang/serve.sh # 283 tok/s bs1
255
+ # batched (best throughput)
256
+ ATTN_BACKEND=triton MEM=0.82 CTXLEN=32768 MAXREQ=32 MAXMAMBA=48 RADIX=0 \
257
+ CUDA_GRAPH_BS="1 2 4 8 16 32" bash sglang/serve.sh # ~2,670 tok/s @ bs32
258
+ ```
259
+
260
+ **RTX 5080 / 5060 Ti — 16 GB, sm_120**
261
+
262
+ ```bash
263
+ ATTN_BACKEND=triton MEM=0.92 CTXLEN=8192 CHUNK=2048 MAXREQ=16 MAXMAMBA=16 \
264
+ RADIX=0 GRAPHS=1 CUDA_GRAPH_BS="1 2 4 8 16" bash sglang/serve.sh
265
+ # 5080: 212 tok/s bs1 · 914 tok/s @ bs16 | 5060 Ti: 128 tok/s bs1 · 387 tok/s @ bs16
266
+ ```
267
+
268
+ ### Three settings that are worth getting right
269
+
270
+ - **`CUDA_GRAPH_BS` must list your maximum batch size.** If `MAXREQ=16` but the capture list
271
+ stops at 8, batch 16 silently runs **eager** — measured **−8.8%** aggregate on a 5060 Ti, and it
272
+ makes batch 16 look like a throughput ceiling when it is not. Costs ~2.5 s of startup and no
273
+ VRAM.
274
+ - **`MEM=0.92`, not higher, on a 16 GB card.** At `0.94` a 16 GB card has ~0.43 GB of headroom and
275
+ a `1024/1024` batch-16 request can OOM inside the fused MoE op and take the **whole server** down.
276
+ `0.92` survives it and costs nothing in throughput.
277
+ - **`RADIX=0` unless you specifically need prefix caching.** On this hybrid model the radix cache
278
+ is incompatible with the overlap scheduler, so `RADIX=1` silently disables it — worth **~20%
279
+ single-stream decode** (measured 187 → 225 tok/s on a 4090) and it also clamps concurrency via
280
+ the mamba state pool. Keep `RADIX=1` only for multi-turn agent workloads that genuinely reuse
281
+ long prefixes.
282
+
283
+ This checkpoint is **text-only** (the `qwen3_5_moe` config declares a vision tower, but the quantized
284
+ weights contain none — vision is in the quant `ignore` list); `serve.sh` sets `SGLANG_VLM_TEXT_ONLY=1`
285
+ by default so the tower is never instantiated. Do not send image inputs.
286
+
287
+ ---
288
+
289
+ ## Requirements in detail
290
+
291
+ - **GPU** — **16 GB VRAM minimum** (reduced context; e.g. RTX 5060 Ti), **24 GB recommended**;
292
+ NVIDIA Ampere (sm_80) through Blackwell (sm_120). The runtime ships a fat binary with native
293
+ kernels for Ampere (sm_80/86), Ada (sm_89), Hopper (sm_90), and Blackwell (sm_100/sm_120), plus
294
+ PTX for forward-compat on newer GPUs. The kernel launch route is auto-selected per GPU at runtime.
295
+ Cards older than sm_80 (e.g. Turing) are not supported.
296
+ - **An NVIDIA driver — but no CUDA toolkit.** `ptxas` ships inside `triton`, which PyTorch already
297
+ installs, and `serve.sh` probes that copy first; you do not need to install CUDA to serve this
298
+ model. If discovery ever fails, point `TRITON_PTXAS_PATH` at a ptxas **binary** (not its
299
+ directory — a directory is silently rejected).
300
+ - **Linux x86-64 with glibc ≥ 2.28** — the wheel is tagged `manylinux_2_28`, so Ubuntu 20.04+ and
301
+ RHEL/Rocky/Alma 8+ are fine. WSL2 is untested.
302
+ - **`vm.overcommit_memory=1`** — on a fresh machine the first Triton compile forks a large process
303
+ and fails under the default setting. `serve.sh` prints the one-line fix if it detects this.
304
+ - **`transformers >= 5.8` — ignore this file's `transformers_version` for pinning.** The runtime
305
+ wheel installs a compatible transformers for you. Do **not** pin transformers to "match" any
306
+ version field you find in the repo's `config.json` — versions below 5.8 lack this architecture's
307
+ config class and serve fluent-looking nonsense with only a single warning.
308
+
309
+ ### Format notes
310
+
311
+ - `escha_s_in` / `escha_s_out` ship as **all-ones**: the trained scales are already folded into
312
+ `escha_rin` / `escha_rout` at export. Do not edit or "re-apply" them — non-ones values would be
313
+ applied *on top of* the folded scales.
314
+ - `escha_config` (int32[9]) and `quantization_config.layer_meta` are **informational** (written by
315
+ the exporter for offline tools). The runtime derives each projection's code rate from the code
316
+ tensor's shape; `layer_meta` records it as `K` (2 for `gate_up_proj`, 3 for `down_proj`) with
317
+ `bits` mirroring `K`.
318
+ - The `mtp.*` tensors (next-token-prediction head) are present in the checkpoint but **not
319
+ served**; speculative decoding additionally needs a separate draft export that is not part of
320
+ this release.
321
+
322
+ ---
323
+
324
+ ## Benchmarks
325
+
326
+ Two questions matter for a 2-bit build: **how much quality did it cost**, and **how does it serve**.
327
+ Quality is measured against an **FP8 baseline**[^fp8]; serving is measured on a **single RTX 4090**.
328
+
329
+ > **Which runtime produced these numbers.** Every figure on this page — quality and serving —
330
+ > was measured through the **SGLang engine** of the
331
+ > [escha-runtime-qwen3moe](https://huggingface.co/EschaLabs/escha-runtime-qwen3moe/tree/main/sglang)
332
+ > repo, using its shipped `serve.sh` and the launch recipes in
333
+ > [`sglang/INSTALL.md`](https://huggingface.co/EschaLabs/escha-runtime-qwen3moe/blob/main/sglang/INSTALL.md).
334
+ > The same repo also ships a **[ZML engine](https://huggingface.co/EschaLabs/escha-runtime-qwen3moe/tree/main/zml)**
335
+ > (single-binary, no Python) whose serving profile differs: higher sustained single-stream
336
+ > decode on long answers, but **one request at a time** — so none of the batched
337
+ > throughput or concurrency figures below apply to it. Pick the engine from the
338
+ > [runtime README](https://huggingface.co/EschaLabs/escha-runtime-qwen3moe) comparison.
339
+
340
+ ### Quality vs FP8
341
+
342
+ **Commonsense-6**[^cs6] — thinking-off, same box, paired:
343
+
344
+ | | GB | boolq | piqa | arc-e | arc-c | hellaswag | winogrande | **avg** |
345
+ |---|---|---|---|---|---|---|---|---|
346
+ | FP8 baseline | 35.0 | 84.46 | 82.59 | 71.93 | 54.86 | 83.38 | 73.40 | 75.10 |
347
+ | **this build** | **12.3** | **88.38** | **82.10** | **73.82** | **55.38** | **82.44** | **74.27** | **76.06** |
348
+
349
+ **Capabilities** — one representative benchmark per axis, this build vs the FP8 baseline. Retention is
350
+ this-build ÷ FP8.
351
+
352
+ | Capability | Benchmark | FP8 | **this build** | Δ | retention |
353
+ |---|---|---|---|---|---|
354
+ | Broad knowledge | MMLU-Pro (n=12,032) | 82.3 | **80.9** | −1.4 | 98.3% |
355
+ | Math reasoning | MATH-500 (n=500)[^math] | 91.2 | **93.8** | +2.6 | 102.9% |
356
+ | Graduate science | GPQA-Diamond (n=198)[^gpqa] | 74.7 | **77.8** | +3.1 | 104.2% |
357
+ | Coding | LiveCodeBench v6 (n=182)[^lcb] | 67.0 | **62.6** | −4.4 | 93.4% |
358
+ | Tool use | BFCL-AST, weighted (n=1000)[^bfcl] | 88.2 | **88.9** | +0.7 | 100.8% |
359
+ | Long context | RULER, 8k–128k avg[^ruler] | 89.4 | **89.9** | +0.5 | 100.5% |
360
+ | **mean**[^avg] | unweighted, 6 axes | **82.1** | **82.3** | **+0.2** | **100.2%** |
361
+
362
+ Across the six axes this 2-bit build stays within noise of the ~3× larger FP8 baseline everywhere except
363
+ long-horizon code generation (LiveCodeBench), the one capacity-bound gap. Coding parity is corroborated by
364
+ two better-powered paired-McNemar ties with FP8: HumanEval+ 92.07 vs 93.9 and CRUXEval-O 61.75 vs 63.0.[^code]
365
+
366
+ #### Evaluation protocol (reproduce these numbers)
367
+
368
+ Thinking mode and the token budget change reasoning scores materially, so both are stated per
369
+ benchmark. **Both arms (this build and FP8) always ran the identical protocol**, so every Δ above is
370
+ apples-to-apples.
371
+
372
+ | Benchmark | Thinking | Token budget | Notes |
373
+ |---|---|---|---|
374
+ | MMLU-Pro | **on**, 5-shot CoT chat | `max_tokens` **4,096** | **13.9% of answers hit the cap** (FP8: 13.0% — symmetric). See the caveat below. |
375
+ | MATH-500 | **on** + **thinking-budget cap** | budget 28,672 / `max_tokens` 32,768 | Cap forces `</think>` → **0 non-terminations**. |
376
+ | GPQA-Diamond | **on**, uncapped thinking | 16,384 | |
377
+ | LiveCodeBench v6 | **on** + thinking-budget cap | budget 16,384 / `max_tokens` 32,768 | |
378
+ | HumanEval+, MBPP+, CRUXEval-O | **off** | 4,096 | Thinking-on derails code extraction. |
379
+ | BFCL-AST, Commonsense-6 | **off** | 4,096 / loglikelihood | |
380
+ | RULER 8k–128k | **off** | retrieval | |
381
+
382
+ Sampling for the thinking-on runs is Qwen's recommended thinking config: `temperature=1.0,
383
+ top_p=0.95, top_k=20, min_p=0, presence_penalty=1.5`, n=1.
384
+
385
+ > **Caveat on the MMLU-Pro number (read if you are comparing to published leaderboards).** At a
386
+ > 4,096-token cap with thinking on, **13.9%** of questions run out of budget mid-reasoning; those are
387
+ > scored from the truncated trace and land at **49.5%** correct versus **86.0%** for answers that
388
+ > finish. FP8 truncates at the same rate (13.0%), so the **−1.4 gap is unaffected** — but both
389
+ > absolute numbers are **conservative by roughly 2–3 pp** against harnesses that allow a larger
390
+ > budget (this is the main reason our FP8 baseline reads 82.3 where Qwen publishes 85.2 for the
391
+ > unquantized model). If you re-run with a bigger budget — or better, with the
392
+ > [thinking-budget cap](https://huggingface.co/EschaLabs/escha-runtime-qwen3moe/blob/main/sglang/INSTALL.md#bounded-thinking-thinking_budget)
393
+ > that forces an answer — expect **both** arms to rise by a similar margin.
394
+
395
+ ### Performance across GPUs
396
+
397
+ Measured end-to-end on five consumer cards with the **SGLang engine**
398
+ ([`sglang/`](https://huggingface.co/EschaLabs/escha-runtime-qwen3moe/tree/main/sglang); launch
399
+ recipes per card in the
400
+ [runtime cookbook](https://huggingface.co/EschaLabs/escha-runtime-qwen3moe/blob/main/sglang/INSTALL.md)).
401
+ *Decode = what one user sees streaming; peak throughput = total server output at the best batch size.*
402
+
403
+ | GPU | VRAM | arch | 1-user decode | TTFT (2k prompt) | peak server throughput | context |
404
+ |---|---|---|---|---|---|---|
405
+ | RTX 5090 | 32 GB | sm_120 | **283 tok/s**[^int8on] | 0.22 s | **~2,670 tok/s** @ bs 32 | 32k |
406
+ | RTX 4090 | 24 GB | sm_89 | **225 tok/s** | 0.26 s | **1,321 tok/s** @ bs 32 | 32k |
407
+ | RTX 5080 | 16 GB | sm_120 | **212 tok/s** | 0.18 s @1k | 914 tok/s @ bs 16 | 8k |
408
+ | RTX 3090 | 24 GB | sm_86 | **154 tok/s** | 0.63 s | 390 tok/s @ bs 16 | 32k |
409
+ | RTX 5060 Ti | 16 GB | sm_120 | **128 tok/s** | 0.52 s @1k | 387 tok/s @ bs 16 | 8k |
410
+
411
+ Every row was measured on that physical card with the launch command in
412
+ [Verified configurations](#verified-configurations) above — 2026-07-27, five independent
413
+ fresh-machine evaluations, one harness.
414
+
415
+ For scale: fast reading is ~5 words/s (≈7 tok/s) — even the slowest card here decodes ~18× faster
416
+ than you can read, and a 5090 serves a 32-user pool at interactive speed. Three levers matter on
417
+ every card: **CUDA graphs** (`GRAPHS=1`, the default — this hybrid MoE is launch-bound eager, graphs
418
+ are worth **4.4×**), **`RADIX=0`** for throughput/latency work (worth ~20% single-stream — see
419
+ Verified configurations), and the **`INT8` knob** (single-user vs batched).
420
+
421
+ Two things the spread above is *not*: it is not a VRAM ranking (the 16 GB 5080 beats the 24 GB
422
+ 3090 by 38%), and it is not a generation ranking. It tracks **memory bandwidth and SM count** —
423
+ this is a 2-bit model, so decode is bandwidth-bound at batch 1 and compute-bound at batch.
424
+ Ampere (3090) is the slowest per stream and also the only card here where the kernel route
425
+ auto-selects `lovelace` rather than `blackwell`.
426
+
427
+ [^int8on]: 5090 and 3090 single-user numbers use `INT8=on` (int8-as-stored; measured +21–24% at
428
+ bs 1 on the 5090, +35–42% on the 3090). Peak-throughput numbers use `INT8` off above 24 GB —
429
+ int8 *costs* 11–52% at high batch, and the crossover is around **concurrency 8** (measured on
430
+ the 3090). Cards ≤ 24 GB auto-enable int8; if you serve ≥ 8 concurrent streams on a 24 GB card,
431
+ set `INT8=off` explicitly.
432
+
433
+ ### Serving — NVIDIA ISL/OSL grid, RTX 4090
434
+
435
+ Aggregate decode tok/s. Input/output shapes are the standard NVIDIA grid; 2 reps, median[^grid].
436
+ This grid was **reproduced from scratch on a separate 4090** following only the public docs:
437
+ all bs 1 shapes matched within 0.1–1.8% (measured on the same decode window), including the
438
+ 20,000-token-prompt cell to 0.1%.
439
+
440
+ | ISL / OSL | bs 1 | bs 8 | bs 16 |
441
+ |---|---|---|---|
442
+ | 128 / 128 | 225.2 | 956.8 | **1139.3** |
443
+ | 128 / 2048 | 225.2 | 883.3 | 1035.6 |
444
+ | 128 / 4096 | 224.0 | 872.4 | 1022.6 |
445
+ | 500 / 2000 | 224.7 | 867.1 | 1023.9 |
446
+ | 1000 / 1000 | 224.6 | 869.8 | 1006.8 |
447
+ | 1000 / 2000 | 223.9 | 858.7 | 1005.3 |
448
+ | 1024 / 2048 | 223.9 | 857.3 | 1005.7 |
449
+ | 2048 / 128 | 221.2 | 667.4[^ramp] | 671.3[^ramp] |
450
+ | 2048 / 2048 | 222.5 | 832.8 | 966.3 |
451
+ | 5000 / 500 | 219.4 | 614.1[^ramp] | 665.2[^ramp] |
452
+ | 20000 / 2000 | 202.7 | 480.8 | 759.2[^pool] |
453
+
454
+ ### Latency SLA — MLPerf-style Poisson arrivals, RTX 4090
455
+
456
+ Poisson arrivals[^sla] — 1000-in / 400-out, 100 requests per point, nearest-rank p99:
457
+
458
+ | arrival rate | TTFT p50 | TTFT p99 | TPOT p99 | out tok/s | Interactive | Conversational |
459
+ |---|---|---|---|---|---|---|
460
+ | **1.0 req/s** | 168 ms | **433 ms** | 16.3 ms | 445 | **PASS** | **PASS** |
461
+ | 1.25 req/s | 197 ms | 1,073 ms | 20.6 ms | 550 | fail | **PASS** |
462
+ | 1.5 req/s | 304 ms | 3,281 ms | 20.6 ms | 640 | fail | fail |
463
+ | 2.0 req/s | 5,947 ms | 8,001 ms | 20.5 ms | 717 | fail | fail |
464
+ | 12.0 req/s | 21,454 ms | 41,964 ms | 19.8 ms | 772 | fail | fail |
465
+
466
+ Saturation is **~1.9 req/s** (772 tok/s ÷ 400 output tokens). Past that, waits grow by ordinary
467
+ queueing, not by any defect. **Decode is never the limiter** — TPOT keeps 2.4–45× headroom at every
468
+ rate tested; the binding constraint is always TTFT/prefill[^tpot].
469
+
470
+ [^fp8]: FP8 is the baseline because it is the closest widely-available reference to full precision
471
+ (it tracks BF16 on these tasks), and because BF16 for this model does not fit on a 24 GB card at
472
+ all. FP8 itself needs ~35 GB, so the comparison is against a build that requires substantially
473
+ more hardware than this one.
474
+
475
+ [^cs6]: Same box, same in-process harness for both arms, so backend differences cancel. The
476
+ dense (non-expert) layers here are int8; that is **lossless** against an fp16-dense build of the
477
+ same weights (boolq 88.38 vs 88.04), so the size saving costs nothing measurable.
478
+
479
+ [^math]: MATH-500 is served with a thinking-budget cap — the correct protocol for a reasoning model
480
+ (0 non-terminations; uncapped, the model over-thinks and truncates, which the cap fixes without
481
+ changing answer quality). Read the result as **parity** with FP8; the small margin is capping
482
+ protocol, not a real quality gain.
483
+
484
+ [^gpqa]: GPQA-Diamond is run-to-run unstable by ±~5 pp at this sample size, so treat +3.1 as an
485
+ **effective tie** with FP8, not a genuine lead.
486
+
487
+ [^lcb]: LiveCodeBench v6, `release_v6` slice (contest dates 2025-01 onward, N=182) — a
488
+ post-training-cutoff subset chosen to limit contamination. Both builds are scored on the same
489
+ 182 problems, so read −4.4 as **retention vs FP8**, not a leaderboard score. Long-horizon code
490
+ generation is the most capacity-sensitive task measured, and the one clear 2-bit gap.
491
+
492
+ [^bfcl]: BFCL-AST, matched same-driver run (thinking-off, n=1000, AST-weighted across the four
493
+ non-live categories). Tool-call form is preserved at 2-bit — a tie with FP8.
494
+
495
+ [^ruler]: RULER (synthetic long-context retrieval), 4-task average across 8k / 32k / 64k / 128k.
496
+ Near-lossless through 128k.
497
+
498
+ [^avg]: **Unweighted** mean of the six rows — a reading convenience, not a statistic to lean
499
+ on. The axes have wildly different sample sizes (MMLU-Pro n=12,032 vs LiveCodeBench
500
+ n=182) and different score scales, so the mean hides the one real gap (coding) behind
501
+ gains elsewhere. Read the per-axis rows for anything that matters.
502
+
503
+ [^code]: Paired McNemar (exact two-sided) on identical prompts — per-item comparisons on full native
504
+ sample sets. Both land on a statistical tie: HumanEval+ turns on just 7 disagreements (2 win /
505
+ 5 loss of 164 — underpowered), CRUXEval-O is far better powered (64 disagreements) and still ties.
506
+
507
+ [^grid]: Measured with CUDA graphs on and a 16-request cap (`GRAPHS=1 MAXREQ=16`), prefix caching
508
+ **off** (`RADIX=0`), and output length pinned so every cell decodes the full OSL. `GRAPHS=1`
509
+ and `RADIX=0` are both required to reproduce these numbers; `GRAPHS=1` is already the
510
+ `serve.sh` default, `RADIX=0` is not. Single-stream (bs 1) is flat at ~220 tok/s across shapes
511
+ because decode is memory-bound, not compute-bound, at batch 1.
512
+
513
+ [^ramp]: Short-output cells at batch are dominated by request turnaround rather than by decode: with
514
+ only 128–500 output tokens the ramp in and out of the batch is a large fraction of the wall time.
515
+ These cells understate steady-state decode throughput.
516
+
517
+ [^pool]: At 20k input the KV pool cannot hold 16 concurrent requests, so some queue and this number
518
+ is **pessimistic** — the achievable figure is higher than shown. Raising the memory fraction to
519
+ de-queue it failed on a 24 GB card; it is an envelope limit, not a tuning miss.
520
+
521
+ [^sla]: MLPerf Server-style: Poisson arrivals (not synchronized bursts) and p99 rather than median —
522
+ burst harnesses systematically misreport this workload. Thresholds are the MLPerf interactive
523
+ categories: **Interactive** = TTFT p99 ≤ 450 ms and TPOT ≤ 40 ms; **Conversational** = ≤ 2000 ms
524
+ and ≤ 200 ms.
525
+
526
+ [^tpot]: One caveat worth knowing before you turn thinking on: TTFT measures the first token
527
+ *generated*, but with thinking enabled the first token a **user sees** comes after the reasoning
528
+ block. On real problems that gap is large — first generated token in ~75 ms, first answer token
529
+ at a median of ~15 s, and a long tail. Capping the thinking budget removes the runaway tail. If
530
+ latency to a visible answer matters more than reasoning depth, serve with `THINK=0`.
531
+
532
+ ## Licenses and attribution
533
+
534
+ This repository contains **model weights only**, released under the **Apache License, Version 2.0**
535
+ (see [`LICENSE`](LICENSE)).
536
+
537
+ - **Model weights** — a 2-bit quantized derivative of Qwen3.6-35B-A3B (Apache-2.0, Qwen); base
538
+ license text at [`THIRD_PARTY_LICENSES/Qwen-LICENSE.txt`](THIRD_PARTY_LICENSES/Qwen-LICENSE.txt).
539
+ - **Tokenizer** — Qwen (`Qwen2Tokenizer`), Apache-2.0.
540
+ - **Chat template** — from
541
+ [froggeric/Qwen-Fixed-Chat-Templates](https://huggingface.co/froggeric/Qwen-Fixed-Chat-Templates)
542
+ (Apache-2.0, inherited from Qwen), which fixes tool-calling and thinking-mode handling for
543
+ this model family.
544
+
545
+ The **runtime** (the `escha` wheel: the SGLang serving fork + CUDA kernels, and their third-party
546
+ licenses — SGLang, exllamav3, AQLM, and the BSD-3/MIT upstreams vendored in SGLang) is distributed
547
+ separately and carries its own `LICENSE` + `THIRD_PARTY_LICENSES/`:
548
+ **[EschaLabs/escha-runtime-qwen3moe](https://huggingface.co/EschaLabs/escha-runtime-qwen3moe)**. All bundled code there is permissive
549
+ (Apache-2.0 / MIT / BSD-3-Clause) — no copyleft.
THIRD_PARTY_LICENSES/Qwen-LICENSE.txt ADDED
@@ -0,0 +1,201 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright 2024-2025 Alibaba Cloud (Qwen Team)
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
chat_template.jinja ADDED
@@ -0,0 +1,329 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {%- set template_version = "qwen3.6-froggeric-v21.3" %}
2
+ {%- set _tool_format = tool_call_format if tool_call_format is defined else 'xml' %}
3
+ {%- set image_count = namespace(value=0) %}
4
+ {%- set video_count = namespace(value=0) %}
5
+ {%- set add_vision_id = add_vision_id if add_vision_id is defined else false %}
6
+ {%- set enable_thinking = enable_thinking if enable_thinking is defined else true %}
7
+ {%- set auto_disable_thinking_with_tools = auto_disable_thinking_with_tools if auto_disable_thinking_with_tools is defined else false %}
8
+ {%- set _preserve_thinking = preserve_thinking if preserve_thinking is defined else true %}
9
+ {%- set max_tool_arg_chars = max_tool_arg_chars if max_tool_arg_chars is defined else 0 %}
10
+ {%- set max_tool_response_chars = max_tool_response_chars if max_tool_response_chars is defined else 0 %}
11
+ {%- set _has_tools = (tools is defined and tools and tools is iterable and tools is not mapping) %}
12
+ {%- set ns_state = namespace(thinking=enable_thinking) %}
13
+ {%- if auto_disable_thinking_with_tools and _has_tools %}
14
+ {%- set ns_state.thinking = false %}
15
+ {%- endif %}
16
+ {%- macro render_content(content, do_vision_count, is_system_content=false) %}
17
+ {%- if content is string %}
18
+ {{- content }}
19
+ {%- elif content is iterable and content is not mapping %}
20
+ {%- for item in content %}
21
+ {%- if item is mapping %}
22
+ {%- if item.type == 'image' or 'image' in item or 'image_url' in item %}
23
+ {%- if is_system_content %}
24
+ {{- raise_exception('System message cannot contain images.') }}
25
+ {%- endif %}
26
+ {%- if do_vision_count %}
27
+ {%- set image_count.value = image_count.value + 1 %}
28
+ {%- endif %}
29
+ {%- if add_vision_id %}
30
+ {{- 'Picture ' ~ image_count.value ~ ': ' }}
31
+ {%- endif %}
32
+ {{- '<|vision_start|><|image_pad|><|vision_end|>' }}
33
+ {%- elif item.type == 'video' or 'video' in item %}
34
+ {%- if is_system_content %}
35
+ {{- raise_exception('System message cannot contain videos.') }}
36
+ {%- endif %}
37
+ {%- if do_vision_count %}
38
+ {%- set video_count.value = video_count.value + 1 %}
39
+ {%- endif %}
40
+ {%- if add_vision_id %}
41
+ {{- 'Video ' ~ video_count.value ~ ': ' }}
42
+ {%- endif %}
43
+ {{- '<|vision_start|><|video_pad|><|vision_end|>' }}
44
+ {%- elif 'text' in item %}
45
+ {{- item.text }}
46
+ {%- else %}
47
+ {{- raise_exception('Unexpected item type in content.') }}
48
+ {%- endif %}
49
+ {%- else %}
50
+ {{- item | string }}
51
+ {%- endif %}
52
+ {%- endfor %}
53
+ {%- elif content is none or content is undefined %}
54
+ {{- '' }}
55
+ {%- else %}
56
+ {{- raise_exception('Unexpected content type.') }}
57
+ {%- endif %}
58
+ {%- endmacro %}
59
+ {%- if not messages %}
60
+ {{- raise_exception('No messages provided.') }}
61
+ {%- endif %}
62
+ {%- set _first_role = messages[0].role %}
63
+ {%- if _first_role == 'system' or _first_role == 'developer' %}
64
+ {%- set _sys_msg = messages[0] %}
65
+ {%- set _msgs = messages[1:] %}
66
+ {%- else %}
67
+ {%- set _sys_msg = none %}
68
+ {%- set _msgs = messages %}
69
+ {%- endif %}
70
+ {%- set _sc = '' %}
71
+ {%- if _sys_msg is not none %}
72
+ {%- set _sc = render_content(_sys_msg.content, false, true) | trim %}
73
+ {%- if '<|think_off|>' in _sc %}
74
+ {%- set ns_state.thinking = false %}
75
+ {%- set _sc = _sc.split('<|think_off|>') | join('') | trim %}
76
+ {%- elif '<|think_on|>' in _sc %}
77
+ {%- set ns_state.thinking = true %}
78
+ {%- set _sc = _sc.split('<|think_on|>') | join('') | trim %}
79
+ {%- endif %}
80
+ {%- endif %}
81
+ {%- if _has_tools %}
82
+ {{- '<|im_start|>system\n' }}
83
+ {{- '# Tools\n\nYou have access to the following functions:\n\n<tools>' }}
84
+ {%- for tool in tools %}
85
+ {{- '\n' }}
86
+ {{- tool | tojson }}
87
+ {%- endfor %}
88
+ {{- '\n</tools>' }}
89
+ {%- set tool_instructions %}
90
+ If you choose to call a function ONLY reply in the following format with NO suffix:
91
+
92
+ {%- if _tool_format == 'json' %}
93
+ <think>
94
+ Brief explanation of tool call
95
+ </think>
96
+ <tool_call>
97
+ {"name": "example_function_name", "arguments": {"example_parameter_1": "value_1", "example_parameter_2": "This is the value for the second parameter"}}
98
+ </tool_call>
99
+ {%- else %}
100
+ <think>
101
+ Brief explanation of tool call
102
+ </think>
103
+ <tool_call>
104
+ <function=example_function_name>
105
+ <parameter=example_parameter_1>
106
+ value_1
107
+ </parameter>
108
+ <parameter=example_parameter_2>
109
+ This is the value for the second parameter
110
+ that can span
111
+ multiple lines
112
+ </parameter>
113
+ </function>
114
+ </tool_call>
115
+ {%- endif %}
116
+
117
+ <IMPORTANT>
118
+ Reminder:
119
+ - You can use the <think></think> block to plan your next tool call OR to synthesize data and formulate your final response to the user.
120
+ - ALL explanation and reasoning MUST be placed strictly inside the <think></think> block.
121
+ {%- if _tool_format == 'json' %}
122
+ - Function calls MUST follow the specified format: a single JSON object with "name" and "arguments" keys inside <tool_call></tool_call> XML tags.
123
+ {%- else %}
124
+ - Function calls MUST follow the specified format: an inner <function=...></function> block must be nested within <tool_call></tool_call> XML tags.
125
+ {%- endif %}
126
+ - If you choose to call a tool, you MUST output the <tool_call> block IMMEDIATELY after thinking, with NO conversational text before it.
127
+ {%- if _tool_format == 'json' %}
128
+ - The <tool_call> tag MUST be at the very beginning of a new line, with NO spaces or indentation before it.
129
+ {%- else %}
130
+ - The <tool_call> and <function> tags MUST be at the very beginning of a new line, with NO spaces or indentation before them.
131
+ {%- endif %}
132
+ - To call multiple functions, output a separate, completely closed <tool_call></tool_call> block for EACH function. Do NOT nest <tool_call> blocks.
133
+ - If you have all necessary data, provide your final answer directly to the user without any tool call.
134
+ </IMPORTANT>
135
+ {%- endset %}
136
+ {{- '\n\n' ~ tool_instructions | trim }}
137
+ {%- if _sc %}
138
+ {{- '\n\n' + _sc }}
139
+ {%- endif %}
140
+ {{- '<|im_end|>\n' }}
141
+ {%- else %}
142
+ {%- if _sc %}
143
+ {{- '<|im_start|>system\n' + _sc + '<|im_end|>\n' }}
144
+ {%- endif %}
145
+ {%- endif %}
146
+ {%- set _last_idx = _msgs | length - 1 %}
147
+ {%- set ns = namespace(multi_step_tool=true, last_query_index=_last_idx) %}
148
+ {%- for message in _msgs[::-1] %}
149
+ {%- set index = (_msgs | length - 1) - loop.index0 %}
150
+ {%- if ns.multi_step_tool and message.role == 'user' %}
151
+ {%- set _rc = render_content(message.content, false) | trim %}
152
+ {%- if not (_rc.startswith('<tool_response>') and _rc.endswith('</tool_response>')) %}
153
+ {%- set ns.multi_step_tool = false %}
154
+ {%- set ns.last_query_index = index %}
155
+ {%- endif %}
156
+ {%- endif %}
157
+ {%- endfor %}
158
+ {%- if ns.multi_step_tool %}
159
+ {%- if _last_idx > 50 %}
160
+ {%- set ns.last_query_index = _last_idx %}
161
+ {%- else %}
162
+ {%- set ns.last_query_index = 0 %}
163
+ {%- endif %}
164
+ {%- endif %}
165
+ {%- set ns2 = namespace(prev_role='', consecutive_failures=0) %}
166
+ {%- for message in _msgs %}
167
+ {%- set is_system = (message.role == "system" or message.role == "developer") %}
168
+ {%- set content = render_content(message.content, true, is_system) | trim %}
169
+ {%- if is_system or message.role == 'user' %}
170
+ {%- if '<|think_off|>' in content %}
171
+ {%- set ns_state.thinking = false %}
172
+ {%- set content = content.split('<|think_off|>') | join('') | trim %}
173
+ {%- elif '<|think_on|>' in content %}
174
+ {%- set ns_state.thinking = true %}
175
+ {%- set content = content.split('<|think_on|>') | join('') | trim %}
176
+ {%- endif %}
177
+ {%- endif %}
178
+ {%- if is_system %}
179
+ {{- '<|im_start|>system\n' + content + '<|im_end|>\n' }}
180
+ {%- elif message.role == 'user' %}
181
+ {%- set ns2.consecutive_failures = 0 %}
182
+ {{- '<|im_start|>user\n' + content + '<|im_end|>\n' }}
183
+ {%- elif message.role == 'assistant' %}
184
+ {%- set reasoning_content = '' %}
185
+ {%- if message.reasoning_content is defined and message.reasoning_content is not none %}
186
+ {%- if message.reasoning_content is string %}
187
+ {%- set reasoning_content = message.reasoning_content %}
188
+ {%- else %}
189
+ {%- set reasoning_content = message.reasoning_content | string %}
190
+ {%- endif %}
191
+ {%- elif message.thinking is defined and message.thinking is not none %}
192
+ {%- if message.thinking is string %}
193
+ {%- set reasoning_content = message.thinking %}
194
+ {%- else %}
195
+ {%- set reasoning_content = message.thinking | string %}
196
+ {%- endif %}
197
+ {%- else %}
198
+ {%- set _think_end = '' %}
199
+ {%- if content.startswith('</think>') %}
200
+ {%- set _think_end = '</think>' %}
201
+ {%- elif content.startswith('</thinking>') %}
202
+ {%- set _think_end = '</thinking>' %}
203
+ {%- elif '\n</think>' in content %}
204
+ {%- set _think_end = '\n</think>' %}
205
+ {%- elif '\n</thinking>' in content %}
206
+ {%- set _think_end = '\n</thinking>' %}
207
+ {%- elif '\n</ think>' in content %}
208
+ {%- set _think_end = '\n</ think>' %}
209
+ {%- elif '\n</think >' in content %}
210
+ {%- set _think_end = '\n</think >' %}
211
+ {%- endif %}
212
+ {%- if _think_end %}
213
+ {%- if 'thinking' in _think_end %}
214
+ {%- set _think_start = '<thinking>' %}
215
+ {%- else %}
216
+ {%- set _think_start = '<think>' %}
217
+ {%- endif %}
218
+ {%- set reasoning_content = content.split(_think_end)[0].rstrip('\n') %}
219
+ {%- if _think_start in reasoning_content %}
220
+ {%- set reasoning_content = reasoning_content.split(_think_start)[-1].lstrip('\n') %}
221
+ {%- endif %}
222
+ {%- set content = content.split(_think_end)[-1].lstrip('\n') %}
223
+ {%- endif %}
224
+ {%- endif %}
225
+ {%- set reasoning_content = reasoning_content | trim %}
226
+ {%- if (_preserve_thinking or loop.index0 > ns.last_query_index) and reasoning_content %}
227
+ {{- '<|im_start|>assistant\n<think>\n' + reasoning_content + '\n</think>\n\n' + content }}
228
+ {%- else %}
229
+ {{- '<|im_start|>assistant\n' + content }}
230
+ {%- endif %}
231
+ {%- if message.tool_calls is defined and message.tool_calls and message.tool_calls is iterable and message.tool_calls is not mapping %}
232
+ {%- for tool_call in message.tool_calls %}
233
+ {%- if tool_call.function is defined and tool_call.function is not none %}
234
+ {%- set tc = tool_call.function %}
235
+ {%- else %}
236
+ {%- set tc = tool_call %}
237
+ {%- endif %}
238
+ {%- if _tool_format == 'json' %}
239
+ {%- if not loop.first or content | trim %}
240
+ {{- '\n\n' }}
241
+ {%- endif %}
242
+ {%- set _args = '{}' %}
243
+ {%- if tc.arguments is defined and tc.arguments is not none %}
244
+ {%- if tc.arguments is mapping %}
245
+ {%- set _args = tc.arguments | tojson %}
246
+ {%- elif tc.arguments is string and tc.arguments %}
247
+ {%- set _args = tc.arguments %}
248
+ {%- endif %}
249
+ {%- endif %}
250
+ {{- '<tool_call>\n{"name": ' }}{{- tc.name | tojson }}{{- ', "arguments": ' }}{{- _args }}{{- '}\n</tool_call>' }}
251
+ {%- else %}
252
+ {%- if loop.first %}
253
+ {%- if content | trim %}
254
+ {{- '\n\n<tool_call>\n<function=' + tc.name + '>\n' }}
255
+ {%- else %}
256
+ {{- '<tool_call>\n<function=' + tc.name + '>\n' }}
257
+ {%- endif %}
258
+ {%- else %}
259
+ {{- '\n\n<tool_call>\n<function=' + tc.name + '>\n' }}
260
+ {%- endif %}
261
+ {%- if tc.arguments is defined and tc.arguments is not none %}
262
+ {%- if tc.arguments is mapping %}
263
+ {%- for args_name, args_value in tc.arguments.items() %}
264
+ {{- '<parameter=' + args_name + '>\n' }}
265
+ {%- if args_value is mapping or (args_value is sequence and args_value is not string) %}
266
+ {%- set _av = args_value | tojson %}
267
+ {%- else %}
268
+ {%- set _av = args_value | string %}
269
+ {%- endif %}
270
+ {%- if max_tool_arg_chars > 0 and _av | length > max_tool_arg_chars %}
271
+ {{- _av[:max_tool_arg_chars] + '\n[TRUNCATED — original length ' ~ (_av | length | string) ~ ' chars]' }}
272
+ {%- else %}
273
+ {{- _av }}
274
+ {%- endif %}
275
+ {{- '\n</parameter>\n' }}
276
+ {%- endfor %}
277
+ {%- elif tc.arguments is string and tc.arguments %}
278
+ {{- tc.arguments }}
279
+ {%- endif %}
280
+ {%- endif %}
281
+ {{- '</function>\n</tool_call>' }}
282
+ {%- endif %}
283
+ {%- endfor %}
284
+ {%- endif %}
285
+ {{- '<|im_end|>\n' }}
286
+ {%- elif message.role == 'tool' %}
287
+ {%- set _content_lower = content | lower %}
288
+ {%- set _content_head = _content_lower[:80] %}
289
+ {%- if content | length < 500 and '$ ' not in content and 'took ' not in _content_lower and ('"error":' in _content_head or 'error:' in _content_head or 'err!' in _content_head or 'fatal:' in _content_head or 'exception:' in _content_head or 'traceback' in _content_head or 'command not found' in _content_head or 'invalid syntax' in _content_head or 'failed to' in _content_head) %}
290
+ {%- set ns2.consecutive_failures = ns2.consecutive_failures + 1 %}
291
+ {%- else %}
292
+ {%- set ns2.consecutive_failures = 0 %}
293
+ {%- endif %}
294
+ {%- if ns2.prev_role != 'tool' %}
295
+ {{- '<|im_start|>user' }}
296
+ {%- endif %}
297
+ {%- if max_tool_response_chars > 0 and content | length > max_tool_response_chars %}
298
+ {%- set content = content[:max_tool_response_chars] + '\n[TRUNCATED — original length ' ~ (content | length | string) ~ ' chars]' %}
299
+ {%- endif %}
300
+ {{- '\n<tool_response>\n' + content }}
301
+ {%- if ns2.consecutive_failures >= 2 %}
302
+ {{- '\n\n⚠️ SYSTEM WARNING: ' ~ ns2.consecutive_failures ~ ' consecutive tool errors detected. Your previous approach is incorrect. You MUST use a fundamentally different approach or corrected arguments.' }}
303
+ {%- elif ns2.consecutive_failures == 1 %}
304
+ {{- '\n\n⚠️ SYSTEM WARNING: The previous tool call returned an error. Diagnose the failure and retry with completely corrected arguments.' }}
305
+ {%- endif %}
306
+ {{- '\n</tool_response>' }}
307
+ {%- if loop.last %}
308
+ {{- '<|im_end|>\n' }}
309
+ {%- else %}
310
+ {%- set _next_role = _msgs[loop.index0 + 1].role %}
311
+ {%- if _next_role != 'tool' %}
312
+ {{- '<|im_end|>\n' }}
313
+ {%- endif %}
314
+ {%- endif %}
315
+ {%- else %}
316
+ {{- '<|im_start|>user\n[' + message.role + ']: ' + content + '<|im_end|>\n' }}
317
+ {%- endif %}
318
+ {%- set ns2.prev_role = message.role %}
319
+ {%- endfor %}
320
+ {%- if add_generation_prompt %}
321
+ {{- '<|im_start|>assistant\n' }}
322
+ {%- if not ns_state.thinking %}
323
+ {{- '<think>\n\n</think>\n\n' }}
324
+ {%- elif ns2.consecutive_failures >= 2 %}
325
+ {{- '<think>\n\n</think>\n\n' }}
326
+ {%- else %}
327
+ {{- '<think>\n' }}
328
+ {%- endif %}
329
+ {%- endif %}
config.json ADDED
@@ -0,0 +1,871 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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": "5.8.0",
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
+ "quantization_config": {
120
+ "quant_method": "eschamoe",
121
+ "format_version": "2.0",
122
+ "global_config": {
123
+ "bits": 2.0,
124
+ "num_experts": 256,
125
+ "experts_kind": "qwen35moe"
126
+ },
127
+ "layer_meta": {
128
+ "model.language_model.layers.0.mlp.experts.gate_up_proj": {
129
+ "bits": 2.0,
130
+ "K": 2,
131
+ "num_experts": 256,
132
+ "in_features": 2048,
133
+ "out_features": 1024,
134
+ "in_p": 2048,
135
+ "out_p": 1024
136
+ },
137
+ "model.language_model.layers.0.mlp.experts.down_proj": {
138
+ "bits": 3.0,
139
+ "K": 3,
140
+ "num_experts": 256,
141
+ "in_features": 512,
142
+ "out_features": 2048,
143
+ "in_p": 512,
144
+ "out_p": 2048
145
+ },
146
+ "model.language_model.layers.1.mlp.experts.gate_up_proj": {
147
+ "bits": 2.0,
148
+ "K": 2,
149
+ "num_experts": 256,
150
+ "in_features": 2048,
151
+ "out_features": 1024,
152
+ "in_p": 2048,
153
+ "out_p": 1024
154
+ },
155
+ "model.language_model.layers.1.mlp.experts.down_proj": {
156
+ "bits": 3.0,
157
+ "K": 3,
158
+ "num_experts": 256,
159
+ "in_features": 512,
160
+ "out_features": 2048,
161
+ "in_p": 512,
162
+ "out_p": 2048
163
+ },
164
+ "model.language_model.layers.2.mlp.experts.gate_up_proj": {
165
+ "bits": 2.0,
166
+ "K": 2,
167
+ "num_experts": 256,
168
+ "in_features": 2048,
169
+ "out_features": 1024,
170
+ "in_p": 2048,
171
+ "out_p": 1024
172
+ },
173
+ "model.language_model.layers.2.mlp.experts.down_proj": {
174
+ "bits": 3.0,
175
+ "K": 3,
176
+ "num_experts": 256,
177
+ "in_features": 512,
178
+ "out_features": 2048,
179
+ "in_p": 512,
180
+ "out_p": 2048
181
+ },
182
+ "model.language_model.layers.3.mlp.experts.gate_up_proj": {
183
+ "bits": 2.0,
184
+ "K": 2,
185
+ "num_experts": 256,
186
+ "in_features": 2048,
187
+ "out_features": 1024,
188
+ "in_p": 2048,
189
+ "out_p": 1024
190
+ },
191
+ "model.language_model.layers.3.mlp.experts.down_proj": {
192
+ "bits": 3.0,
193
+ "K": 3,
194
+ "num_experts": 256,
195
+ "in_features": 512,
196
+ "out_features": 2048,
197
+ "in_p": 512,
198
+ "out_p": 2048
199
+ },
200
+ "model.language_model.layers.4.mlp.experts.gate_up_proj": {
201
+ "bits": 2.0,
202
+ "K": 2,
203
+ "num_experts": 256,
204
+ "in_features": 2048,
205
+ "out_features": 1024,
206
+ "in_p": 2048,
207
+ "out_p": 1024
208
+ },
209
+ "model.language_model.layers.4.mlp.experts.down_proj": {
210
+ "bits": 3.0,
211
+ "K": 3,
212
+ "num_experts": 256,
213
+ "in_features": 512,
214
+ "out_features": 2048,
215
+ "in_p": 512,
216
+ "out_p": 2048
217
+ },
218
+ "model.language_model.layers.5.mlp.experts.gate_up_proj": {
219
+ "bits": 2.0,
220
+ "K": 2,
221
+ "num_experts": 256,
222
+ "in_features": 2048,
223
+ "out_features": 1024,
224
+ "in_p": 2048,
225
+ "out_p": 1024
226
+ },
227
+ "model.language_model.layers.5.mlp.experts.down_proj": {
228
+ "bits": 3.0,
229
+ "K": 3,
230
+ "num_experts": 256,
231
+ "in_features": 512,
232
+ "out_features": 2048,
233
+ "in_p": 512,
234
+ "out_p": 2048
235
+ },
236
+ "model.language_model.layers.6.mlp.experts.gate_up_proj": {
237
+ "bits": 2.0,
238
+ "K": 2,
239
+ "num_experts": 256,
240
+ "in_features": 2048,
241
+ "out_features": 1024,
242
+ "in_p": 2048,
243
+ "out_p": 1024
244
+ },
245
+ "model.language_model.layers.6.mlp.experts.down_proj": {
246
+ "bits": 3.0,
247
+ "K": 3,
248
+ "num_experts": 256,
249
+ "in_features": 512,
250
+ "out_features": 2048,
251
+ "in_p": 512,
252
+ "out_p": 2048
253
+ },
254
+ "model.language_model.layers.7.mlp.experts.gate_up_proj": {
255
+ "bits": 2.0,
256
+ "K": 2,
257
+ "num_experts": 256,
258
+ "in_features": 2048,
259
+ "out_features": 1024,
260
+ "in_p": 2048,
261
+ "out_p": 1024
262
+ },
263
+ "model.language_model.layers.7.mlp.experts.down_proj": {
264
+ "bits": 3.0,
265
+ "K": 3,
266
+ "num_experts": 256,
267
+ "in_features": 512,
268
+ "out_features": 2048,
269
+ "in_p": 512,
270
+ "out_p": 2048
271
+ },
272
+ "model.language_model.layers.8.mlp.experts.gate_up_proj": {
273
+ "bits": 2.0,
274
+ "K": 2,
275
+ "num_experts": 256,
276
+ "in_features": 2048,
277
+ "out_features": 1024,
278
+ "in_p": 2048,
279
+ "out_p": 1024
280
+ },
281
+ "model.language_model.layers.8.mlp.experts.down_proj": {
282
+ "bits": 3.0,
283
+ "K": 3,
284
+ "num_experts": 256,
285
+ "in_features": 512,
286
+ "out_features": 2048,
287
+ "in_p": 512,
288
+ "out_p": 2048
289
+ },
290
+ "model.language_model.layers.9.mlp.experts.gate_up_proj": {
291
+ "bits": 2.0,
292
+ "K": 2,
293
+ "num_experts": 256,
294
+ "in_features": 2048,
295
+ "out_features": 1024,
296
+ "in_p": 2048,
297
+ "out_p": 1024
298
+ },
299
+ "model.language_model.layers.9.mlp.experts.down_proj": {
300
+ "bits": 3.0,
301
+ "K": 3,
302
+ "num_experts": 256,
303
+ "in_features": 512,
304
+ "out_features": 2048,
305
+ "in_p": 512,
306
+ "out_p": 2048
307
+ },
308
+ "model.language_model.layers.10.mlp.experts.gate_up_proj": {
309
+ "bits": 2.0,
310
+ "K": 2,
311
+ "num_experts": 256,
312
+ "in_features": 2048,
313
+ "out_features": 1024,
314
+ "in_p": 2048,
315
+ "out_p": 1024
316
+ },
317
+ "model.language_model.layers.10.mlp.experts.down_proj": {
318
+ "bits": 3.0,
319
+ "K": 3,
320
+ "num_experts": 256,
321
+ "in_features": 512,
322
+ "out_features": 2048,
323
+ "in_p": 512,
324
+ "out_p": 2048
325
+ },
326
+ "model.language_model.layers.11.mlp.experts.gate_up_proj": {
327
+ "bits": 2.0,
328
+ "K": 2,
329
+ "num_experts": 256,
330
+ "in_features": 2048,
331
+ "out_features": 1024,
332
+ "in_p": 2048,
333
+ "out_p": 1024
334
+ },
335
+ "model.language_model.layers.11.mlp.experts.down_proj": {
336
+ "bits": 3.0,
337
+ "K": 3,
338
+ "num_experts": 256,
339
+ "in_features": 512,
340
+ "out_features": 2048,
341
+ "in_p": 512,
342
+ "out_p": 2048
343
+ },
344
+ "model.language_model.layers.12.mlp.experts.gate_up_proj": {
345
+ "bits": 2.0,
346
+ "K": 2,
347
+ "num_experts": 256,
348
+ "in_features": 2048,
349
+ "out_features": 1024,
350
+ "in_p": 2048,
351
+ "out_p": 1024
352
+ },
353
+ "model.language_model.layers.12.mlp.experts.down_proj": {
354
+ "bits": 3.0,
355
+ "K": 3,
356
+ "num_experts": 256,
357
+ "in_features": 512,
358
+ "out_features": 2048,
359
+ "in_p": 512,
360
+ "out_p": 2048
361
+ },
362
+ "model.language_model.layers.13.mlp.experts.gate_up_proj": {
363
+ "bits": 2.0,
364
+ "K": 2,
365
+ "num_experts": 256,
366
+ "in_features": 2048,
367
+ "out_features": 1024,
368
+ "in_p": 2048,
369
+ "out_p": 1024
370
+ },
371
+ "model.language_model.layers.13.mlp.experts.down_proj": {
372
+ "bits": 3.0,
373
+ "K": 3,
374
+ "num_experts": 256,
375
+ "in_features": 512,
376
+ "out_features": 2048,
377
+ "in_p": 512,
378
+ "out_p": 2048
379
+ },
380
+ "model.language_model.layers.14.mlp.experts.gate_up_proj": {
381
+ "bits": 2.0,
382
+ "K": 2,
383
+ "num_experts": 256,
384
+ "in_features": 2048,
385
+ "out_features": 1024,
386
+ "in_p": 2048,
387
+ "out_p": 1024
388
+ },
389
+ "model.language_model.layers.14.mlp.experts.down_proj": {
390
+ "bits": 3.0,
391
+ "K": 3,
392
+ "num_experts": 256,
393
+ "in_features": 512,
394
+ "out_features": 2048,
395
+ "in_p": 512,
396
+ "out_p": 2048
397
+ },
398
+ "model.language_model.layers.15.mlp.experts.gate_up_proj": {
399
+ "bits": 2.0,
400
+ "K": 2,
401
+ "num_experts": 256,
402
+ "in_features": 2048,
403
+ "out_features": 1024,
404
+ "in_p": 2048,
405
+ "out_p": 1024
406
+ },
407
+ "model.language_model.layers.15.mlp.experts.down_proj": {
408
+ "bits": 3.0,
409
+ "K": 3,
410
+ "num_experts": 256,
411
+ "in_features": 512,
412
+ "out_features": 2048,
413
+ "in_p": 512,
414
+ "out_p": 2048
415
+ },
416
+ "model.language_model.layers.16.mlp.experts.gate_up_proj": {
417
+ "bits": 2.0,
418
+ "K": 2,
419
+ "num_experts": 256,
420
+ "in_features": 2048,
421
+ "out_features": 1024,
422
+ "in_p": 2048,
423
+ "out_p": 1024
424
+ },
425
+ "model.language_model.layers.16.mlp.experts.down_proj": {
426
+ "bits": 3.0,
427
+ "K": 3,
428
+ "num_experts": 256,
429
+ "in_features": 512,
430
+ "out_features": 2048,
431
+ "in_p": 512,
432
+ "out_p": 2048
433
+ },
434
+ "model.language_model.layers.17.mlp.experts.gate_up_proj": {
435
+ "bits": 2.0,
436
+ "K": 2,
437
+ "num_experts": 256,
438
+ "in_features": 2048,
439
+ "out_features": 1024,
440
+ "in_p": 2048,
441
+ "out_p": 1024
442
+ },
443
+ "model.language_model.layers.17.mlp.experts.down_proj": {
444
+ "bits": 3.0,
445
+ "K": 3,
446
+ "num_experts": 256,
447
+ "in_features": 512,
448
+ "out_features": 2048,
449
+ "in_p": 512,
450
+ "out_p": 2048
451
+ },
452
+ "model.language_model.layers.18.mlp.experts.gate_up_proj": {
453
+ "bits": 2.0,
454
+ "K": 2,
455
+ "num_experts": 256,
456
+ "in_features": 2048,
457
+ "out_features": 1024,
458
+ "in_p": 2048,
459
+ "out_p": 1024
460
+ },
461
+ "model.language_model.layers.18.mlp.experts.down_proj": {
462
+ "bits": 3.0,
463
+ "K": 3,
464
+ "num_experts": 256,
465
+ "in_features": 512,
466
+ "out_features": 2048,
467
+ "in_p": 512,
468
+ "out_p": 2048
469
+ },
470
+ "model.language_model.layers.19.mlp.experts.gate_up_proj": {
471
+ "bits": 2.0,
472
+ "K": 2,
473
+ "num_experts": 256,
474
+ "in_features": 2048,
475
+ "out_features": 1024,
476
+ "in_p": 2048,
477
+ "out_p": 1024
478
+ },
479
+ "model.language_model.layers.19.mlp.experts.down_proj": {
480
+ "bits": 3.0,
481
+ "K": 3,
482
+ "num_experts": 256,
483
+ "in_features": 512,
484
+ "out_features": 2048,
485
+ "in_p": 512,
486
+ "out_p": 2048
487
+ },
488
+ "model.language_model.layers.20.mlp.experts.gate_up_proj": {
489
+ "bits": 2.0,
490
+ "K": 2,
491
+ "num_experts": 256,
492
+ "in_features": 2048,
493
+ "out_features": 1024,
494
+ "in_p": 2048,
495
+ "out_p": 1024
496
+ },
497
+ "model.language_model.layers.20.mlp.experts.down_proj": {
498
+ "bits": 3.0,
499
+ "K": 3,
500
+ "num_experts": 256,
501
+ "in_features": 512,
502
+ "out_features": 2048,
503
+ "in_p": 512,
504
+ "out_p": 2048
505
+ },
506
+ "model.language_model.layers.21.mlp.experts.gate_up_proj": {
507
+ "bits": 2.0,
508
+ "K": 2,
509
+ "num_experts": 256,
510
+ "in_features": 2048,
511
+ "out_features": 1024,
512
+ "in_p": 2048,
513
+ "out_p": 1024
514
+ },
515
+ "model.language_model.layers.21.mlp.experts.down_proj": {
516
+ "bits": 3.0,
517
+ "K": 3,
518
+ "num_experts": 256,
519
+ "in_features": 512,
520
+ "out_features": 2048,
521
+ "in_p": 512,
522
+ "out_p": 2048
523
+ },
524
+ "model.language_model.layers.22.mlp.experts.gate_up_proj": {
525
+ "bits": 2.0,
526
+ "K": 2,
527
+ "num_experts": 256,
528
+ "in_features": 2048,
529
+ "out_features": 1024,
530
+ "in_p": 2048,
531
+ "out_p": 1024
532
+ },
533
+ "model.language_model.layers.22.mlp.experts.down_proj": {
534
+ "bits": 3.0,
535
+ "K": 3,
536
+ "num_experts": 256,
537
+ "in_features": 512,
538
+ "out_features": 2048,
539
+ "in_p": 512,
540
+ "out_p": 2048
541
+ },
542
+ "model.language_model.layers.23.mlp.experts.gate_up_proj": {
543
+ "bits": 2.0,
544
+ "K": 2,
545
+ "num_experts": 256,
546
+ "in_features": 2048,
547
+ "out_features": 1024,
548
+ "in_p": 2048,
549
+ "out_p": 1024
550
+ },
551
+ "model.language_model.layers.23.mlp.experts.down_proj": {
552
+ "bits": 3.0,
553
+ "K": 3,
554
+ "num_experts": 256,
555
+ "in_features": 512,
556
+ "out_features": 2048,
557
+ "in_p": 512,
558
+ "out_p": 2048
559
+ },
560
+ "model.language_model.layers.24.mlp.experts.gate_up_proj": {
561
+ "bits": 2.0,
562
+ "K": 2,
563
+ "num_experts": 256,
564
+ "in_features": 2048,
565
+ "out_features": 1024,
566
+ "in_p": 2048,
567
+ "out_p": 1024
568
+ },
569
+ "model.language_model.layers.24.mlp.experts.down_proj": {
570
+ "bits": 3.0,
571
+ "K": 3,
572
+ "num_experts": 256,
573
+ "in_features": 512,
574
+ "out_features": 2048,
575
+ "in_p": 512,
576
+ "out_p": 2048
577
+ },
578
+ "model.language_model.layers.25.mlp.experts.gate_up_proj": {
579
+ "bits": 2.0,
580
+ "K": 2,
581
+ "num_experts": 256,
582
+ "in_features": 2048,
583
+ "out_features": 1024,
584
+ "in_p": 2048,
585
+ "out_p": 1024
586
+ },
587
+ "model.language_model.layers.25.mlp.experts.down_proj": {
588
+ "bits": 3.0,
589
+ "K": 3,
590
+ "num_experts": 256,
591
+ "in_features": 512,
592
+ "out_features": 2048,
593
+ "in_p": 512,
594
+ "out_p": 2048
595
+ },
596
+ "model.language_model.layers.26.mlp.experts.gate_up_proj": {
597
+ "bits": 2.0,
598
+ "K": 2,
599
+ "num_experts": 256,
600
+ "in_features": 2048,
601
+ "out_features": 1024,
602
+ "in_p": 2048,
603
+ "out_p": 1024
604
+ },
605
+ "model.language_model.layers.26.mlp.experts.down_proj": {
606
+ "bits": 3.0,
607
+ "K": 3,
608
+ "num_experts": 256,
609
+ "in_features": 512,
610
+ "out_features": 2048,
611
+ "in_p": 512,
612
+ "out_p": 2048
613
+ },
614
+ "model.language_model.layers.27.mlp.experts.gate_up_proj": {
615
+ "bits": 2.0,
616
+ "K": 2,
617
+ "num_experts": 256,
618
+ "in_features": 2048,
619
+ "out_features": 1024,
620
+ "in_p": 2048,
621
+ "out_p": 1024
622
+ },
623
+ "model.language_model.layers.27.mlp.experts.down_proj": {
624
+ "bits": 3.0,
625
+ "K": 3,
626
+ "num_experts": 256,
627
+ "in_features": 512,
628
+ "out_features": 2048,
629
+ "in_p": 512,
630
+ "out_p": 2048
631
+ },
632
+ "model.language_model.layers.28.mlp.experts.gate_up_proj": {
633
+ "bits": 2.0,
634
+ "K": 2,
635
+ "num_experts": 256,
636
+ "in_features": 2048,
637
+ "out_features": 1024,
638
+ "in_p": 2048,
639
+ "out_p": 1024
640
+ },
641
+ "model.language_model.layers.28.mlp.experts.down_proj": {
642
+ "bits": 3.0,
643
+ "K": 3,
644
+ "num_experts": 256,
645
+ "in_features": 512,
646
+ "out_features": 2048,
647
+ "in_p": 512,
648
+ "out_p": 2048
649
+ },
650
+ "model.language_model.layers.29.mlp.experts.gate_up_proj": {
651
+ "bits": 2.0,
652
+ "K": 2,
653
+ "num_experts": 256,
654
+ "in_features": 2048,
655
+ "out_features": 1024,
656
+ "in_p": 2048,
657
+ "out_p": 1024
658
+ },
659
+ "model.language_model.layers.29.mlp.experts.down_proj": {
660
+ "bits": 3.0,
661
+ "K": 3,
662
+ "num_experts": 256,
663
+ "in_features": 512,
664
+ "out_features": 2048,
665
+ "in_p": 512,
666
+ "out_p": 2048
667
+ },
668
+ "model.language_model.layers.30.mlp.experts.gate_up_proj": {
669
+ "bits": 2.0,
670
+ "K": 2,
671
+ "num_experts": 256,
672
+ "in_features": 2048,
673
+ "out_features": 1024,
674
+ "in_p": 2048,
675
+ "out_p": 1024
676
+ },
677
+ "model.language_model.layers.30.mlp.experts.down_proj": {
678
+ "bits": 3.0,
679
+ "K": 3,
680
+ "num_experts": 256,
681
+ "in_features": 512,
682
+ "out_features": 2048,
683
+ "in_p": 512,
684
+ "out_p": 2048
685
+ },
686
+ "model.language_model.layers.31.mlp.experts.gate_up_proj": {
687
+ "bits": 2.0,
688
+ "K": 2,
689
+ "num_experts": 256,
690
+ "in_features": 2048,
691
+ "out_features": 1024,
692
+ "in_p": 2048,
693
+ "out_p": 1024
694
+ },
695
+ "model.language_model.layers.31.mlp.experts.down_proj": {
696
+ "bits": 3.0,
697
+ "K": 3,
698
+ "num_experts": 256,
699
+ "in_features": 512,
700
+ "out_features": 2048,
701
+ "in_p": 512,
702
+ "out_p": 2048
703
+ },
704
+ "model.language_model.layers.32.mlp.experts.gate_up_proj": {
705
+ "bits": 2.0,
706
+ "K": 2,
707
+ "num_experts": 256,
708
+ "in_features": 2048,
709
+ "out_features": 1024,
710
+ "in_p": 2048,
711
+ "out_p": 1024
712
+ },
713
+ "model.language_model.layers.32.mlp.experts.down_proj": {
714
+ "bits": 3.0,
715
+ "K": 3,
716
+ "num_experts": 256,
717
+ "in_features": 512,
718
+ "out_features": 2048,
719
+ "in_p": 512,
720
+ "out_p": 2048
721
+ },
722
+ "model.language_model.layers.33.mlp.experts.gate_up_proj": {
723
+ "bits": 2.0,
724
+ "K": 2,
725
+ "num_experts": 256,
726
+ "in_features": 2048,
727
+ "out_features": 1024,
728
+ "in_p": 2048,
729
+ "out_p": 1024
730
+ },
731
+ "model.language_model.layers.33.mlp.experts.down_proj": {
732
+ "bits": 3.0,
733
+ "K": 3,
734
+ "num_experts": 256,
735
+ "in_features": 512,
736
+ "out_features": 2048,
737
+ "in_p": 512,
738
+ "out_p": 2048
739
+ },
740
+ "model.language_model.layers.34.mlp.experts.gate_up_proj": {
741
+ "bits": 2.0,
742
+ "K": 2,
743
+ "num_experts": 256,
744
+ "in_features": 2048,
745
+ "out_features": 1024,
746
+ "in_p": 2048,
747
+ "out_p": 1024
748
+ },
749
+ "model.language_model.layers.34.mlp.experts.down_proj": {
750
+ "bits": 3.0,
751
+ "K": 3,
752
+ "num_experts": 256,
753
+ "in_features": 512,
754
+ "out_features": 2048,
755
+ "in_p": 512,
756
+ "out_p": 2048
757
+ },
758
+ "model.language_model.layers.35.mlp.experts.gate_up_proj": {
759
+ "bits": 2.0,
760
+ "K": 2,
761
+ "num_experts": 256,
762
+ "in_features": 2048,
763
+ "out_features": 1024,
764
+ "in_p": 2048,
765
+ "out_p": 1024
766
+ },
767
+ "model.language_model.layers.35.mlp.experts.down_proj": {
768
+ "bits": 3.0,
769
+ "K": 3,
770
+ "num_experts": 256,
771
+ "in_features": 512,
772
+ "out_features": 2048,
773
+ "in_p": 512,
774
+ "out_p": 2048
775
+ },
776
+ "model.language_model.layers.36.mlp.experts.gate_up_proj": {
777
+ "bits": 2.0,
778
+ "K": 2,
779
+ "num_experts": 256,
780
+ "in_features": 2048,
781
+ "out_features": 1024,
782
+ "in_p": 2048,
783
+ "out_p": 1024
784
+ },
785
+ "model.language_model.layers.36.mlp.experts.down_proj": {
786
+ "bits": 3.0,
787
+ "K": 3,
788
+ "num_experts": 256,
789
+ "in_features": 512,
790
+ "out_features": 2048,
791
+ "in_p": 512,
792
+ "out_p": 2048
793
+ },
794
+ "model.language_model.layers.37.mlp.experts.gate_up_proj": {
795
+ "bits": 2.0,
796
+ "K": 2,
797
+ "num_experts": 256,
798
+ "in_features": 2048,
799
+ "out_features": 1024,
800
+ "in_p": 2048,
801
+ "out_p": 1024
802
+ },
803
+ "model.language_model.layers.37.mlp.experts.down_proj": {
804
+ "bits": 3.0,
805
+ "K": 3,
806
+ "num_experts": 256,
807
+ "in_features": 512,
808
+ "out_features": 2048,
809
+ "in_p": 512,
810
+ "out_p": 2048
811
+ },
812
+ "model.language_model.layers.38.mlp.experts.gate_up_proj": {
813
+ "bits": 2.0,
814
+ "K": 2,
815
+ "num_experts": 256,
816
+ "in_features": 2048,
817
+ "out_features": 1024,
818
+ "in_p": 2048,
819
+ "out_p": 1024
820
+ },
821
+ "model.language_model.layers.38.mlp.experts.down_proj": {
822
+ "bits": 3.0,
823
+ "K": 3,
824
+ "num_experts": 256,
825
+ "in_features": 512,
826
+ "out_features": 2048,
827
+ "in_p": 512,
828
+ "out_p": 2048
829
+ },
830
+ "model.language_model.layers.39.mlp.experts.gate_up_proj": {
831
+ "bits": 2.0,
832
+ "K": 2,
833
+ "num_experts": 256,
834
+ "in_features": 2048,
835
+ "out_features": 1024,
836
+ "in_p": 2048,
837
+ "out_p": 1024
838
+ },
839
+ "model.language_model.layers.39.mlp.experts.down_proj": {
840
+ "bits": 3.0,
841
+ "K": 3,
842
+ "num_experts": 256,
843
+ "in_features": 512,
844
+ "out_features": 2048,
845
+ "in_p": 512,
846
+ "out_p": 2048
847
+ }
848
+ },
849
+ "ignore": [
850
+ "A_log",
851
+ "conv1d",
852
+ "dt_bias",
853
+ "embed_tokens",
854
+ "in_proj_a",
855
+ "in_proj_b",
856
+ "input_layernorm",
857
+ "k_norm",
858
+ "lm_head",
859
+ "mlp.gate",
860
+ "norm",
861
+ "post_attention_layernorm",
862
+ "q_norm",
863
+ "shared_expert_gate",
864
+ "visual"
865
+ ],
866
+ "fold_scales": true,
867
+ "int8_embedding": true,
868
+ "non_expert_int8": true,
869
+ "key_prefix": "model.language_model"
870
+ }
871
+ }
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
+ }
merges.txt ADDED
The diff for this file is too large to render. See raw diff
 
model-00001-of-00003.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c7e39d727094a68e0ceed6beccd3fbab028570dd1e0ff97f6e182639e18ef466
3
+ size 5366375728
model-00002-of-00003.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:78af47edbb6fae23d352c630b1007ae5b77e1a04692d567290f469ada73419a6
3
+ size 5311797632
model-00003-of-00003.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:92f61ba609bd78437eb9a466dd15249007dcdf49facd808ec5b756d580df10f9
3
+ size 1618779120
model.safetensors.index.json ADDED
The diff for this file is too large to render. See raw diff
 
opencode.json ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "$schema": "https://opencode.ai/config.json",
3
+
4
+ "model": "escha/escha-qwen36-35b-a3b-w2",
5
+ "small_model": "escha/escha-qwen36-35b-a3b-w2",
6
+
7
+ "provider": {
8
+ "escha": {
9
+ "npm": "@ai-sdk/openai-compatible",
10
+ "name": "Escha (local)",
11
+ "options": {
12
+ "baseURL": "http://127.0.0.1:30000/v1",
13
+ "apiKey": "not-needed"
14
+ },
15
+ "models": {
16
+ "escha-qwen36-35b-a3b-w2": {
17
+ "name": "Qwen3.6-35B-A3B 2-bit",
18
+ "tools": true,
19
+ "reasoning": true,
20
+ "options": {
21
+ "temperature": 0.6,
22
+ "top_p": 0.95
23
+ }
24
+ }
25
+ }
26
+ }
27
+ }
28
+ }
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
+ }
quantize_config.json ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ {
2
+ "quant_method": "eschamoe",
3
+ "bits": 2.0
4
+ }
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 template_version = \"qwen3.6-froggeric-v21.3\" %}\n{%- set _tool_format = tool_call_format if tool_call_format is defined else 'xml' %}\n{%- set image_count = namespace(value=0) %}\n{%- set video_count = namespace(value=0) %}\n{%- set add_vision_id = add_vision_id if add_vision_id is defined else false %}\n{%- set enable_thinking = enable_thinking if enable_thinking is defined else true %}\n{%- set auto_disable_thinking_with_tools = auto_disable_thinking_with_tools if auto_disable_thinking_with_tools is defined else false %}\n{%- set _preserve_thinking = preserve_thinking if preserve_thinking is defined else true %}\n{%- set max_tool_arg_chars = max_tool_arg_chars if max_tool_arg_chars is defined else 0 %}\n{%- set max_tool_response_chars = max_tool_response_chars if max_tool_response_chars is defined else 0 %}\n{%- set _has_tools = (tools is defined and tools and tools is iterable and tools is not mapping) %}\n{%- set ns_state = namespace(thinking=enable_thinking) %}\n{%- if auto_disable_thinking_with_tools and _has_tools %}\n {%- set ns_state.thinking = false %}\n{%- endif %}\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 item is mapping %}\n {%- if item.type == 'image' or 'image' in item or 'image_url' in item %}\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 item.type == 'video' or 'video' in item %}\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 {%- else %}\n {{- item | string }}\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{%- set _first_role = messages[0].role %}\n{%- if _first_role == 'system' or _first_role == 'developer' %}\n {%- set _sys_msg = messages[0] %}\n {%- set _msgs = messages[1:] %}\n{%- else %}\n {%- set _sys_msg = none %}\n {%- set _msgs = messages %}\n{%- endif %}\n{%- set _sc = '' %}\n{%- if _sys_msg is not none %}\n {%- set _sc = render_content(_sys_msg.content, false, true) | trim %}\n {%- if '<|think_off|>' in _sc %}\n {%- set ns_state.thinking = false %}\n {%- set _sc = _sc.split('<|think_off|>') | join('') | trim %}\n {%- elif '<|think_on|>' in _sc %}\n {%- set ns_state.thinking = true %}\n {%- set _sc = _sc.split('<|think_on|>') | join('') | trim %}\n {%- endif %}\n{%- endif %}\n{%- if _has_tools %}\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 {%- set tool_instructions %}\nIf you choose to call a function ONLY reply in the following format with NO suffix:\n\n{%- if _tool_format == 'json' %}\n<think>\nBrief explanation of tool call\n</think>\n<tool_call>\n{\"name\": \"example_function_name\", \"arguments\": {\"example_parameter_1\": \"value_1\", \"example_parameter_2\": \"This is the value for the second parameter\"}}\n</tool_call>\n{%- else %}\n<think>\nBrief explanation of tool call\n</think>\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{%- endif %}\n\n<IMPORTANT>\nReminder:\n- You can use the <think></think> block to plan your next tool call OR to synthesize data and formulate your final response to the user.\n- ALL explanation and reasoning MUST be placed strictly inside the <think></think> block.\n{%- if _tool_format == 'json' %}\n- Function calls MUST follow the specified format: a single JSON object with \"name\" and \"arguments\" keys inside <tool_call></tool_call> XML tags.\n{%- else %}\n- Function calls MUST follow the specified format: an inner <function=...></function> block must be nested within <tool_call></tool_call> XML tags.\n{%- endif %}\n- If you choose to call a tool, you MUST output the <tool_call> block IMMEDIATELY after thinking, with NO conversational text before it.\n{%- if _tool_format == 'json' %}\n- The <tool_call> tag MUST be at the very beginning of a new line, with NO spaces or indentation before it.\n{%- else %}\n- The <tool_call> and <function> tags MUST be at the very beginning of a new line, with NO spaces or indentation before them.\n{%- endif %}\n- To call multiple functions, output a separate, completely closed <tool_call></tool_call> block for EACH function. Do NOT nest <tool_call> blocks.\n- If you have all necessary data, provide your final answer directly to the user without any tool call.\n</IMPORTANT>\n {%- endset %}\n {{- '\\n\\n' ~ tool_instructions | trim }}\n {%- if _sc %}\n {{- '\\n\\n' + _sc }}\n {%- endif %}\n {{- '<|im_end|>\\n' }}\n{%- else %}\n {%- if _sc %}\n {{- '<|im_start|>system\\n' + _sc + '<|im_end|>\\n' }}\n {%- endif %}\n{%- endif %}\n{%- set _last_idx = _msgs | length - 1 %}\n{%- set ns = namespace(multi_step_tool=true, last_query_index=_last_idx) %}\n{%- for message in _msgs[::-1] %}\n {%- set index = (_msgs | length - 1) - loop.index0 %}\n {%- if ns.multi_step_tool and message.role == 'user' %}\n {%- set _rc = render_content(message.content, false) | trim %}\n {%- if not (_rc.startswith('<tool_response>') and _rc.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 {%- if _last_idx > 50 %}\n {%- set ns.last_query_index = _last_idx %}\n {%- else %}\n {%- set ns.last_query_index = 0 %}\n {%- endif %}\n{%- endif %}\n{%- set ns2 = namespace(prev_role='', consecutive_failures=0) %}\n{%- for message in _msgs %}\n {%- set is_system = (message.role == \"system\" or message.role == \"developer\") %}\n {%- set content = render_content(message.content, true, is_system) | trim %}\n {%- if is_system or message.role == 'user' %}\n {%- if '<|think_off|>' in content %}\n {%- set ns_state.thinking = false %}\n {%- set content = content.split('<|think_off|>') | join('') | trim %}\n {%- elif '<|think_on|>' in content %}\n {%- set ns_state.thinking = true %}\n {%- set content = content.split('<|think_on|>') | join('') | trim %}\n {%- endif %}\n {%- endif %}\n {%- if is_system %}\n {{- '<|im_start|>system\\n' + content + '<|im_end|>\\n' }}\n {%- elif message.role == 'user' %}\n {%- set ns2.consecutive_failures = 0 %}\n {{- '<|im_start|>user\\n' + content + '<|im_end|>\\n' }}\n {%- elif message.role == 'assistant' %}\n {%- set reasoning_content = '' %}\n {%- if message.reasoning_content is defined and message.reasoning_content is not none %}\n {%- if message.reasoning_content is string %}\n {%- set reasoning_content = message.reasoning_content %}\n {%- else %}\n {%- set reasoning_content = message.reasoning_content | string %}\n {%- endif %}\n {%- elif message.thinking is defined and message.thinking is not none %}\n {%- if message.thinking is string %}\n {%- set reasoning_content = message.thinking %}\n {%- else %}\n {%- set reasoning_content = message.thinking | string %}\n {%- endif %}\n {%- else %}\n {%- set _think_end = '' %}\n {%- if content.startswith('</think>') %}\n {%- set _think_end = '</think>' %}\n {%- elif content.startswith('</thinking>') %}\n {%- set _think_end = '</thinking>' %}\n {%- elif '\\n</think>' in content %}\n {%- set _think_end = '\\n</think>' %}\n {%- elif '\\n</thinking>' in content %}\n {%- set _think_end = '\\n</thinking>' %}\n {%- elif '\\n</ think>' in content %}\n {%- set _think_end = '\\n</ think>' %}\n {%- elif '\\n</think >' in content %}\n {%- set _think_end = '\\n</think >' %}\n {%- endif %}\n {%- if _think_end %}\n {%- if 'thinking' in _think_end %}\n {%- set _think_start = '<thinking>' %}\n {%- else %}\n {%- set _think_start = '<think>' %}\n {%- endif %}\n {%- set reasoning_content = content.split(_think_end)[0].rstrip('\\n') %}\n {%- if _think_start in reasoning_content %}\n {%- set reasoning_content = reasoning_content.split(_think_start)[-1].lstrip('\\n') %}\n {%- endif %}\n {%- set content = content.split(_think_end)[-1].lstrip('\\n') %}\n {%- endif %}\n {%- endif %}\n {%- set reasoning_content = reasoning_content | trim %}\n {%- if (_preserve_thinking or loop.index0 > ns.last_query_index) and reasoning_content %}\n {{- '<|im_start|>assistant\\n<think>\\n' + reasoning_content + '\\n</think>\\n\\n' + content }}\n {%- else %}\n {{- '<|im_start|>assistant\\n' + content }}\n {%- endif %}\n {%- if message.tool_calls is defined and 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 and tool_call.function is not none %}\n {%- set tc = tool_call.function %}\n {%- else %}\n {%- set tc = tool_call %}\n {%- endif %}\n {%- if _tool_format == 'json' %}\n {%- if not loop.first or content | trim %}\n {{- '\\n\\n' }}\n {%- endif %}\n {%- set _args = '{}' %}\n {%- if tc.arguments is defined and tc.arguments is not none %}\n {%- if tc.arguments is mapping %}\n {%- set _args = tc.arguments | tojson %}\n {%- elif tc.arguments is string and tc.arguments %}\n {%- set _args = tc.arguments %}\n {%- endif %}\n {%- endif %}\n {{- '<tool_call>\\n{\"name\": ' }}{{- tc.name | tojson }}{{- ', \"arguments\": ' }}{{- _args }}{{- '}\\n</tool_call>' }}\n {%- else %}\n {%- if loop.first %}\n {%- if content | trim %}\n {{- '\\n\\n<tool_call>\\n<function=' + tc.name + '>\\n' }}\n {%- else %}\n {{- '<tool_call>\\n<function=' + tc.name + '>\\n' }}\n {%- endif %}\n {%- else %}\n {{- '\\n\\n<tool_call>\\n<function=' + tc.name + '>\\n' }}\n {%- endif %}\n {%- if tc.arguments is defined and tc.arguments is not none %}\n {%- if tc.arguments is mapping %}\n {%- for args_name, args_value in tc.arguments.items() %}\n {{- '<parameter=' + args_name + '>\\n' }}\n {%- if args_value is mapping or (args_value is sequence and args_value is not string) %}\n {%- set _av = args_value | tojson %}\n {%- else %}\n {%- set _av = args_value | string %}\n {%- endif %}\n {%- if max_tool_arg_chars > 0 and _av | length > max_tool_arg_chars %}\n {{- _av[:max_tool_arg_chars] + '\\n[TRUNCATED — original length ' ~ (_av | length | string) ~ ' chars]' }}\n {%- else %}\n {{- _av }}\n {%- endif %}\n {{- '\\n</parameter>\\n' }}\n {%- endfor %}\n {%- elif tc.arguments is string and tc.arguments %}\n {{- tc.arguments }}\n {%- endif %}\n {%- endif %}\n {{- '</function>\\n</tool_call>' }}\n {%- endif %}\n {%- endfor %}\n {%- endif %}\n {{- '<|im_end|>\\n' }}\n {%- elif message.role == 'tool' %}\n {%- set _content_lower = content | lower %}\n {%- set _content_head = _content_lower[:80] %}\n {%- if content | length < 500 and '$ ' not in content and 'took ' not in _content_lower and ('\"error\":' in _content_head or 'error:' in _content_head or 'err!' in _content_head or 'fatal:' in _content_head or 'exception:' in _content_head or 'traceback' in _content_head or 'command not found' in _content_head or 'invalid syntax' in _content_head or 'failed to' in _content_head) %}\n {%- set ns2.consecutive_failures = ns2.consecutive_failures + 1 %}\n {%- else %}\n {%- set ns2.consecutive_failures = 0 %}\n {%- endif %}\n {%- if ns2.prev_role != 'tool' %}\n {{- '<|im_start|>user' }}\n {%- endif %}\n {%- if max_tool_response_chars > 0 and content | length > max_tool_response_chars %}\n {%- set content = content[:max_tool_response_chars] + '\\n[TRUNCATED — original length ' ~ (content | length | string) ~ ' chars]' %}\n {%- endif %}\n {{- '\\n<tool_response>\\n' + content }}\n {%- if ns2.consecutive_failures >= 2 %}\n {{- '\\n\\n⚠️ SYSTEM WARNING: ' ~ ns2.consecutive_failures ~ ' consecutive tool errors detected. Your previous approach is incorrect. You MUST use a fundamentally different approach or corrected arguments.' }}\n {%- elif ns2.consecutive_failures == 1 %}\n {{- '\\n\\n⚠️ SYSTEM WARNING: The previous tool call returned an error. Diagnose the failure and retry with completely corrected arguments.' }}\n {%- endif %}\n {{- '\\n</tool_response>' }}\n {%- if loop.last %}\n {{- '<|im_end|>\\n' }}\n {%- else %}\n {%- set _next_role = _msgs[loop.index0 + 1].role %}\n {%- if _next_role != 'tool' %}\n {{- '<|im_end|>\\n' }}\n {%- endif %}\n {%- endif %}\n {%- else %}\n {{- '<|im_start|>user\\n[' + message.role + ']: ' + content + '<|im_end|>\\n' }}\n {%- endif %}\n {%- set ns2.prev_role = message.role %}\n{%- endfor %}\n{%- if add_generation_prompt %}\n {{- '<|im_start|>assistant\\n' }}\n {%- if not ns_state.thinking %}\n {{- '<think>\\n\\n</think>\\n\\n' }}\n {%- elif ns2.consecutive_failures >= 2 %}\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