cpatonn commited on
Commit
9dc5d7c
·
verified ·
1 Parent(s): e9774db

Upload folder using huggingface_hub

Browse files
.gitattributes CHANGED
@@ -33,3 +33,5 @@ saved_model/**/* 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
 
 
 
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
+ model.safetensors.index.json filter=lfs diff=lfs merge=lfs -text
37
+ tokenizer.json filter=lfs diff=lfs merge=lfs -text
README.md ADDED
@@ -0,0 +1,352 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ library_name: transformers
3
+ license: apache-2.0
4
+ license_link: https://huggingface.co/Qwen/Qwen3-Next-80B-A3B-Instruct/blob/main/LICENSE
5
+ pipeline_tag: text-generation
6
+ base_model:
7
+ - Qwen/Qwen3-Next-80B-A3B-Instruct
8
+ ---
9
+
10
+ # Qwen3-Next-80B-A3B-Instruct
11
+ <a href="https://chat.qwen.ai/" target="_blank" style="margin: 2px;">
12
+ <img alt="Chat" src="https://img.shields.io/badge/%F0%9F%92%9C%EF%B8%8F%20Qwen%20Chat%20-536af5" style="display: inline-block; vertical-align: middle;"/>
13
+ </a>
14
+
15
+ Over the past few months, we have observed increasingly clear trends toward scaling both total parameters and context lengths in the pursuit of more powerful and agentic artificial intelligence (AI).
16
+ We are excited to share our latest advancements in addressing these demands, centered on improving scaling efficiency through innovative model architecture.
17
+ We call this next-generation foundation models **Qwen3-Next**.
18
+
19
+ ## Highlights
20
+
21
+ **Qwen3-Next-80B-A3B** is the first installment in the Qwen3-Next series and features the following key enchancements:
22
+ - **Hybrid Attention**: Replaces standard attention with the combination of **Gated DeltaNet** and **Gated Attention**, enabling efficient context modeling for ultra-long context length.
23
+ - **High-Sparsity Mixture-of-Experts (MoE)**: Achieves an extreme low activation ratio in MoE layers, drastically reducing FLOPs per token while preserving model capacity.
24
+ - **Stability Optimizations**: Includes techniques such as **zero-centered and weight-decayed layernorm**, and other stabilizing enhancements for robust pre-training and post-training.
25
+ - **Multi-Token Prediction (MTP)**: Boosts pretraining model performance and accelerates inference.
26
+
27
+ We are seeing strong performance in terms of both parameter efficiency and inference speed for Qwen3-Next-80B-A3B:
28
+ - Qwen3-Next-80B-A3B-Base outperforms Qwen3-32B-Base on downstream tasks with 10% of the total training cost and with 10 times inference throughput for context over 32K tokens.
29
+ - Qwen3-Next-80B-A3B-Instruct performs on par with Qwen3-235B-A22B-Instruct-2507 on certain benchmarks, while demonstrating significant advantages in handling ultra-long-context tasks up to 256K tokens.
30
+
31
+ ![Qwen3-Next-80B-A3B-Instruct Benchmark Comparison](https://qianwen-res.oss-accelerate.aliyuncs.com/Qwen3-Next/Qwen3-Next-80B-A3B-Instruct.001.jpeg)
32
+
33
+ For more details, please refer to our blog post [Qwen3-Next](https://qwenlm.github.io/blog/qwen3_next/).
34
+
35
+ ## Model Overview
36
+
37
+ > [!Note]
38
+ > **Qwen3-Next-80B-A3B-Instruct** supports only instruct (non-thinking) mode and does not generate ``<think></think>`` blocks in its output.
39
+
40
+ **Qwen3-Next-80B-A3B-Instruct** has the following features:
41
+ - Type: Causal Language Models
42
+ - Training Stage: Pretraining (15T tokens) & Post-training
43
+ - Number of Parameters: 80B in total and 3B activated
44
+ - Number of Paramaters (Non-Embedding): 79B
45
+ - Number of Layers: 48
46
+ - Hidden Dimension: 2048
47
+ - Hybrid Layout: 12 \* (3 \* (Gated DeltaNet -> MoE) -> (Gated Attention -> MoE))
48
+ - Gated Attention:
49
+ - Number of Attention Heads: 16 for Q and 2 for KV
50
+ - Head Dimension: 256
51
+ - Rotary Position Embedding Dimension: 64
52
+ - Gated DeltaNet:
53
+ - Number of Linear Attention Heads: 32 for V and 16 for QK
54
+ - Head Dimension: 128
55
+ - Mixture of Experts:
56
+ - Number of Experts: 512
57
+ - Number of Activated Experts: 10
58
+ - Number of Shared Experts: 1
59
+ - Expert Intermediate Dimension: 512
60
+ - Context Length: 262,144 natively and extensible up to 1,010,000 tokens
61
+
62
+ <img src="https://qianwen-res.oss-accelerate.aliyuncs.com/Qwen3-Next/model_architecture.png" height="384px" title="Qwen3-Next Model Architecture" />
63
+
64
+
65
+ ## Performance
66
+
67
+ | | Qwen3-30B-A3B-Instruct-2507 | Qwen3-32B Non-Thinking | Qwen3-235B-A22B-Instruct-2507 | Qwen3-Next-80B-A3B-Instruct |
68
+ |--- | --- | --- | --- | --- |
69
+ | **Knowledge** | | | | |
70
+ | MMLU-Pro | 78.4 | 71.9 | **83.0** | 80.6 |
71
+ | MMLU-Redux | 89.3 | 85.7 | **93.1** | 90.9 |
72
+ | GPQA | 70.4 | 54.6 | **77.5** | 72.9 |
73
+ | SuperGPQA | 53.4 | 43.2 | **62.6** | 58.8 |
74
+ | **Reasoning** | | | | |
75
+ | AIME25 | 61.3 | 20.2 | **70.3** | 69.5 |
76
+ | HMMT25 | 43.0 | 9.8 | **55.4** | 54.1 |
77
+ | LiveBench 20241125 | 69.0 | 59.8 | 75.4 | **75.8** |
78
+ | **Coding** | | | | |
79
+ | LiveCodeBench v6 (25.02-25.05) | 43.2 | 29.1 | 51.8 | **56.6** |
80
+ | MultiPL-E | 83.8 | 76.9 | **87.9** | 87.8 |
81
+ | Aider-Polyglot | 35.6 | 40.0 | **57.3** | 49.8 |
82
+ | **Alignment** | | | | |
83
+ | IFEval | 84.7 | 83.2 | **88.7** | 87.6 |
84
+ | Arena-Hard v2* | 69.0 | 34.1 | 79.2 | **82.7** |
85
+ | Creative Writing v3 | 86.0 | 78.3 | **87.5** | 85.3 |
86
+ | WritingBench | 85.5 | 75.4 | 85.2 | **87.3** |
87
+ | **Agent** | | | | |
88
+ | BFCL-v3 | 65.1 | 63.0 | **70.9** | 70.3 |
89
+ | TAU1-Retail | 59.1 | 40.1 | **71.3** | 60.9 |
90
+ | TAU1-Airline | 40.0 | 17.0 | **44.0** | 44.0 |
91
+ | TAU2-Retail | 57.0 | 48.8 | **74.6** | 57.3 |
92
+ | TAU2-Airline | 38.0 | 24.0 | **50.0** | 45.5 |
93
+ | TAU2-Telecom | 12.3 | 24.6 | **32.5** | 13.2 |
94
+ | **Multilingualism** | | | | |
95
+ | MultiIF | 67.9 | 70.7 | **77.5** | 75.8 |
96
+ | MMLU-ProX | 72.0 | 69.3 | **79.4** | 76.7 |
97
+ | INCLUDE | 71.9 | 70.9 | **79.5** | 78.9 |
98
+ | PolyMATH | 43.1 | 22.5 | **50.2** | 45.9 |
99
+
100
+ *: For reproducibility, we report the win rates evaluated by GPT-4.1.
101
+
102
+ ## Quickstart
103
+
104
+ The code for Qwen3-Next has been merged into the main branch of Hugging Face `transformers`.
105
+
106
+ ```shell
107
+ pip install git+https://github.com/huggingface/transformers.git@main
108
+ ```
109
+
110
+ With earlier versions, you will encounter the following error:
111
+ ```
112
+ KeyError: 'qwen3_next'
113
+ ```
114
+
115
+ The following contains a code snippet illustrating how to use the model generate content based on given inputs.
116
+ ```python
117
+ from transformers import AutoModelForCausalLM, AutoTokenizer
118
+
119
+ model_name = "Qwen/Qwen3-Next-80B-A3B-Instruct"
120
+
121
+ # load the tokenizer and the model
122
+ tokenizer = AutoTokenizer.from_pretrained(model_name)
123
+ model = AutoModelForCausalLM.from_pretrained(
124
+ model_name,
125
+ dtype="auto",
126
+ device_map="auto",
127
+ )
128
+
129
+ # prepare the model input
130
+ prompt = "Give me a short introduction to large language model."
131
+ messages = [
132
+ {"role": "user", "content": prompt},
133
+ ]
134
+ text = tokenizer.apply_chat_template(
135
+ messages,
136
+ tokenize=False,
137
+ add_generation_prompt=True,
138
+ )
139
+ model_inputs = tokenizer([text], return_tensors="pt").to(model.device)
140
+
141
+ # conduct text completion
142
+ generated_ids = model.generate(
143
+ **model_inputs,
144
+ max_new_tokens=16384,
145
+ )
146
+ output_ids = generated_ids[0][len(model_inputs.input_ids[0]):].tolist()
147
+
148
+ content = tokenizer.decode(output_ids, skip_special_tokens=True)
149
+
150
+ print("content:", content)
151
+ ```
152
+
153
+ > [!Note]
154
+ > Multi-Token Prediction (MTP) is not generally available in Hugging Face Transformers.
155
+
156
+ > [!Note]
157
+ > The efficiency or throughput improvement depends highly on the implementation.
158
+ > It is recommended to adopt a dedicated inference framework, e.g., SGLang and vLLM, for inference tasks.
159
+
160
+ > [!Tip]
161
+ > Depending on the inference settings, you may observe better efficiency with [`flash-linear-attention`](https://github.com/fla-org/flash-linear-attention#installation) and [`causal-conv1d`](https://github.com/Dao-AILab/causal-conv1d).
162
+ > See the above links for detailed instructions and requirements.
163
+
164
+
165
+ ## Deployment
166
+
167
+ For deployment, you can use the latest `sglang` or `vllm` to create an OpenAI-compatible API endpoint.
168
+
169
+ ### SGLang
170
+
171
+ [SGLang](https://github.com/sgl-project/sglang) is a fast serving framework for large language models and vision language models.
172
+ SGLang could be used to launch a server with OpenAI-compatible API service.
173
+
174
+ SGLang has supported Qwen3-Next in its `main` branch, which can be installed from source:
175
+ ```shell
176
+ pip install 'sglang[all] @ git+https://github.com/sgl-project/sglang.git@main#subdirectory=python'
177
+ ```
178
+
179
+ The following command can be used to create an API endpoint at `http://localhost:30000/v1` with maximum context length 256K tokens using tensor parallel on 4 GPUs.
180
+ ```shell
181
+ SGLANG_ALLOW_OVERWRITE_LONGER_CONTEXT_LEN=1 python -m sglang.launch_server --model-path Qwen/Qwen3-Next-80B-A3B-Instruct --port 30000 --tp-size 4 --context-length 262144 --mem-fraction-static 0.8
182
+ ```
183
+
184
+ The following command is recommended for MTP with the rest settings the same as above:
185
+ ```shell
186
+ SGLANG_ALLOW_OVERWRITE_LONGER_CONTEXT_LEN=1 python -m sglang.launch_server --model-path Qwen/Qwen3-Next-80B-A3B-Instruct --port 30000 --tp-size 4 --context-length 262144 --mem-fraction-static 0.8 --speculative-algo NEXTN --speculative-num-steps 3 --speculative-eagle-topk 1 --speculative-num-draft-tokens 4
187
+ ```
188
+
189
+ > [!Note]
190
+ > The environment variable `SGLANG_ALLOW_OVERWRITE_LONGER_CONTEXT_LEN=1` is required at the moment.
191
+
192
+ > [!Note]
193
+ > The default context length is 256K. Consider reducing the context length to a smaller value, e.g., `32768`, if the server fail to start.
194
+
195
+ ### vLLM
196
+
197
+ [vLLM](https://github.com/vllm-project/vllm) is a high-throughput and memory-efficient inference and serving engine for LLMs.
198
+ vLLM could be used to launch a server with OpenAI-compatible API service.
199
+
200
+ vLLM has supported Qwen3-Next in its `main` branch, which can be installed from source:
201
+ ```shell
202
+ pip install git+https://github.com/vllm-project/vllm.git
203
+ ```
204
+
205
+ The following command can be used to create an API endpoint at `http://localhost:8000/v1` with maximum context length 256K tokens using tensor parallel on 4 GPUs.
206
+ ```shell
207
+ VLLM_ALLOW_LONG_MAX_MODEL_LEN=1 vllm serve Qwen/Qwen3-Next-80B-A3B-Instruct --port 8000 --tensor-parallel-size 4 --max-model-len 262144
208
+ ```
209
+
210
+ The following command is recommended for MTP with the rest settings the same as above:
211
+ ```shell
212
+ VLLM_ALLOW_LONG_MAX_MODEL_LEN=1 vllm serve Qwen/Qwen3-Next-80B-A3B-Instruct --port 8000 --tensor-parallel-size 4 --max-model-len 262144 --speculative-config '{"method":"qwen3_next_mtp","num_speculative_tokens":2}'
213
+ ```
214
+
215
+ > [!Note]
216
+ > The environment variable `VLLM_ALLOW_LONG_MAX_MODEL_LEN=1` is required at the moment.
217
+
218
+ > [!Note]
219
+ > The default context length is 256K. Consider reducing the context length to a smaller value, e.g., `32768`, if the server fail to start.
220
+
221
+ ## Agentic Use
222
+
223
+ Qwen3 excels in tool calling capabilities. We recommend using [Qwen-Agent](https://github.com/QwenLM/Qwen-Agent) to make the best use of agentic ability of Qwen3. Qwen-Agent encapsulates tool-calling templates and tool-calling parsers internally, greatly reducing coding complexity.
224
+
225
+ To define the available tools, you can use the MCP configuration file, use the integrated tool of Qwen-Agent, or integrate other tools by yourself.
226
+ ```python
227
+ from qwen_agent.agents import Assistant
228
+
229
+ # Define LLM
230
+ llm_cfg = {
231
+ 'model': 'Qwen3-Next-80B-A3B-Instruct',
232
+
233
+ # Use a custom endpoint compatible with OpenAI API:
234
+ 'model_server': 'http://localhost:8000/v1', # api_base
235
+ 'api_key': 'EMPTY',
236
+ }
237
+
238
+ # Define Tools
239
+ tools = [
240
+ {'mcpServers': { # You can specify the MCP configuration file
241
+ 'time': {
242
+ 'command': 'uvx',
243
+ 'args': ['mcp-server-time', '--local-timezone=Asia/Shanghai']
244
+ },
245
+ "fetch": {
246
+ "command": "uvx",
247
+ "args": ["mcp-server-fetch"]
248
+ }
249
+ }
250
+ },
251
+ 'code_interpreter', # Built-in tools
252
+ ]
253
+
254
+ # Define Agent
255
+ bot = Assistant(llm=llm_cfg, function_list=tools)
256
+
257
+ # Streaming generation
258
+ messages = [{'role': 'user', 'content': 'https://qwenlm.github.io/blog/ Introduce the latest developments of Qwen'}]
259
+ for responses in bot.run(messages=messages):
260
+ pass
261
+ print(responses)
262
+ ```
263
+
264
+
265
+ ## Processing Ultra-Long Texts
266
+
267
+ Qwen3-Next natively supports context lengths of up to 262,144 tokens.
268
+ For conversations where the total length (including both input and output) significantly exceeds this limit, we recommend using RoPE scaling techniques to handle long texts effectively.
269
+ We have validated the model's performance on context lengths of up to 1 million tokens using the [YaRN](https://arxiv.org/abs/2309.00071) method.
270
+
271
+ YaRN is currently supported by several inference frameworks, e.g., `transformers`, `vllm` and `sglang`.
272
+ In general, there are two approaches to enabling YaRN for supported frameworks:
273
+
274
+ - Modifying the model files:
275
+ In the `config.json` file, add the `rope_scaling` fields:
276
+ ```json
277
+ {
278
+ ...,
279
+ "rope_scaling": {
280
+ "rope_type": "yarn",
281
+ "factor": 4.0,
282
+ "original_max_position_embeddings": 262144
283
+ }
284
+ }
285
+ ```
286
+
287
+ - Passing command line arguments:
288
+
289
+ For `vllm`, you can use
290
+ ```shell
291
+ VLLM_ALLOW_LONG_MAX_MODEL_LEN=1 vllm serve ... --rope-scaling '{"rope_type":"yarn","factor":4.0,"original_max_position_embeddings":262144}' --max-model-len 1010000
292
+ ```
293
+
294
+ For `sglang`, you can use
295
+ ```shell
296
+ SGLANG_ALLOW_OVERWRITE_LONGER_CONTEXT_LEN=1 python -m sglang.launch_server ... --json-model-override-args '{"rope_scaling":{"rope_type":"yarn","factor":4.0,"original_max_position_embeddings":262144}}' --context-length 1010000
297
+ ```
298
+
299
+ > [!NOTE]
300
+ > All the notable open-source frameworks implement static YaRN, which means the scaling factor remains constant regardless of input length, **potentially impacting performance on shorter texts.**
301
+ > We advise adding the `rope_scaling` configuration only when processing long contexts is required.
302
+ > It is also recommended to modify the `factor` as needed. For example, if the typical context length for your application is 524,288 tokens, it would be better to set `factor` as 2.0.
303
+
304
+ #### Long-Context Performance
305
+
306
+ We test the model on an 1M version of the [RULER](https://arxiv.org/abs/2404.06654) benchmark.
307
+
308
+ | Model Name | Acc avg | 4k | 8k | 16k | 32k | 64k | 96k | 128k | 192k | 256k | 384k | 512k | 640k | 768k | 896k | 1000k |
309
+ |---------------------------------------------|---------|------|------|------|------|------|------|------|------|------|------|------|------|------|------|-------|
310
+ | Qwen3-30B-A3B-Instruct-2507 | 86.8 | 98.0 | 96.7 | 96.9 | 97.2 | 93.4 | 91.0 | 89.1 | 89.8 | 82.5 | 83.6 | 78.4 | 79.7 | 77.6 | 75.7 | 72.8 |
311
+ | Qwen3-235B-A22B-Instruct-2507 | 92.5 | 98.5 | 97.6 | 96.9 | 97.3 | 95.8 | 94.9 | 93.9 | 94.5 | 91.0 | 92.2 | 90.9 | 87.8 | 84.8 | 86.5 | 84.5 |
312
+ | Qwen3-Next-80B-A3B-Instruct | 91.8 | 98.5 | 99.0 | 98.0 | 98.7 | 97.6 | 95.0 | 96.0 | 94.0 | 93.5 | 91.7 | 86.9 | 85.5 | 81.7 | 80.3 | 80.3 |
313
+
314
+ * Qwen3-Next are evaluated with YaRN enabled. Qwen3-2507 models are evaluated with Dual Chunk Attention enabled.
315
+ * Since the evaluation is time-consuming, we use 260 samples for each length (13 sub-tasks, 20 samples for each).
316
+
317
+ ## Best Practices
318
+
319
+ To achieve optimal performance, we recommend the following settings:
320
+
321
+ 1. **Sampling Parameters**:
322
+ - We suggest using `Temperature=0.7`, `TopP=0.8`, `TopK=20`, and `MinP=0`.
323
+ - For supported frameworks, you can adjust the `presence_penalty` parameter between 0 and 2 to reduce endless repetitions. However, using a higher value may occasionally result in language mixing and a slight decrease in model performance.
324
+
325
+ 2. **Adequate Output Length**: We recommend using an output length of 16,384 tokens for most queries, which is adequate for instruct models.
326
+
327
+ 3. **Standardize Output Format**: We recommend using prompts to standardize model outputs when benchmarking.
328
+ - **Math Problems**: Include "Please reason step by step, and put your final answer within \boxed{}." in the prompt.
329
+ - **Multiple-Choice Questions**: Add the following JSON structure to the prompt to standardize responses: "Please show your choice in the `answer` field with only the choice letter, e.g., `"answer": "C"`."
330
+
331
+ ### Citation
332
+
333
+ If you find our work helpful, feel free to give us a cite.
334
+
335
+ ```
336
+ @misc{qwen3technicalreport,
337
+ title={Qwen3 Technical Report},
338
+ author={Qwen Team},
339
+ year={2025},
340
+ eprint={2505.09388},
341
+ archivePrefix={arXiv},
342
+ primaryClass={cs.CL},
343
+ url={https://arxiv.org/abs/2505.09388},
344
+ }
345
+
346
+ @article{qwen2.5-1m,
347
+ title={Qwen2.5-1M Technical Report},
348
+ author={An Yang and Bowen Yu and Chengyuan Li and Dayiheng Liu and Fei Huang and Haoyan Huang and Jiandong Jiang and Jianhong Tu and Jianwei Zhang and Jingren Zhou and Junyang Lin and Kai Dang and Kexin Yang and Le Yu and Mei Li and Minmin Sun and Qin Zhu and Rui Men and Tao He and Weijia Xu and Wenbiao Yin and Wenyuan Yu and Xiafei Qiu and Xingzhang Ren and Xinlong Yang and Yong Li and Zhiying Xu and Zipeng Zhang},
349
+ journal={arXiv preprint arXiv:2501.15383},
350
+ year={2025}
351
+ }
352
+ ```
added_tokens.json ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "</think>": 151668,
3
+ "</tool_call>": 151658,
4
+ "</tool_response>": 151666,
5
+ "<think>": 151667,
6
+ "<tool_call>": 151657,
7
+ "<tool_response>": 151665,
8
+ "<|box_end|>": 151649,
9
+ "<|box_start|>": 151648,
10
+ "<|endoftext|>": 151643,
11
+ "<|file_sep|>": 151664,
12
+ "<|fim_middle|>": 151660,
13
+ "<|fim_pad|>": 151662,
14
+ "<|fim_prefix|>": 151659,
15
+ "<|fim_suffix|>": 151661,
16
+ "<|im_end|>": 151645,
17
+ "<|im_start|>": 151644,
18
+ "<|image_pad|>": 151655,
19
+ "<|object_ref_end|>": 151647,
20
+ "<|object_ref_start|>": 151646,
21
+ "<|quad_end|>": 151651,
22
+ "<|quad_start|>": 151650,
23
+ "<|repo_name|>": 151663,
24
+ "<|video_pad|>": 151656,
25
+ "<|vision_end|>": 151653,
26
+ "<|vision_pad|>": 151654,
27
+ "<|vision_start|>": 151652
28
+ }
chat_template.jinja ADDED
@@ -0,0 +1,86 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {%- if tools %}
2
+ {{- '<|im_start|>system\n' }}
3
+ {%- if messages[0].role == 'system' %}
4
+ {{- messages[0].content + '\n\n' }}
5
+ {%- endif %}
6
+ {{- "# Tools\n\nYou may call one or more functions to assist with the user query.\n\nYou are provided with function signatures within <tools></tools> XML tags:\n<tools>" }}
7
+ {%- for tool in tools %}
8
+ {{- "\n" }}
9
+ {{- tool | tojson }}
10
+ {%- endfor %}
11
+ {{- "\n</tools>\n\nFor each function call, return a json object with function name and arguments within <tool_call></tool_call> XML tags:\n<tool_call>\n{\"name\": <function-name>, \"arguments\": <args-json-object>}\n</tool_call><|im_end|>\n" }}
12
+ {%- else %}
13
+ {%- if messages[0].role == 'system' %}
14
+ {{- '<|im_start|>system\n' + messages[0].content + '<|im_end|>\n' }}
15
+ {%- endif %}
16
+ {%- endif %}
17
+ {%- set ns = namespace(multi_step_tool=true, last_query_index=messages|length - 1) %}
18
+ {%- for message in messages[::-1] %}
19
+ {%- set index = (messages|length - 1) - loop.index0 %}
20
+ {%- if ns.multi_step_tool and message.role == "user" and message.content is string and not(message.content.startswith('<tool_response>') and message.content.endswith('</tool_response>')) %}
21
+ {%- set ns.multi_step_tool = false %}
22
+ {%- set ns.last_query_index = index %}
23
+ {%- endif %}
24
+ {%- endfor %}
25
+ {%- for message in messages %}
26
+ {%- if message.content is string %}
27
+ {%- set content = message.content %}
28
+ {%- else %}
29
+ {%- set content = '' %}
30
+ {%- endif %}
31
+ {%- if (message.role == "user") or (message.role == "system" and not loop.first) %}
32
+ {{- '<|im_start|>' + message.role + '\n' + content + '<|im_end|>' + '\n' }}
33
+ {%- elif message.role == "assistant" %}
34
+ {%- set reasoning_content = '' %}
35
+ {%- if message.reasoning_content is string %}
36
+ {%- set reasoning_content = message.reasoning_content %}
37
+ {%- else %}
38
+ {%- if '</think>' in content %}
39
+ {%- set reasoning_content = content.split('</think>')[0].rstrip('\n').split('<think>')[-1].lstrip('\n') %}
40
+ {%- set content = content.split('</think>')[-1].lstrip('\n') %}
41
+ {%- endif %}
42
+ {%- endif %}
43
+ {%- if loop.index0 > ns.last_query_index %}
44
+ {%- if loop.last or (not loop.last and reasoning_content) %}
45
+ {{- '<|im_start|>' + message.role + '\n<think>\n' + reasoning_content.strip('\n') + '\n</think>\n\n' + content.lstrip('\n') }}
46
+ {%- else %}
47
+ {{- '<|im_start|>' + message.role + '\n' + content }}
48
+ {%- endif %}
49
+ {%- else %}
50
+ {{- '<|im_start|>' + message.role + '\n' + content }}
51
+ {%- endif %}
52
+ {%- if message.tool_calls %}
53
+ {%- for tool_call in message.tool_calls %}
54
+ {%- if (loop.first and content) or (not loop.first) %}
55
+ {{- '\n' }}
56
+ {%- endif %}
57
+ {%- if tool_call.function %}
58
+ {%- set tool_call = tool_call.function %}
59
+ {%- endif %}
60
+ {{- '<tool_call>\n{"name": "' }}
61
+ {{- tool_call.name }}
62
+ {{- '", "arguments": ' }}
63
+ {%- if tool_call.arguments is string %}
64
+ {{- tool_call.arguments }}
65
+ {%- else %}
66
+ {{- tool_call.arguments | tojson }}
67
+ {%- endif %}
68
+ {{- '}\n</tool_call>' }}
69
+ {%- endfor %}
70
+ {%- endif %}
71
+ {{- '<|im_end|>\n' }}
72
+ {%- elif message.role == "tool" %}
73
+ {%- if loop.first or (messages[loop.index0 - 1].role != "tool") %}
74
+ {{- '<|im_start|>user' }}
75
+ {%- endif %}
76
+ {{- '\n<tool_response>\n' }}
77
+ {{- content }}
78
+ {{- '\n</tool_response>' }}
79
+ {%- if loop.last or (messages[loop.index0 + 1].role != "tool") %}
80
+ {{- '<|im_end|>\n' }}
81
+ {%- endif %}
82
+ {%- endif %}
83
+ {%- endfor %}
84
+ {%- if add_generation_prompt %}
85
+ {{- '<|im_start|>assistant\n' }}
86
+ {%- endif %}
config.json ADDED
@@ -0,0 +1,369 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "Qwen3NextForCausalLM"
4
+ ],
5
+ "attention_bias": false,
6
+ "attention_dropout": 0.0,
7
+ "bos_token_id": 151643,
8
+ "decoder_sparse_step": 1,
9
+ "dtype": "bfloat16",
10
+ "eos_token_id": 151645,
11
+ "full_attention_interval": 4,
12
+ "head_dim": 256,
13
+ "hidden_act": "silu",
14
+ "hidden_size": 2048,
15
+ "initializer_range": 0.02,
16
+ "intermediate_size": 5120,
17
+ "layer_types": [
18
+ "linear_attention",
19
+ "linear_attention",
20
+ "linear_attention",
21
+ "full_attention",
22
+ "linear_attention",
23
+ "linear_attention",
24
+ "linear_attention",
25
+ "full_attention",
26
+ "linear_attention",
27
+ "linear_attention",
28
+ "linear_attention",
29
+ "full_attention",
30
+ "linear_attention",
31
+ "linear_attention",
32
+ "linear_attention",
33
+ "full_attention",
34
+ "linear_attention",
35
+ "linear_attention",
36
+ "linear_attention",
37
+ "full_attention",
38
+ "linear_attention",
39
+ "linear_attention",
40
+ "linear_attention",
41
+ "full_attention",
42
+ "linear_attention",
43
+ "linear_attention",
44
+ "linear_attention",
45
+ "full_attention",
46
+ "linear_attention",
47
+ "linear_attention",
48
+ "linear_attention",
49
+ "full_attention",
50
+ "linear_attention",
51
+ "linear_attention",
52
+ "linear_attention",
53
+ "full_attention",
54
+ "linear_attention",
55
+ "linear_attention",
56
+ "linear_attention",
57
+ "full_attention",
58
+ "linear_attention",
59
+ "linear_attention",
60
+ "linear_attention",
61
+ "full_attention",
62
+ "linear_attention",
63
+ "linear_attention",
64
+ "linear_attention",
65
+ "full_attention"
66
+ ],
67
+ "linear_conv_kernel_dim": 4,
68
+ "linear_key_head_dim": 128,
69
+ "linear_num_key_heads": 16,
70
+ "linear_num_value_heads": 32,
71
+ "linear_value_head_dim": 128,
72
+ "max_position_embeddings": 262144,
73
+ "mlp_only_layers": [],
74
+ "model_type": "qwen3_next",
75
+ "moe_intermediate_size": 512,
76
+ "norm_topk_prob": true,
77
+ "num_attention_heads": 16,
78
+ "num_experts": 512,
79
+ "num_experts_per_tok": 10,
80
+ "num_hidden_layers": 48,
81
+ "num_key_value_heads": 2,
82
+ "output_router_logits": false,
83
+ "partial_rotary_factor": 0.25,
84
+ "quantization_config": {
85
+ "config_groups": {
86
+ "group_0": {
87
+ "format": "pack-quantized",
88
+ "input_activations": null,
89
+ "output_activations": null,
90
+ "targets": [
91
+ "Linear"
92
+ ],
93
+ "weights": {
94
+ "actorder": null,
95
+ "block_structure": null,
96
+ "dynamic": false,
97
+ "group_size": 32,
98
+ "num_bits": 4,
99
+ "observer": "minmax",
100
+ "observer_kwargs": {},
101
+ "strategy": "group",
102
+ "symmetric": true,
103
+ "type": "int"
104
+ }
105
+ }
106
+ },
107
+ "format": "pack-quantized",
108
+ "global_compression_ratio": null,
109
+ "ignore": [
110
+ "model.layers.0.mlp.gate",
111
+ "model.layers.0.mlp.shared_expert.gate_proj",
112
+ "model.layers.0.mlp.shared_expert.up_proj",
113
+ "model.layers.0.mlp.shared_expert.down_proj",
114
+ "model.layers.0.mlp.shared_expert_gate",
115
+ "model.layers.1.mlp.gate",
116
+ "model.layers.1.mlp.shared_expert.gate_proj",
117
+ "model.layers.1.mlp.shared_expert.up_proj",
118
+ "model.layers.1.mlp.shared_expert.down_proj",
119
+ "model.layers.1.mlp.shared_expert_gate",
120
+ "model.layers.2.mlp.gate",
121
+ "model.layers.2.mlp.shared_expert.gate_proj",
122
+ "model.layers.2.mlp.shared_expert.up_proj",
123
+ "model.layers.2.mlp.shared_expert.down_proj",
124
+ "model.layers.2.mlp.shared_expert_gate",
125
+ "model.layers.3.mlp.gate",
126
+ "model.layers.3.mlp.shared_expert.gate_proj",
127
+ "model.layers.3.mlp.shared_expert.up_proj",
128
+ "model.layers.3.mlp.shared_expert.down_proj",
129
+ "model.layers.3.mlp.shared_expert_gate",
130
+ "model.layers.4.mlp.gate",
131
+ "model.layers.4.mlp.shared_expert.gate_proj",
132
+ "model.layers.4.mlp.shared_expert.up_proj",
133
+ "model.layers.4.mlp.shared_expert.down_proj",
134
+ "model.layers.4.mlp.shared_expert_gate",
135
+ "model.layers.5.mlp.gate",
136
+ "model.layers.5.mlp.shared_expert.gate_proj",
137
+ "model.layers.5.mlp.shared_expert.up_proj",
138
+ "model.layers.5.mlp.shared_expert.down_proj",
139
+ "model.layers.5.mlp.shared_expert_gate",
140
+ "model.layers.6.mlp.gate",
141
+ "model.layers.6.mlp.shared_expert.gate_proj",
142
+ "model.layers.6.mlp.shared_expert.up_proj",
143
+ "model.layers.6.mlp.shared_expert.down_proj",
144
+ "model.layers.6.mlp.shared_expert_gate",
145
+ "model.layers.7.mlp.gate",
146
+ "model.layers.7.mlp.shared_expert.gate_proj",
147
+ "model.layers.7.mlp.shared_expert.up_proj",
148
+ "model.layers.7.mlp.shared_expert.down_proj",
149
+ "model.layers.7.mlp.shared_expert_gate",
150
+ "model.layers.8.mlp.gate",
151
+ "model.layers.8.mlp.shared_expert.gate_proj",
152
+ "model.layers.8.mlp.shared_expert.up_proj",
153
+ "model.layers.8.mlp.shared_expert.down_proj",
154
+ "model.layers.8.mlp.shared_expert_gate",
155
+ "model.layers.9.mlp.gate",
156
+ "model.layers.9.mlp.shared_expert.gate_proj",
157
+ "model.layers.9.mlp.shared_expert.up_proj",
158
+ "model.layers.9.mlp.shared_expert.down_proj",
159
+ "model.layers.9.mlp.shared_expert_gate",
160
+ "model.layers.10.mlp.gate",
161
+ "model.layers.10.mlp.shared_expert.gate_proj",
162
+ "model.layers.10.mlp.shared_expert.up_proj",
163
+ "model.layers.10.mlp.shared_expert.down_proj",
164
+ "model.layers.10.mlp.shared_expert_gate",
165
+ "model.layers.11.mlp.gate",
166
+ "model.layers.11.mlp.shared_expert.gate_proj",
167
+ "model.layers.11.mlp.shared_expert.up_proj",
168
+ "model.layers.11.mlp.shared_expert.down_proj",
169
+ "model.layers.11.mlp.shared_expert_gate",
170
+ "model.layers.12.mlp.gate",
171
+ "model.layers.12.mlp.shared_expert.gate_proj",
172
+ "model.layers.12.mlp.shared_expert.up_proj",
173
+ "model.layers.12.mlp.shared_expert.down_proj",
174
+ "model.layers.12.mlp.shared_expert_gate",
175
+ "model.layers.13.mlp.gate",
176
+ "model.layers.13.mlp.shared_expert.gate_proj",
177
+ "model.layers.13.mlp.shared_expert.up_proj",
178
+ "model.layers.13.mlp.shared_expert.down_proj",
179
+ "model.layers.13.mlp.shared_expert_gate",
180
+ "model.layers.14.mlp.gate",
181
+ "model.layers.14.mlp.shared_expert.gate_proj",
182
+ "model.layers.14.mlp.shared_expert.up_proj",
183
+ "model.layers.14.mlp.shared_expert.down_proj",
184
+ "model.layers.14.mlp.shared_expert_gate",
185
+ "model.layers.15.mlp.gate",
186
+ "model.layers.15.mlp.shared_expert.gate_proj",
187
+ "model.layers.15.mlp.shared_expert.up_proj",
188
+ "model.layers.15.mlp.shared_expert.down_proj",
189
+ "model.layers.15.mlp.shared_expert_gate",
190
+ "model.layers.16.mlp.gate",
191
+ "model.layers.16.mlp.shared_expert.gate_proj",
192
+ "model.layers.16.mlp.shared_expert.up_proj",
193
+ "model.layers.16.mlp.shared_expert.down_proj",
194
+ "model.layers.16.mlp.shared_expert_gate",
195
+ "model.layers.17.mlp.gate",
196
+ "model.layers.17.mlp.shared_expert.gate_proj",
197
+ "model.layers.17.mlp.shared_expert.up_proj",
198
+ "model.layers.17.mlp.shared_expert.down_proj",
199
+ "model.layers.17.mlp.shared_expert_gate",
200
+ "model.layers.18.mlp.gate",
201
+ "model.layers.18.mlp.shared_expert.gate_proj",
202
+ "model.layers.18.mlp.shared_expert.up_proj",
203
+ "model.layers.18.mlp.shared_expert.down_proj",
204
+ "model.layers.18.mlp.shared_expert_gate",
205
+ "model.layers.19.mlp.gate",
206
+ "model.layers.19.mlp.shared_expert.gate_proj",
207
+ "model.layers.19.mlp.shared_expert.up_proj",
208
+ "model.layers.19.mlp.shared_expert.down_proj",
209
+ "model.layers.19.mlp.shared_expert_gate",
210
+ "model.layers.20.mlp.gate",
211
+ "model.layers.20.mlp.shared_expert.gate_proj",
212
+ "model.layers.20.mlp.shared_expert.up_proj",
213
+ "model.layers.20.mlp.shared_expert.down_proj",
214
+ "model.layers.20.mlp.shared_expert_gate",
215
+ "model.layers.21.mlp.gate",
216
+ "model.layers.21.mlp.shared_expert.gate_proj",
217
+ "model.layers.21.mlp.shared_expert.up_proj",
218
+ "model.layers.21.mlp.shared_expert.down_proj",
219
+ "model.layers.21.mlp.shared_expert_gate",
220
+ "model.layers.22.mlp.gate",
221
+ "model.layers.22.mlp.shared_expert.gate_proj",
222
+ "model.layers.22.mlp.shared_expert.up_proj",
223
+ "model.layers.22.mlp.shared_expert.down_proj",
224
+ "model.layers.22.mlp.shared_expert_gate",
225
+ "model.layers.23.mlp.gate",
226
+ "model.layers.23.mlp.shared_expert.gate_proj",
227
+ "model.layers.23.mlp.shared_expert.up_proj",
228
+ "model.layers.23.mlp.shared_expert.down_proj",
229
+ "model.layers.23.mlp.shared_expert_gate",
230
+ "model.layers.24.mlp.gate",
231
+ "model.layers.24.mlp.shared_expert.gate_proj",
232
+ "model.layers.24.mlp.shared_expert.up_proj",
233
+ "model.layers.24.mlp.shared_expert.down_proj",
234
+ "model.layers.24.mlp.shared_expert_gate",
235
+ "model.layers.25.mlp.gate",
236
+ "model.layers.25.mlp.shared_expert.gate_proj",
237
+ "model.layers.25.mlp.shared_expert.up_proj",
238
+ "model.layers.25.mlp.shared_expert.down_proj",
239
+ "model.layers.25.mlp.shared_expert_gate",
240
+ "model.layers.26.mlp.gate",
241
+ "model.layers.26.mlp.shared_expert.gate_proj",
242
+ "model.layers.26.mlp.shared_expert.up_proj",
243
+ "model.layers.26.mlp.shared_expert.down_proj",
244
+ "model.layers.26.mlp.shared_expert_gate",
245
+ "model.layers.27.mlp.gate",
246
+ "model.layers.27.mlp.shared_expert.gate_proj",
247
+ "model.layers.27.mlp.shared_expert.up_proj",
248
+ "model.layers.27.mlp.shared_expert.down_proj",
249
+ "model.layers.27.mlp.shared_expert_gate",
250
+ "model.layers.28.mlp.gate",
251
+ "model.layers.28.mlp.shared_expert.gate_proj",
252
+ "model.layers.28.mlp.shared_expert.up_proj",
253
+ "model.layers.28.mlp.shared_expert.down_proj",
254
+ "model.layers.28.mlp.shared_expert_gate",
255
+ "model.layers.29.mlp.gate",
256
+ "model.layers.29.mlp.shared_expert.gate_proj",
257
+ "model.layers.29.mlp.shared_expert.up_proj",
258
+ "model.layers.29.mlp.shared_expert.down_proj",
259
+ "model.layers.29.mlp.shared_expert_gate",
260
+ "model.layers.30.mlp.gate",
261
+ "model.layers.30.mlp.shared_expert.gate_proj",
262
+ "model.layers.30.mlp.shared_expert.up_proj",
263
+ "model.layers.30.mlp.shared_expert.down_proj",
264
+ "model.layers.30.mlp.shared_expert_gate",
265
+ "model.layers.31.mlp.gate",
266
+ "model.layers.31.mlp.shared_expert.gate_proj",
267
+ "model.layers.31.mlp.shared_expert.up_proj",
268
+ "model.layers.31.mlp.shared_expert.down_proj",
269
+ "model.layers.31.mlp.shared_expert_gate",
270
+ "model.layers.32.mlp.gate",
271
+ "model.layers.32.mlp.shared_expert.gate_proj",
272
+ "model.layers.32.mlp.shared_expert.up_proj",
273
+ "model.layers.32.mlp.shared_expert.down_proj",
274
+ "model.layers.32.mlp.shared_expert_gate",
275
+ "model.layers.33.mlp.gate",
276
+ "model.layers.33.mlp.shared_expert.gate_proj",
277
+ "model.layers.33.mlp.shared_expert.up_proj",
278
+ "model.layers.33.mlp.shared_expert.down_proj",
279
+ "model.layers.33.mlp.shared_expert_gate",
280
+ "model.layers.34.mlp.gate",
281
+ "model.layers.34.mlp.shared_expert.gate_proj",
282
+ "model.layers.34.mlp.shared_expert.up_proj",
283
+ "model.layers.34.mlp.shared_expert.down_proj",
284
+ "model.layers.34.mlp.shared_expert_gate",
285
+ "model.layers.35.mlp.gate",
286
+ "model.layers.35.mlp.shared_expert.gate_proj",
287
+ "model.layers.35.mlp.shared_expert.up_proj",
288
+ "model.layers.35.mlp.shared_expert.down_proj",
289
+ "model.layers.35.mlp.shared_expert_gate",
290
+ "model.layers.36.mlp.gate",
291
+ "model.layers.36.mlp.shared_expert.gate_proj",
292
+ "model.layers.36.mlp.shared_expert.up_proj",
293
+ "model.layers.36.mlp.shared_expert.down_proj",
294
+ "model.layers.36.mlp.shared_expert_gate",
295
+ "model.layers.37.mlp.gate",
296
+ "model.layers.37.mlp.shared_expert.gate_proj",
297
+ "model.layers.37.mlp.shared_expert.up_proj",
298
+ "model.layers.37.mlp.shared_expert.down_proj",
299
+ "model.layers.37.mlp.shared_expert_gate",
300
+ "model.layers.38.mlp.gate",
301
+ "model.layers.38.mlp.shared_expert.gate_proj",
302
+ "model.layers.38.mlp.shared_expert.up_proj",
303
+ "model.layers.38.mlp.shared_expert.down_proj",
304
+ "model.layers.38.mlp.shared_expert_gate",
305
+ "model.layers.39.mlp.gate",
306
+ "model.layers.39.mlp.shared_expert.gate_proj",
307
+ "model.layers.39.mlp.shared_expert.up_proj",
308
+ "model.layers.39.mlp.shared_expert.down_proj",
309
+ "model.layers.39.mlp.shared_expert_gate",
310
+ "model.layers.40.mlp.gate",
311
+ "model.layers.40.mlp.shared_expert.gate_proj",
312
+ "model.layers.40.mlp.shared_expert.up_proj",
313
+ "model.layers.40.mlp.shared_expert.down_proj",
314
+ "model.layers.40.mlp.shared_expert_gate",
315
+ "model.layers.41.mlp.gate",
316
+ "model.layers.41.mlp.shared_expert.gate_proj",
317
+ "model.layers.41.mlp.shared_expert.up_proj",
318
+ "model.layers.41.mlp.shared_expert.down_proj",
319
+ "model.layers.41.mlp.shared_expert_gate",
320
+ "model.layers.42.mlp.gate",
321
+ "model.layers.42.mlp.shared_expert.gate_proj",
322
+ "model.layers.42.mlp.shared_expert.up_proj",
323
+ "model.layers.42.mlp.shared_expert.down_proj",
324
+ "model.layers.42.mlp.shared_expert_gate",
325
+ "model.layers.43.mlp.gate",
326
+ "model.layers.43.mlp.shared_expert.gate_proj",
327
+ "model.layers.43.mlp.shared_expert.up_proj",
328
+ "model.layers.43.mlp.shared_expert.down_proj",
329
+ "model.layers.43.mlp.shared_expert_gate",
330
+ "model.layers.44.mlp.gate",
331
+ "model.layers.44.mlp.shared_expert.gate_proj",
332
+ "model.layers.44.mlp.shared_expert.up_proj",
333
+ "model.layers.44.mlp.shared_expert.down_proj",
334
+ "model.layers.44.mlp.shared_expert_gate",
335
+ "model.layers.45.mlp.gate",
336
+ "model.layers.45.mlp.shared_expert.gate_proj",
337
+ "model.layers.45.mlp.shared_expert.up_proj",
338
+ "model.layers.45.mlp.shared_expert.down_proj",
339
+ "model.layers.45.mlp.shared_expert_gate",
340
+ "model.layers.46.mlp.gate",
341
+ "model.layers.46.mlp.shared_expert.gate_proj",
342
+ "model.layers.46.mlp.shared_expert.up_proj",
343
+ "model.layers.46.mlp.shared_expert.down_proj",
344
+ "model.layers.46.mlp.shared_expert_gate",
345
+ "model.layers.47.mlp.gate",
346
+ "model.layers.47.mlp.shared_expert.gate_proj",
347
+ "model.layers.47.mlp.shared_expert.up_proj",
348
+ "model.layers.47.mlp.shared_expert.down_proj",
349
+ "model.layers.47.mlp.shared_expert_gate",
350
+ "lm_head"
351
+ ],
352
+ "kv_cache_scheme": null,
353
+ "quant_method": "compressed-tensors",
354
+ "quantization_status": "compressed",
355
+ "sparsity_config": {},
356
+ "transform_config": {},
357
+ "version": "0.11.1.a20250910"
358
+ },
359
+ "rms_norm_eps": 1e-06,
360
+ "rope_scaling": null,
361
+ "rope_theta": 10000000,
362
+ "router_aux_loss_coef": 0.001,
363
+ "shared_expert_intermediate_size": 512,
364
+ "tie_word_embeddings": false,
365
+ "transformers_version": "4.57.0.dev0",
366
+ "use_cache": true,
367
+ "use_sliding_window": false,
368
+ "vocab_size": 151936
369
+ }
generation_config.json ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "bos_token_id": 151643,
3
+ "do_sample": true,
4
+ "eos_token_id": [
5
+ 151645,
6
+ 151643
7
+ ],
8
+ "pad_token_id": 151643,
9
+ "temperature": 0.7,
10
+ "top_k": 20,
11
+ "top_p": 0.8,
12
+ "transformers_version": "4.57.0.dev0"
13
+ }
merges.txt ADDED
The diff for this file is too large to render. See raw diff
 
model-00001-of-00010.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:28ceca3f39b9166196e3f6d1f2463e229adb7673b62e3345c1148a362e121276
3
+ size 5002482080
model-00002-of-00010.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2ec50631290569cbfaea4f800c00a6ac993a5849fdb49a2e7b83517c19a8aee9
3
+ size 5002905632
model-00003-of-00010.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d43944658ebe0bb3e3dbb0b5708d8753eac177db2279682c2784b6215919460e
3
+ size 5003050264
model-00004-of-00010.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b1bdfd576ed4ea93e82ea8236c4143e1c271b4ca9819b093c3667863c7925bb9
3
+ size 5002728640
model-00005-of-00010.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0e5fbd28643105edfabce2b26273769e9e8702a4212cc19ecfa4abf56f4814a8
3
+ size 5002929640
model-00006-of-00010.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5ba3345ba81cbe06740211d24dc4b339a0cc61d4212f0f010ac4ec3cef7786ad
3
+ size 5003050672
model-00007-of-00010.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f8bc272ecbbf035e204b83cee5d610409a3ef33811838a5b5a10fcb10f452f37
3
+ size 5002728640
model-00008-of-00010.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:eea526c9f0a3cfd9983e7b978f848ef27c82d6c543fc9fdb9317a19e413f3554
3
+ size 5002929360
model-00009-of-00010.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:48c7bbea5f5070be6f1a806f125d2b9b4af65b84e7388f911ee1dcd5af31dab0
3
+ size 5003051016
model-00010-of-00010.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:87d7050b82b638139990f2221e281dbbb67150c3a06a28f011decada93c07ac1
3
+ size 1005846272
model.safetensors.index.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:607a24a0fdf904a216783a2ee774b90111f2d59dfa60433ca7669325a8b68cf5
3
+ size 21595827
recipe.yaml ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ quant_stage:
2
+ quant_modifiers:
3
+ AWQModifier:
4
+ config_groups:
5
+ group_0:
6
+ targets: [Linear]
7
+ weights:
8
+ num_bits: 4
9
+ type: int
10
+ symmetric: true
11
+ group_size: 32
12
+ strategy: group
13
+ block_structure: null
14
+ dynamic: false
15
+ actorder: null
16
+ observer: minmax
17
+ observer_kwargs: {}
18
+ input_activations: null
19
+ output_activations: null
20
+ format: null
21
+ targets: [Linear]
22
+ ignore: [lm_head, model.embed_tokens, 're:mtp.*', 're:.*input_layernorm$', 're:.*post_attention_layernorm$',
23
+ model.norm, 're:.*mlp[.]gate$', 're:.*shared_expert_gate$', 're:.*shared_expert.*']
24
+ mappings:
25
+ - smooth_layer: re:.*input_layernorm$
26
+ balance_layers: ['re:.*self_attn[.]q_proj$', 're:.*self_attn[.]k_proj$', 're:.*self_attn[.]v_proj$',
27
+ 're:.*linear_attn[.]in_proj_qkvz$', 're:.*linear_attn[.]in_proj_ba$']
28
+ - smooth_layer: re:.*self_attn[.]v_proj$
29
+ balance_layers: ['re:.*self_attn[.]o_proj$']
30
+ - smooth_layer: re:.*post_attention_layernorm$
31
+ balance_layers: ['re:.*gate_proj$', 're:.*up_proj$']
32
+ - smooth_layer: re:.*up_proj$
33
+ balance_layers: ['re:.*down_proj$']
34
+ duo_scaling: true
special_tokens_map.json ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "additional_special_tokens": [
3
+ "<|im_start|>",
4
+ "<|im_end|>",
5
+ "<|object_ref_start|>",
6
+ "<|object_ref_end|>",
7
+ "<|box_start|>",
8
+ "<|box_end|>",
9
+ "<|quad_start|>",
10
+ "<|quad_end|>",
11
+ "<|vision_start|>",
12
+ "<|vision_end|>",
13
+ "<|vision_pad|>",
14
+ "<|image_pad|>",
15
+ "<|video_pad|>"
16
+ ],
17
+ "eos_token": {
18
+ "content": "<|im_end|>",
19
+ "lstrip": false,
20
+ "normalized": false,
21
+ "rstrip": false,
22
+ "single_word": false
23
+ },
24
+ "pad_token": {
25
+ "content": "<|endoftext|>",
26
+ "lstrip": false,
27
+ "normalized": false,
28
+ "rstrip": false,
29
+ "single_word": false
30
+ }
31
+ }
tokenizer.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:aeb13307a71acd8fe81861d94ad54ab689df773318809eed3cbe794b4492dae4
3
+ size 11422654
tokenizer_config.json ADDED
@@ -0,0 +1,239 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "add_bos_token": false,
3
+ "add_prefix_space": false,
4
+ "added_tokens_decoder": {
5
+ "151643": {
6
+ "content": "<|endoftext|>",
7
+ "lstrip": false,
8
+ "normalized": false,
9
+ "rstrip": false,
10
+ "single_word": false,
11
+ "special": true
12
+ },
13
+ "151644": {
14
+ "content": "<|im_start|>",
15
+ "lstrip": false,
16
+ "normalized": false,
17
+ "rstrip": false,
18
+ "single_word": false,
19
+ "special": true
20
+ },
21
+ "151645": {
22
+ "content": "<|im_end|>",
23
+ "lstrip": false,
24
+ "normalized": false,
25
+ "rstrip": false,
26
+ "single_word": false,
27
+ "special": true
28
+ },
29
+ "151646": {
30
+ "content": "<|object_ref_start|>",
31
+ "lstrip": false,
32
+ "normalized": false,
33
+ "rstrip": false,
34
+ "single_word": false,
35
+ "special": true
36
+ },
37
+ "151647": {
38
+ "content": "<|object_ref_end|>",
39
+ "lstrip": false,
40
+ "normalized": false,
41
+ "rstrip": false,
42
+ "single_word": false,
43
+ "special": true
44
+ },
45
+ "151648": {
46
+ "content": "<|box_start|>",
47
+ "lstrip": false,
48
+ "normalized": false,
49
+ "rstrip": false,
50
+ "single_word": false,
51
+ "special": true
52
+ },
53
+ "151649": {
54
+ "content": "<|box_end|>",
55
+ "lstrip": false,
56
+ "normalized": false,
57
+ "rstrip": false,
58
+ "single_word": false,
59
+ "special": true
60
+ },
61
+ "151650": {
62
+ "content": "<|quad_start|>",
63
+ "lstrip": false,
64
+ "normalized": false,
65
+ "rstrip": false,
66
+ "single_word": false,
67
+ "special": true
68
+ },
69
+ "151651": {
70
+ "content": "<|quad_end|>",
71
+ "lstrip": false,
72
+ "normalized": false,
73
+ "rstrip": false,
74
+ "single_word": false,
75
+ "special": true
76
+ },
77
+ "151652": {
78
+ "content": "<|vision_start|>",
79
+ "lstrip": false,
80
+ "normalized": false,
81
+ "rstrip": false,
82
+ "single_word": false,
83
+ "special": true
84
+ },
85
+ "151653": {
86
+ "content": "<|vision_end|>",
87
+ "lstrip": false,
88
+ "normalized": false,
89
+ "rstrip": false,
90
+ "single_word": false,
91
+ "special": true
92
+ },
93
+ "151654": {
94
+ "content": "<|vision_pad|>",
95
+ "lstrip": false,
96
+ "normalized": false,
97
+ "rstrip": false,
98
+ "single_word": false,
99
+ "special": true
100
+ },
101
+ "151655": {
102
+ "content": "<|image_pad|>",
103
+ "lstrip": false,
104
+ "normalized": false,
105
+ "rstrip": false,
106
+ "single_word": false,
107
+ "special": true
108
+ },
109
+ "151656": {
110
+ "content": "<|video_pad|>",
111
+ "lstrip": false,
112
+ "normalized": false,
113
+ "rstrip": false,
114
+ "single_word": false,
115
+ "special": true
116
+ },
117
+ "151657": {
118
+ "content": "<tool_call>",
119
+ "lstrip": false,
120
+ "normalized": false,
121
+ "rstrip": false,
122
+ "single_word": false,
123
+ "special": false
124
+ },
125
+ "151658": {
126
+ "content": "</tool_call>",
127
+ "lstrip": false,
128
+ "normalized": false,
129
+ "rstrip": false,
130
+ "single_word": false,
131
+ "special": false
132
+ },
133
+ "151659": {
134
+ "content": "<|fim_prefix|>",
135
+ "lstrip": false,
136
+ "normalized": false,
137
+ "rstrip": false,
138
+ "single_word": false,
139
+ "special": false
140
+ },
141
+ "151660": {
142
+ "content": "<|fim_middle|>",
143
+ "lstrip": false,
144
+ "normalized": false,
145
+ "rstrip": false,
146
+ "single_word": false,
147
+ "special": false
148
+ },
149
+ "151661": {
150
+ "content": "<|fim_suffix|>",
151
+ "lstrip": false,
152
+ "normalized": false,
153
+ "rstrip": false,
154
+ "single_word": false,
155
+ "special": false
156
+ },
157
+ "151662": {
158
+ "content": "<|fim_pad|>",
159
+ "lstrip": false,
160
+ "normalized": false,
161
+ "rstrip": false,
162
+ "single_word": false,
163
+ "special": false
164
+ },
165
+ "151663": {
166
+ "content": "<|repo_name|>",
167
+ "lstrip": false,
168
+ "normalized": false,
169
+ "rstrip": false,
170
+ "single_word": false,
171
+ "special": false
172
+ },
173
+ "151664": {
174
+ "content": "<|file_sep|>",
175
+ "lstrip": false,
176
+ "normalized": false,
177
+ "rstrip": false,
178
+ "single_word": false,
179
+ "special": false
180
+ },
181
+ "151665": {
182
+ "content": "<tool_response>",
183
+ "lstrip": false,
184
+ "normalized": false,
185
+ "rstrip": false,
186
+ "single_word": false,
187
+ "special": false
188
+ },
189
+ "151666": {
190
+ "content": "</tool_response>",
191
+ "lstrip": false,
192
+ "normalized": false,
193
+ "rstrip": false,
194
+ "single_word": false,
195
+ "special": false
196
+ },
197
+ "151667": {
198
+ "content": "<think>",
199
+ "lstrip": false,
200
+ "normalized": false,
201
+ "rstrip": false,
202
+ "single_word": false,
203
+ "special": false
204
+ },
205
+ "151668": {
206
+ "content": "</think>",
207
+ "lstrip": false,
208
+ "normalized": false,
209
+ "rstrip": false,
210
+ "single_word": false,
211
+ "special": false
212
+ }
213
+ },
214
+ "additional_special_tokens": [
215
+ "<|im_start|>",
216
+ "<|im_end|>",
217
+ "<|object_ref_start|>",
218
+ "<|object_ref_end|>",
219
+ "<|box_start|>",
220
+ "<|box_end|>",
221
+ "<|quad_start|>",
222
+ "<|quad_end|>",
223
+ "<|vision_start|>",
224
+ "<|vision_end|>",
225
+ "<|vision_pad|>",
226
+ "<|image_pad|>",
227
+ "<|video_pad|>"
228
+ ],
229
+ "bos_token": null,
230
+ "clean_up_tokenization_spaces": false,
231
+ "eos_token": "<|im_end|>",
232
+ "errors": "replace",
233
+ "extra_special_tokens": {},
234
+ "model_max_length": 1010000,
235
+ "pad_token": "<|endoftext|>",
236
+ "split_special_tokens": false,
237
+ "tokenizer_class": "Qwen2Tokenizer",
238
+ "unk_token": null
239
+ }
vocab.json ADDED
The diff for this file is too large to render. See raw diff