CocoRoF commited on
Commit
eb0c9d7
·
verified ·
1 Parent(s): a8a5039

Polar_14B_DPO_Train

Browse files
.gitattributes CHANGED
@@ -33,3 +33,4 @@ 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
+ tokenizer.json filter=lfs diff=lfs merge=lfs -text
LICENSE ADDED
@@ -0,0 +1,202 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ APPENDIX: How to apply the Apache License to your work.
180
+
181
+ To apply the Apache License to your work, attach the following
182
+ boilerplate notice, with the fields enclosed by brackets "[]"
183
+ replaced with your own identifying information. (Don't include
184
+ the brackets!) The text should be enclosed in the appropriate
185
+ comment syntax for the file format. We also recommend that a
186
+ file or class name and description of purpose be included on the
187
+ same "printed page" as the copyright notice for easier
188
+ identification within third-party archives.
189
+
190
+ Copyright 2024 Alibaba Cloud
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,353 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ library_name: transformers
3
+ license: apache-2.0
4
+ license_link: https://huggingface.co/Qwen/Qwen3-14B/blob/main/LICENSE
5
+ pipeline_tag: text-generation
6
+ base_model:
7
+ - Qwen/Qwen3-14B-Base
8
+ ---
9
+
10
+ # Qwen3-14B
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
+ ## Qwen3 Highlights
16
+
17
+ Qwen3 is the latest generation of large language models in Qwen series, offering a comprehensive suite of dense and mixture-of-experts (MoE) models. Built upon extensive training, Qwen3 delivers groundbreaking advancements in reasoning, instruction-following, agent capabilities, and multilingual support, with the following key features:
18
+
19
+ - **Uniquely support of seamless switching between thinking mode** (for complex logical reasoning, math, and coding) and **non-thinking mode** (for efficient, general-purpose dialogue) **within single model**, ensuring optimal performance across various scenarios.
20
+ - **Significantly enhancement in its reasoning capabilities**, surpassing previous QwQ (in thinking mode) and Qwen2.5 instruct models (in non-thinking mode) on mathematics, code generation, and commonsense logical reasoning.
21
+ - **Superior human preference alignment**, excelling in creative writing, role-playing, multi-turn dialogues, and instruction following, to deliver a more natural, engaging, and immersive conversational experience.
22
+ - **Expertise in agent capabilities**, enabling precise integration with external tools in both thinking and unthinking modes and achieving leading performance among open-source models in complex agent-based tasks.
23
+ - **Support of 100+ languages and dialects** with strong capabilities for **multilingual instruction following** and **translation**.
24
+
25
+ ## Model Overview
26
+
27
+ **Qwen3-14B** has the following features:
28
+ - Type: Causal Language Models
29
+ - Training Stage: Pretraining & Post-training
30
+ - Number of Parameters: 14.8B
31
+ - Number of Paramaters (Non-Embedding): 13.2B
32
+ - Number of Layers: 40
33
+ - Number of Attention Heads (GQA): 40 for Q and 8 for KV
34
+ - Context Length: 32,768 natively and [131,072 tokens with YaRN](#processing-long-texts).
35
+
36
+ For more details, including benchmark evaluation, hardware requirements, and inference performance, please refer to our [blog](https://qwenlm.github.io/blog/qwen3/), [GitHub](https://github.com/QwenLM/Qwen3), and [Documentation](https://qwen.readthedocs.io/en/latest/).
37
+
38
+ ## Quickstart
39
+
40
+ The code of Qwen3 has been in the latest Hugging Face `transformers` and we advise you to use the latest version of `transformers`.
41
+
42
+ With `transformers<4.51.0`, you will encounter the following error:
43
+ ```
44
+ KeyError: 'qwen3'
45
+ ```
46
+
47
+ The following contains a code snippet illustrating how to use the model generate content based on given inputs.
48
+ ```python
49
+ from transformers import AutoModelForCausalLM, AutoTokenizer
50
+
51
+ model_name = "Qwen/Qwen3-14B"
52
+
53
+ # load the tokenizer and the model
54
+ tokenizer = AutoTokenizer.from_pretrained(model_name)
55
+ model = AutoModelForCausalLM.from_pretrained(
56
+ model_name,
57
+ torch_dtype="auto",
58
+ device_map="auto"
59
+ )
60
+
61
+ # prepare the model input
62
+ prompt = "Give me a short introduction to large language model."
63
+ messages = [
64
+ {"role": "user", "content": prompt}
65
+ ]
66
+ text = tokenizer.apply_chat_template(
67
+ messages,
68
+ tokenize=False,
69
+ add_generation_prompt=True,
70
+ enable_thinking=True # Switches between thinking and non-thinking modes. Default is True.
71
+ )
72
+ model_inputs = tokenizer([text], return_tensors="pt").to(model.device)
73
+
74
+ # conduct text completion
75
+ generated_ids = model.generate(
76
+ **model_inputs,
77
+ max_new_tokens=32768
78
+ )
79
+ output_ids = generated_ids[0][len(model_inputs.input_ids[0]):].tolist()
80
+
81
+ # parsing thinking content
82
+ try:
83
+ # rindex finding 151668 (</think>)
84
+ index = len(output_ids) - output_ids[::-1].index(151668)
85
+ except ValueError:
86
+ index = 0
87
+
88
+ thinking_content = tokenizer.decode(output_ids[:index], skip_special_tokens=True).strip("\n")
89
+ content = tokenizer.decode(output_ids[index:], skip_special_tokens=True).strip("\n")
90
+
91
+ print("thinking content:", thinking_content)
92
+ print("content:", content)
93
+ ```
94
+
95
+ For deployment, you can use `sglang>=0.4.6.post1` or `vllm>=0.8.5` or to create an OpenAI-compatible API endpoint:
96
+ - SGLang:
97
+ ```shell
98
+ python -m sglang.launch_server --model-path Qwen/Qwen3-14B --reasoning-parser qwen3
99
+ ```
100
+ - vLLM:
101
+ ```shell
102
+ vllm serve Qwen/Qwen3-14B --enable-reasoning --reasoning-parser deepseek_r1
103
+ ```
104
+
105
+ For local use, applications such as Ollama, LMStudio, MLX-LM, llama.cpp, and KTransformers have also supported Qwen3.
106
+
107
+ ## Switching Between Thinking and Non-Thinking Mode
108
+
109
+ > [!TIP]
110
+ > The `enable_thinking` switch is also available in APIs created by SGLang and vLLM.
111
+ > Please refer to our documentation for [SGLang](https://qwen.readthedocs.io/en/latest/deployment/sglang.html#thinking-non-thinking-modes) and [vLLM](https://qwen.readthedocs.io/en/latest/deployment/vllm.html#thinking-non-thinking-modes) users.
112
+
113
+ ### `enable_thinking=True`
114
+
115
+ By default, Qwen3 has thinking capabilities enabled, similar to QwQ-32B. This means the model will use its reasoning abilities to enhance the quality of generated responses. For example, when explicitly setting `enable_thinking=True` or leaving it as the default value in `tokenizer.apply_chat_template`, the model will engage its thinking mode.
116
+
117
+ ```python
118
+ text = tokenizer.apply_chat_template(
119
+ messages,
120
+ tokenize=False,
121
+ add_generation_prompt=True,
122
+ enable_thinking=True # True is the default value for enable_thinking
123
+ )
124
+ ```
125
+
126
+ In this mode, the model will generate think content wrapped in a `<think>...</think>` block, followed by the final response.
127
+
128
+ > [!NOTE]
129
+ > For thinking mode, use `Temperature=0.6`, `TopP=0.95`, `TopK=20`, and `MinP=0` (the default setting in `generation_config.json`). **DO NOT use greedy decoding**, as it can lead to performance degradation and endless repetitions. For more detailed guidance, please refer to the [Best Practices](#best-practices) section.
130
+
131
+
132
+ ### `enable_thinking=False`
133
+
134
+ We provide a hard switch to strictly disable the model's thinking behavior, aligning its functionality with the previous Qwen2.5-Instruct models. This mode is particularly useful in scenarios where disabling thinking is essential for enhancing efficiency.
135
+
136
+ ```python
137
+ text = tokenizer.apply_chat_template(
138
+ messages,
139
+ tokenize=False,
140
+ add_generation_prompt=True,
141
+ enable_thinking=False # Setting enable_thinking=False disables thinking mode
142
+ )
143
+ ```
144
+
145
+ In this mode, the model will not generate any think content and will not include a `<think>...</think>` block.
146
+
147
+ > [!NOTE]
148
+ > For non-thinking mode, we suggest using `Temperature=0.7`, `TopP=0.8`, `TopK=20`, and `MinP=0`. For more detailed guidance, please refer to the [Best Practices](#best-practices) section.
149
+
150
+ ### Advanced Usage: Switching Between Thinking and Non-Thinking Modes via User Input
151
+
152
+ We provide a soft switch mechanism that allows users to dynamically control the model's behavior when `enable_thinking=True`. Specifically, you can add `/think` and `/no_think` to user prompts or system messages to switch the model's thinking mode from turn to turn. The model will follow the most recent instruction in multi-turn conversations.
153
+
154
+ Here is an example of a multi-turn conversation:
155
+
156
+ ```python
157
+ from transformers import AutoModelForCausalLM, AutoTokenizer
158
+
159
+ class QwenChatbot:
160
+ def __init__(self, model_name="Qwen/Qwen3-14B"):
161
+ self.tokenizer = AutoTokenizer.from_pretrained(model_name)
162
+ self.model = AutoModelForCausalLM.from_pretrained(model_name)
163
+ self.history = []
164
+
165
+ def generate_response(self, user_input):
166
+ messages = self.history + [{"role": "user", "content": user_input}]
167
+
168
+ text = self.tokenizer.apply_chat_template(
169
+ messages,
170
+ tokenize=False,
171
+ add_generation_prompt=True
172
+ )
173
+
174
+ inputs = self.tokenizer(text, return_tensors="pt")
175
+ response_ids = self.model.generate(**inputs, max_new_tokens=32768)[0][len(inputs.input_ids[0]):].tolist()
176
+ response = self.tokenizer.decode(response_ids, skip_special_tokens=True)
177
+
178
+ # Update history
179
+ self.history.append({"role": "user", "content": user_input})
180
+ self.history.append({"role": "assistant", "content": response})
181
+
182
+ return response
183
+
184
+ # Example Usage
185
+ if __name__ == "__main__":
186
+ chatbot = QwenChatbot()
187
+
188
+ # First input (without /think or /no_think tags, thinking mode is enabled by default)
189
+ user_input_1 = "How many r's in strawberries?"
190
+ print(f"User: {user_input_1}")
191
+ response_1 = chatbot.generate_response(user_input_1)
192
+ print(f"Bot: {response_1}")
193
+ print("----------------------")
194
+
195
+ # Second input with /no_think
196
+ user_input_2 = "Then, how many r's in blueberries? /no_think"
197
+ print(f"User: {user_input_2}")
198
+ response_2 = chatbot.generate_response(user_input_2)
199
+ print(f"Bot: {response_2}")
200
+ print("----------------------")
201
+
202
+ # Third input with /think
203
+ user_input_3 = "Really? /think"
204
+ print(f"User: {user_input_3}")
205
+ response_3 = chatbot.generate_response(user_input_3)
206
+ print(f"Bot: {response_3}")
207
+ ```
208
+
209
+ > [!NOTE]
210
+ > For API compatibility, when `enable_thinking=True`, regardless of whether the user uses `/think` or `/no_think`, the model will always output a block wrapped in `<think>...</think>`. However, the content inside this block may be empty if thinking is disabled.
211
+ > When `enable_thinking=False`, the soft switches are not valid. Regardless of any `/think` or `/no_think` tags input by the user, the model will not generate think content and will not include a `<think>...</think>` block.
212
+
213
+ ## Agentic Use
214
+
215
+ 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.
216
+
217
+ 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.
218
+ ```python
219
+ from qwen_agent.agents import Assistant
220
+
221
+ # Define LLM
222
+ llm_cfg = {
223
+ 'model': 'Qwen3-14B',
224
+
225
+ # Use the endpoint provided by Alibaba Model Studio:
226
+ # 'model_type': 'qwen_dashscope',
227
+ # 'api_key': os.getenv('DASHSCOPE_API_KEY'),
228
+
229
+ # Use a custom endpoint compatible with OpenAI API:
230
+ 'model_server': 'http://localhost:8000/v1', # api_base
231
+ 'api_key': 'EMPTY',
232
+
233
+ # Other parameters:
234
+ # 'generate_cfg': {
235
+ # # Add: When the response content is `<think>this is the thought</think>this is the answer;
236
+ # # Do not add: When the response has been separated by reasoning_content and content.
237
+ # 'thought_in_content': True,
238
+ # },
239
+ }
240
+
241
+ # Define Tools
242
+ tools = [
243
+ {'mcpServers': { # You can specify the MCP configuration file
244
+ 'time': {
245
+ 'command': 'uvx',
246
+ 'args': ['mcp-server-time', '--local-timezone=Asia/Shanghai']
247
+ },
248
+ "fetch": {
249
+ "command": "uvx",
250
+ "args": ["mcp-server-fetch"]
251
+ }
252
+ }
253
+ },
254
+ 'code_interpreter', # Built-in tools
255
+ ]
256
+
257
+ # Define Agent
258
+ bot = Assistant(llm=llm_cfg, function_list=tools)
259
+
260
+ # Streaming generation
261
+ messages = [{'role': 'user', 'content': 'https://qwenlm.github.io/blog/ Introduce the latest developments of Qwen'}]
262
+ for responses in bot.run(messages=messages):
263
+ pass
264
+ print(responses)
265
+ ```
266
+
267
+ ## Processing Long Texts
268
+
269
+ Qwen3 natively supports context lengths of up to 32,768 tokens. 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. We have validated the model's performance on context lengths of up to 131,072 tokens using the [YaRN](https://arxiv.org/abs/2309.00071) method.
270
+
271
+ YaRN is currently supported by several inference frameworks, e.g., `transformers` and `llama.cpp` for local use, `vllm` and `sglang` for deployment. In general, there are two approaches to enabling YaRN for supported frameworks:
272
+
273
+ - Modifying the model files:
274
+ In the `config.json` file, add the `rope_scaling` fields:
275
+ ```json
276
+ {
277
+ ...,
278
+ "rope_scaling": {
279
+ "rope_type": "yarn",
280
+ "factor": 4.0,
281
+ "original_max_position_embeddings": 32768
282
+ }
283
+ }
284
+ ```
285
+ For `llama.cpp`, you need to regenerate the GGUF file after the modification.
286
+
287
+ - Passing command line arguments:
288
+
289
+ For `vllm`, you can use
290
+ ```shell
291
+ vllm serve ... --rope-scaling '{"rope_type":"yarn","factor":4.0,"original_max_position_embeddings":32768}' --max-model-len 131072
292
+ ```
293
+
294
+ For `sglang`, you can use
295
+ ```shell
296
+ python -m sglang.launch_server ... --json-model-override-args '{"rope_scaling":{"rope_type":"yarn","factor":4.0,"original_max_position_embeddings":32768}}'
297
+ ```
298
+
299
+ For `llama-server` from `llama.cpp`, you can use
300
+ ```shell
301
+ llama-server ... --rope-scaling yarn --rope-scale 4 --yarn-orig-ctx 32768
302
+ ```
303
+
304
+ > [!IMPORTANT]
305
+ > If you encounter the following warning
306
+ > ```
307
+ > Unrecognized keys in `rope_scaling` for 'rope_type'='yarn': {'original_max_position_embeddings'}
308
+ > ```
309
+ > please upgrade `transformers>=4.51.0`.
310
+
311
+ > [!NOTE]
312
+ > 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.**
313
+ > We advise adding the `rope_scaling` configuration only when processing long contexts is required.
314
+ > It is also recommended to modify the `factor` as needed. For example, if the typical context length for your application is 65,536 tokens, it would be better to set `factor` as 2.0.
315
+
316
+ > [!NOTE]
317
+ > The default `max_position_embeddings` in `config.json` is set to 40,960. This allocation includes reserving 32,768 tokens for outputs and 8,192 tokens for typical prompts, which is sufficient for most scenarios involving short text processing. If the average context length does not exceed 32,768 tokens, we do not recommend enabling YaRN in this scenario, as it may potentially degrade model performance.
318
+
319
+ > [!TIP]
320
+ > The endpoint provided by Alibaba Model Studio supports dynamic YaRN by default and no extra configuration is needed.
321
+
322
+ ## Best Practices
323
+
324
+ To achieve optimal performance, we recommend the following settings:
325
+
326
+ 1. **Sampling Parameters**:
327
+ - For thinking mode (`enable_thinking=True`), use `Temperature=0.6`, `TopP=0.95`, `TopK=20`, and `MinP=0`. **DO NOT use greedy decoding**, as it can lead to performance degradation and endless repetitions.
328
+ - For non-thinking mode (`enable_thinking=False`), we suggest using `Temperature=0.7`, `TopP=0.8`, `TopK=20`, and `MinP=0`.
329
+ - 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.
330
+
331
+ 2. **Adequate Output Length**: We recommend using an output length of 32,768 tokens for most queries. For benchmarking on highly complex problems, such as those found in math and programming competitions, we suggest setting the max output length to 38,912 tokens. This provides the model with sufficient space to generate detailed and comprehensive responses, thereby enhancing its overall performance.
332
+
333
+ 3. **Standardize Output Format**: We recommend using prompts to standardize model outputs when benchmarking.
334
+ - **Math Problems**: Include "Please reason step by step, and put your final answer within \boxed{}." in the prompt.
335
+ - **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"`."
336
+
337
+ 4. **No Thinking Content in History**: In multi-turn conversations, the historical model output should only include the final output part and does not need to include the thinking content. It is implemented in the provided chat template in Jinja2. However, for frameworks that do not directly use the Jinja2 chat template, it is up to the developers to ensure that the best practice is followed.
338
+
339
+ ### Citation
340
+
341
+ If you find our work helpful, feel free to give us a cite.
342
+
343
+ ```
344
+ @misc{qwen3technicalreport,
345
+ title={Qwen3 Technical Report},
346
+ author={Qwen Team},
347
+ year={2025},
348
+ eprint={2505.09388},
349
+ archivePrefix={arXiv},
350
+ primaryClass={cs.CL},
351
+ url={https://arxiv.org/abs/2505.09388},
352
+ }
353
+ ```
config.json ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "Qwen3ForCausalLM"
4
+ ],
5
+ "attention_bias": false,
6
+ "attention_dropout": 0.0,
7
+ "bos_token_id": 151643,
8
+ "eos_token_id": 151645,
9
+ "head_dim": 128,
10
+ "hidden_act": "silu",
11
+ "hidden_size": 5120,
12
+ "initializer_range": 0.02,
13
+ "intermediate_size": 17408,
14
+ "max_position_embeddings": 40960,
15
+ "max_window_layers": 40,
16
+ "model_type": "qwen3",
17
+ "num_attention_heads": 40,
18
+ "num_hidden_layers": 40,
19
+ "num_key_value_heads": 8,
20
+ "rms_norm_eps": 1e-06,
21
+ "rope_scaling": null,
22
+ "rope_theta": 1000000,
23
+ "sliding_window": null,
24
+ "tie_word_embeddings": false,
25
+ "torch_dtype": "bfloat16",
26
+ "transformers_version": "4.51.0",
27
+ "use_cache": true,
28
+ "use_sliding_window": false,
29
+ "vocab_size": 151936
30
+ }
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.6,
10
+ "top_k": 20,
11
+ "top_p": 0.95,
12
+ "transformers_version": "4.51.0"
13
+ }
merges.txt ADDED
The diff for this file is too large to render. See raw diff
 
model-00001-of-00008.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e942bdbdf08857d16a8fef7d1dae9fceabeb4e84def6043485fe2f6f085dab0e
3
+ size 3841788544
model-00002-of-00008.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f7c9c6eee628f5ad831d2d1d292e120505e5fcadeb38f88b4d3c4cb86306ccf9
3
+ size 3963750816
model-00003-of-00008.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:dfb8c5df9404b41ad6ae74e8b6b367135f017b4467b884cf71b17c71954f18a9
3
+ size 3963750880
model-00004-of-00008.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:eab286fec759e3e59ab228621aefa0fef14ed56039e06f959e67257d5af7604d
3
+ size 3963750880
model-00005-of-00008.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:97f0dc2992e59da95c466eff6f4fd0c8335843bbc36ed5c913a6f5150748c0e6
3
+ size 3963750880
model-00006-of-00008.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9e8e76a013cd5e253865b792991e0b410f869b136b3c500079b531b09198e99e
3
+ size 3963750880
model-00007-of-00008.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0aee70ee6e91dc00d818804fb47f124d13ee4ad5b4a64553e09dbf9391cd5750
3
+ size 3963750880
model-00008-of-00008.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0d6b92296e326d39bbbaeb32c3ec454ac606da843d4c8ffa8edf010b62b8c9e0
3
+ size 1912371880
model.safetensors.index.json ADDED
@@ -0,0 +1,450 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "metadata": {
3
+ "total_size": 29536614400
4
+ },
5
+ "weight_map": {
6
+ "lm_head.weight": "model-00008-of-00008.safetensors",
7
+ "model.embed_tokens.weight": "model-00001-of-00008.safetensors",
8
+ "model.layers.0.input_layernorm.weight": "model-00001-of-00008.safetensors",
9
+ "model.layers.0.mlp.down_proj.weight": "model-00001-of-00008.safetensors",
10
+ "model.layers.0.mlp.gate_proj.weight": "model-00001-of-00008.safetensors",
11
+ "model.layers.0.mlp.up_proj.weight": "model-00001-of-00008.safetensors",
12
+ "model.layers.0.post_attention_layernorm.weight": "model-00001-of-00008.safetensors",
13
+ "model.layers.0.self_attn.k_norm.weight": "model-00001-of-00008.safetensors",
14
+ "model.layers.0.self_attn.k_proj.weight": "model-00001-of-00008.safetensors",
15
+ "model.layers.0.self_attn.o_proj.weight": "model-00001-of-00008.safetensors",
16
+ "model.layers.0.self_attn.q_norm.weight": "model-00001-of-00008.safetensors",
17
+ "model.layers.0.self_attn.q_proj.weight": "model-00001-of-00008.safetensors",
18
+ "model.layers.0.self_attn.v_proj.weight": "model-00001-of-00008.safetensors",
19
+ "model.layers.1.input_layernorm.weight": "model-00001-of-00008.safetensors",
20
+ "model.layers.1.mlp.down_proj.weight": "model-00001-of-00008.safetensors",
21
+ "model.layers.1.mlp.gate_proj.weight": "model-00001-of-00008.safetensors",
22
+ "model.layers.1.mlp.up_proj.weight": "model-00001-of-00008.safetensors",
23
+ "model.layers.1.post_attention_layernorm.weight": "model-00001-of-00008.safetensors",
24
+ "model.layers.1.self_attn.k_norm.weight": "model-00001-of-00008.safetensors",
25
+ "model.layers.1.self_attn.k_proj.weight": "model-00001-of-00008.safetensors",
26
+ "model.layers.1.self_attn.o_proj.weight": "model-00001-of-00008.safetensors",
27
+ "model.layers.1.self_attn.q_norm.weight": "model-00001-of-00008.safetensors",
28
+ "model.layers.1.self_attn.q_proj.weight": "model-00001-of-00008.safetensors",
29
+ "model.layers.1.self_attn.v_proj.weight": "model-00001-of-00008.safetensors",
30
+ "model.layers.10.input_layernorm.weight": "model-00003-of-00008.safetensors",
31
+ "model.layers.10.mlp.down_proj.weight": "model-00003-of-00008.safetensors",
32
+ "model.layers.10.mlp.gate_proj.weight": "model-00003-of-00008.safetensors",
33
+ "model.layers.10.mlp.up_proj.weight": "model-00003-of-00008.safetensors",
34
+ "model.layers.10.post_attention_layernorm.weight": "model-00003-of-00008.safetensors",
35
+ "model.layers.10.self_attn.k_norm.weight": "model-00003-of-00008.safetensors",
36
+ "model.layers.10.self_attn.k_proj.weight": "model-00003-of-00008.safetensors",
37
+ "model.layers.10.self_attn.o_proj.weight": "model-00003-of-00008.safetensors",
38
+ "model.layers.10.self_attn.q_norm.weight": "model-00003-of-00008.safetensors",
39
+ "model.layers.10.self_attn.q_proj.weight": "model-00003-of-00008.safetensors",
40
+ "model.layers.10.self_attn.v_proj.weight": "model-00003-of-00008.safetensors",
41
+ "model.layers.11.input_layernorm.weight": "model-00003-of-00008.safetensors",
42
+ "model.layers.11.mlp.down_proj.weight": "model-00003-of-00008.safetensors",
43
+ "model.layers.11.mlp.gate_proj.weight": "model-00003-of-00008.safetensors",
44
+ "model.layers.11.mlp.up_proj.weight": "model-00003-of-00008.safetensors",
45
+ "model.layers.11.post_attention_layernorm.weight": "model-00003-of-00008.safetensors",
46
+ "model.layers.11.self_attn.k_norm.weight": "model-00003-of-00008.safetensors",
47
+ "model.layers.11.self_attn.k_proj.weight": "model-00003-of-00008.safetensors",
48
+ "model.layers.11.self_attn.o_proj.weight": "model-00003-of-00008.safetensors",
49
+ "model.layers.11.self_attn.q_norm.weight": "model-00003-of-00008.safetensors",
50
+ "model.layers.11.self_attn.q_proj.weight": "model-00003-of-00008.safetensors",
51
+ "model.layers.11.self_attn.v_proj.weight": "model-00003-of-00008.safetensors",
52
+ "model.layers.12.input_layernorm.weight": "model-00003-of-00008.safetensors",
53
+ "model.layers.12.mlp.down_proj.weight": "model-00003-of-00008.safetensors",
54
+ "model.layers.12.mlp.gate_proj.weight": "model-00003-of-00008.safetensors",
55
+ "model.layers.12.mlp.up_proj.weight": "model-00003-of-00008.safetensors",
56
+ "model.layers.12.post_attention_layernorm.weight": "model-00003-of-00008.safetensors",
57
+ "model.layers.12.self_attn.k_norm.weight": "model-00003-of-00008.safetensors",
58
+ "model.layers.12.self_attn.k_proj.weight": "model-00003-of-00008.safetensors",
59
+ "model.layers.12.self_attn.o_proj.weight": "model-00003-of-00008.safetensors",
60
+ "model.layers.12.self_attn.q_norm.weight": "model-00003-of-00008.safetensors",
61
+ "model.layers.12.self_attn.q_proj.weight": "model-00003-of-00008.safetensors",
62
+ "model.layers.12.self_attn.v_proj.weight": "model-00003-of-00008.safetensors",
63
+ "model.layers.13.input_layernorm.weight": "model-00003-of-00008.safetensors",
64
+ "model.layers.13.mlp.down_proj.weight": "model-00003-of-00008.safetensors",
65
+ "model.layers.13.mlp.gate_proj.weight": "model-00003-of-00008.safetensors",
66
+ "model.layers.13.mlp.up_proj.weight": "model-00003-of-00008.safetensors",
67
+ "model.layers.13.post_attention_layernorm.weight": "model-00003-of-00008.safetensors",
68
+ "model.layers.13.self_attn.k_norm.weight": "model-00003-of-00008.safetensors",
69
+ "model.layers.13.self_attn.k_proj.weight": "model-00003-of-00008.safetensors",
70
+ "model.layers.13.self_attn.o_proj.weight": "model-00003-of-00008.safetensors",
71
+ "model.layers.13.self_attn.q_norm.weight": "model-00003-of-00008.safetensors",
72
+ "model.layers.13.self_attn.q_proj.weight": "model-00003-of-00008.safetensors",
73
+ "model.layers.13.self_attn.v_proj.weight": "model-00003-of-00008.safetensors",
74
+ "model.layers.14.input_layernorm.weight": "model-00003-of-00008.safetensors",
75
+ "model.layers.14.mlp.down_proj.weight": "model-00003-of-00008.safetensors",
76
+ "model.layers.14.mlp.gate_proj.weight": "model-00003-of-00008.safetensors",
77
+ "model.layers.14.mlp.up_proj.weight": "model-00003-of-00008.safetensors",
78
+ "model.layers.14.post_attention_layernorm.weight": "model-00003-of-00008.safetensors",
79
+ "model.layers.14.self_attn.k_norm.weight": "model-00003-of-00008.safetensors",
80
+ "model.layers.14.self_attn.k_proj.weight": "model-00003-of-00008.safetensors",
81
+ "model.layers.14.self_attn.o_proj.weight": "model-00003-of-00008.safetensors",
82
+ "model.layers.14.self_attn.q_norm.weight": "model-00003-of-00008.safetensors",
83
+ "model.layers.14.self_attn.q_proj.weight": "model-00003-of-00008.safetensors",
84
+ "model.layers.14.self_attn.v_proj.weight": "model-00003-of-00008.safetensors",
85
+ "model.layers.15.input_layernorm.weight": "model-00004-of-00008.safetensors",
86
+ "model.layers.15.mlp.down_proj.weight": "model-00004-of-00008.safetensors",
87
+ "model.layers.15.mlp.gate_proj.weight": "model-00003-of-00008.safetensors",
88
+ "model.layers.15.mlp.up_proj.weight": "model-00004-of-00008.safetensors",
89
+ "model.layers.15.post_attention_layernorm.weight": "model-00004-of-00008.safetensors",
90
+ "model.layers.15.self_attn.k_norm.weight": "model-00003-of-00008.safetensors",
91
+ "model.layers.15.self_attn.k_proj.weight": "model-00003-of-00008.safetensors",
92
+ "model.layers.15.self_attn.o_proj.weight": "model-00003-of-00008.safetensors",
93
+ "model.layers.15.self_attn.q_norm.weight": "model-00003-of-00008.safetensors",
94
+ "model.layers.15.self_attn.q_proj.weight": "model-00003-of-00008.safetensors",
95
+ "model.layers.15.self_attn.v_proj.weight": "model-00003-of-00008.safetensors",
96
+ "model.layers.16.input_layernorm.weight": "model-00004-of-00008.safetensors",
97
+ "model.layers.16.mlp.down_proj.weight": "model-00004-of-00008.safetensors",
98
+ "model.layers.16.mlp.gate_proj.weight": "model-00004-of-00008.safetensors",
99
+ "model.layers.16.mlp.up_proj.weight": "model-00004-of-00008.safetensors",
100
+ "model.layers.16.post_attention_layernorm.weight": "model-00004-of-00008.safetensors",
101
+ "model.layers.16.self_attn.k_norm.weight": "model-00004-of-00008.safetensors",
102
+ "model.layers.16.self_attn.k_proj.weight": "model-00004-of-00008.safetensors",
103
+ "model.layers.16.self_attn.o_proj.weight": "model-00004-of-00008.safetensors",
104
+ "model.layers.16.self_attn.q_norm.weight": "model-00004-of-00008.safetensors",
105
+ "model.layers.16.self_attn.q_proj.weight": "model-00004-of-00008.safetensors",
106
+ "model.layers.16.self_attn.v_proj.weight": "model-00004-of-00008.safetensors",
107
+ "model.layers.17.input_layernorm.weight": "model-00004-of-00008.safetensors",
108
+ "model.layers.17.mlp.down_proj.weight": "model-00004-of-00008.safetensors",
109
+ "model.layers.17.mlp.gate_proj.weight": "model-00004-of-00008.safetensors",
110
+ "model.layers.17.mlp.up_proj.weight": "model-00004-of-00008.safetensors",
111
+ "model.layers.17.post_attention_layernorm.weight": "model-00004-of-00008.safetensors",
112
+ "model.layers.17.self_attn.k_norm.weight": "model-00004-of-00008.safetensors",
113
+ "model.layers.17.self_attn.k_proj.weight": "model-00004-of-00008.safetensors",
114
+ "model.layers.17.self_attn.o_proj.weight": "model-00004-of-00008.safetensors",
115
+ "model.layers.17.self_attn.q_norm.weight": "model-00004-of-00008.safetensors",
116
+ "model.layers.17.self_attn.q_proj.weight": "model-00004-of-00008.safetensors",
117
+ "model.layers.17.self_attn.v_proj.weight": "model-00004-of-00008.safetensors",
118
+ "model.layers.18.input_layernorm.weight": "model-00004-of-00008.safetensors",
119
+ "model.layers.18.mlp.down_proj.weight": "model-00004-of-00008.safetensors",
120
+ "model.layers.18.mlp.gate_proj.weight": "model-00004-of-00008.safetensors",
121
+ "model.layers.18.mlp.up_proj.weight": "model-00004-of-00008.safetensors",
122
+ "model.layers.18.post_attention_layernorm.weight": "model-00004-of-00008.safetensors",
123
+ "model.layers.18.self_attn.k_norm.weight": "model-00004-of-00008.safetensors",
124
+ "model.layers.18.self_attn.k_proj.weight": "model-00004-of-00008.safetensors",
125
+ "model.layers.18.self_attn.o_proj.weight": "model-00004-of-00008.safetensors",
126
+ "model.layers.18.self_attn.q_norm.weight": "model-00004-of-00008.safetensors",
127
+ "model.layers.18.self_attn.q_proj.weight": "model-00004-of-00008.safetensors",
128
+ "model.layers.18.self_attn.v_proj.weight": "model-00004-of-00008.safetensors",
129
+ "model.layers.19.input_layernorm.weight": "model-00004-of-00008.safetensors",
130
+ "model.layers.19.mlp.down_proj.weight": "model-00004-of-00008.safetensors",
131
+ "model.layers.19.mlp.gate_proj.weight": "model-00004-of-00008.safetensors",
132
+ "model.layers.19.mlp.up_proj.weight": "model-00004-of-00008.safetensors",
133
+ "model.layers.19.post_attention_layernorm.weight": "model-00004-of-00008.safetensors",
134
+ "model.layers.19.self_attn.k_norm.weight": "model-00004-of-00008.safetensors",
135
+ "model.layers.19.self_attn.k_proj.weight": "model-00004-of-00008.safetensors",
136
+ "model.layers.19.self_attn.o_proj.weight": "model-00004-of-00008.safetensors",
137
+ "model.layers.19.self_attn.q_norm.weight": "model-00004-of-00008.safetensors",
138
+ "model.layers.19.self_attn.q_proj.weight": "model-00004-of-00008.safetensors",
139
+ "model.layers.19.self_attn.v_proj.weight": "model-00004-of-00008.safetensors",
140
+ "model.layers.2.input_layernorm.weight": "model-00001-of-00008.safetensors",
141
+ "model.layers.2.mlp.down_proj.weight": "model-00001-of-00008.safetensors",
142
+ "model.layers.2.mlp.gate_proj.weight": "model-00001-of-00008.safetensors",
143
+ "model.layers.2.mlp.up_proj.weight": "model-00001-of-00008.safetensors",
144
+ "model.layers.2.post_attention_layernorm.weight": "model-00001-of-00008.safetensors",
145
+ "model.layers.2.self_attn.k_norm.weight": "model-00001-of-00008.safetensors",
146
+ "model.layers.2.self_attn.k_proj.weight": "model-00001-of-00008.safetensors",
147
+ "model.layers.2.self_attn.o_proj.weight": "model-00001-of-00008.safetensors",
148
+ "model.layers.2.self_attn.q_norm.weight": "model-00001-of-00008.safetensors",
149
+ "model.layers.2.self_attn.q_proj.weight": "model-00001-of-00008.safetensors",
150
+ "model.layers.2.self_attn.v_proj.weight": "model-00001-of-00008.safetensors",
151
+ "model.layers.20.input_layernorm.weight": "model-00004-of-00008.safetensors",
152
+ "model.layers.20.mlp.down_proj.weight": "model-00004-of-00008.safetensors",
153
+ "model.layers.20.mlp.gate_proj.weight": "model-00004-of-00008.safetensors",
154
+ "model.layers.20.mlp.up_proj.weight": "model-00004-of-00008.safetensors",
155
+ "model.layers.20.post_attention_layernorm.weight": "model-00004-of-00008.safetensors",
156
+ "model.layers.20.self_attn.k_norm.weight": "model-00004-of-00008.safetensors",
157
+ "model.layers.20.self_attn.k_proj.weight": "model-00004-of-00008.safetensors",
158
+ "model.layers.20.self_attn.o_proj.weight": "model-00004-of-00008.safetensors",
159
+ "model.layers.20.self_attn.q_norm.weight": "model-00004-of-00008.safetensors",
160
+ "model.layers.20.self_attn.q_proj.weight": "model-00004-of-00008.safetensors",
161
+ "model.layers.20.self_attn.v_proj.weight": "model-00004-of-00008.safetensors",
162
+ "model.layers.21.input_layernorm.weight": "model-00005-of-00008.safetensors",
163
+ "model.layers.21.mlp.down_proj.weight": "model-00005-of-00008.safetensors",
164
+ "model.layers.21.mlp.gate_proj.weight": "model-00004-of-00008.safetensors",
165
+ "model.layers.21.mlp.up_proj.weight": "model-00005-of-00008.safetensors",
166
+ "model.layers.21.post_attention_layernorm.weight": "model-00005-of-00008.safetensors",
167
+ "model.layers.21.self_attn.k_norm.weight": "model-00004-of-00008.safetensors",
168
+ "model.layers.21.self_attn.k_proj.weight": "model-00004-of-00008.safetensors",
169
+ "model.layers.21.self_attn.o_proj.weight": "model-00004-of-00008.safetensors",
170
+ "model.layers.21.self_attn.q_norm.weight": "model-00004-of-00008.safetensors",
171
+ "model.layers.21.self_attn.q_proj.weight": "model-00004-of-00008.safetensors",
172
+ "model.layers.21.self_attn.v_proj.weight": "model-00004-of-00008.safetensors",
173
+ "model.layers.22.input_layernorm.weight": "model-00005-of-00008.safetensors",
174
+ "model.layers.22.mlp.down_proj.weight": "model-00005-of-00008.safetensors",
175
+ "model.layers.22.mlp.gate_proj.weight": "model-00005-of-00008.safetensors",
176
+ "model.layers.22.mlp.up_proj.weight": "model-00005-of-00008.safetensors",
177
+ "model.layers.22.post_attention_layernorm.weight": "model-00005-of-00008.safetensors",
178
+ "model.layers.22.self_attn.k_norm.weight": "model-00005-of-00008.safetensors",
179
+ "model.layers.22.self_attn.k_proj.weight": "model-00005-of-00008.safetensors",
180
+ "model.layers.22.self_attn.o_proj.weight": "model-00005-of-00008.safetensors",
181
+ "model.layers.22.self_attn.q_norm.weight": "model-00005-of-00008.safetensors",
182
+ "model.layers.22.self_attn.q_proj.weight": "model-00005-of-00008.safetensors",
183
+ "model.layers.22.self_attn.v_proj.weight": "model-00005-of-00008.safetensors",
184
+ "model.layers.23.input_layernorm.weight": "model-00005-of-00008.safetensors",
185
+ "model.layers.23.mlp.down_proj.weight": "model-00005-of-00008.safetensors",
186
+ "model.layers.23.mlp.gate_proj.weight": "model-00005-of-00008.safetensors",
187
+ "model.layers.23.mlp.up_proj.weight": "model-00005-of-00008.safetensors",
188
+ "model.layers.23.post_attention_layernorm.weight": "model-00005-of-00008.safetensors",
189
+ "model.layers.23.self_attn.k_norm.weight": "model-00005-of-00008.safetensors",
190
+ "model.layers.23.self_attn.k_proj.weight": "model-00005-of-00008.safetensors",
191
+ "model.layers.23.self_attn.o_proj.weight": "model-00005-of-00008.safetensors",
192
+ "model.layers.23.self_attn.q_norm.weight": "model-00005-of-00008.safetensors",
193
+ "model.layers.23.self_attn.q_proj.weight": "model-00005-of-00008.safetensors",
194
+ "model.layers.23.self_attn.v_proj.weight": "model-00005-of-00008.safetensors",
195
+ "model.layers.24.input_layernorm.weight": "model-00005-of-00008.safetensors",
196
+ "model.layers.24.mlp.down_proj.weight": "model-00005-of-00008.safetensors",
197
+ "model.layers.24.mlp.gate_proj.weight": "model-00005-of-00008.safetensors",
198
+ "model.layers.24.mlp.up_proj.weight": "model-00005-of-00008.safetensors",
199
+ "model.layers.24.post_attention_layernorm.weight": "model-00005-of-00008.safetensors",
200
+ "model.layers.24.self_attn.k_norm.weight": "model-00005-of-00008.safetensors",
201
+ "model.layers.24.self_attn.k_proj.weight": "model-00005-of-00008.safetensors",
202
+ "model.layers.24.self_attn.o_proj.weight": "model-00005-of-00008.safetensors",
203
+ "model.layers.24.self_attn.q_norm.weight": "model-00005-of-00008.safetensors",
204
+ "model.layers.24.self_attn.q_proj.weight": "model-00005-of-00008.safetensors",
205
+ "model.layers.24.self_attn.v_proj.weight": "model-00005-of-00008.safetensors",
206
+ "model.layers.25.input_layernorm.weight": "model-00005-of-00008.safetensors",
207
+ "model.layers.25.mlp.down_proj.weight": "model-00005-of-00008.safetensors",
208
+ "model.layers.25.mlp.gate_proj.weight": "model-00005-of-00008.safetensors",
209
+ "model.layers.25.mlp.up_proj.weight": "model-00005-of-00008.safetensors",
210
+ "model.layers.25.post_attention_layernorm.weight": "model-00005-of-00008.safetensors",
211
+ "model.layers.25.self_attn.k_norm.weight": "model-00005-of-00008.safetensors",
212
+ "model.layers.25.self_attn.k_proj.weight": "model-00005-of-00008.safetensors",
213
+ "model.layers.25.self_attn.o_proj.weight": "model-00005-of-00008.safetensors",
214
+ "model.layers.25.self_attn.q_norm.weight": "model-00005-of-00008.safetensors",
215
+ "model.layers.25.self_attn.q_proj.weight": "model-00005-of-00008.safetensors",
216
+ "model.layers.25.self_attn.v_proj.weight": "model-00005-of-00008.safetensors",
217
+ "model.layers.26.input_layernorm.weight": "model-00005-of-00008.safetensors",
218
+ "model.layers.26.mlp.down_proj.weight": "model-00005-of-00008.safetensors",
219
+ "model.layers.26.mlp.gate_proj.weight": "model-00005-of-00008.safetensors",
220
+ "model.layers.26.mlp.up_proj.weight": "model-00005-of-00008.safetensors",
221
+ "model.layers.26.post_attention_layernorm.weight": "model-00005-of-00008.safetensors",
222
+ "model.layers.26.self_attn.k_norm.weight": "model-00005-of-00008.safetensors",
223
+ "model.layers.26.self_attn.k_proj.weight": "model-00005-of-00008.safetensors",
224
+ "model.layers.26.self_attn.o_proj.weight": "model-00005-of-00008.safetensors",
225
+ "model.layers.26.self_attn.q_norm.weight": "model-00005-of-00008.safetensors",
226
+ "model.layers.26.self_attn.q_proj.weight": "model-00005-of-00008.safetensors",
227
+ "model.layers.26.self_attn.v_proj.weight": "model-00005-of-00008.safetensors",
228
+ "model.layers.27.input_layernorm.weight": "model-00006-of-00008.safetensors",
229
+ "model.layers.27.mlp.down_proj.weight": "model-00006-of-00008.safetensors",
230
+ "model.layers.27.mlp.gate_proj.weight": "model-00005-of-00008.safetensors",
231
+ "model.layers.27.mlp.up_proj.weight": "model-00006-of-00008.safetensors",
232
+ "model.layers.27.post_attention_layernorm.weight": "model-00006-of-00008.safetensors",
233
+ "model.layers.27.self_attn.k_norm.weight": "model-00005-of-00008.safetensors",
234
+ "model.layers.27.self_attn.k_proj.weight": "model-00005-of-00008.safetensors",
235
+ "model.layers.27.self_attn.o_proj.weight": "model-00005-of-00008.safetensors",
236
+ "model.layers.27.self_attn.q_norm.weight": "model-00005-of-00008.safetensors",
237
+ "model.layers.27.self_attn.q_proj.weight": "model-00005-of-00008.safetensors",
238
+ "model.layers.27.self_attn.v_proj.weight": "model-00005-of-00008.safetensors",
239
+ "model.layers.28.input_layernorm.weight": "model-00006-of-00008.safetensors",
240
+ "model.layers.28.mlp.down_proj.weight": "model-00006-of-00008.safetensors",
241
+ "model.layers.28.mlp.gate_proj.weight": "model-00006-of-00008.safetensors",
242
+ "model.layers.28.mlp.up_proj.weight": "model-00006-of-00008.safetensors",
243
+ "model.layers.28.post_attention_layernorm.weight": "model-00006-of-00008.safetensors",
244
+ "model.layers.28.self_attn.k_norm.weight": "model-00006-of-00008.safetensors",
245
+ "model.layers.28.self_attn.k_proj.weight": "model-00006-of-00008.safetensors",
246
+ "model.layers.28.self_attn.o_proj.weight": "model-00006-of-00008.safetensors",
247
+ "model.layers.28.self_attn.q_norm.weight": "model-00006-of-00008.safetensors",
248
+ "model.layers.28.self_attn.q_proj.weight": "model-00006-of-00008.safetensors",
249
+ "model.layers.28.self_attn.v_proj.weight": "model-00006-of-00008.safetensors",
250
+ "model.layers.29.input_layernorm.weight": "model-00006-of-00008.safetensors",
251
+ "model.layers.29.mlp.down_proj.weight": "model-00006-of-00008.safetensors",
252
+ "model.layers.29.mlp.gate_proj.weight": "model-00006-of-00008.safetensors",
253
+ "model.layers.29.mlp.up_proj.weight": "model-00006-of-00008.safetensors",
254
+ "model.layers.29.post_attention_layernorm.weight": "model-00006-of-00008.safetensors",
255
+ "model.layers.29.self_attn.k_norm.weight": "model-00006-of-00008.safetensors",
256
+ "model.layers.29.self_attn.k_proj.weight": "model-00006-of-00008.safetensors",
257
+ "model.layers.29.self_attn.o_proj.weight": "model-00006-of-00008.safetensors",
258
+ "model.layers.29.self_attn.q_norm.weight": "model-00006-of-00008.safetensors",
259
+ "model.layers.29.self_attn.q_proj.weight": "model-00006-of-00008.safetensors",
260
+ "model.layers.29.self_attn.v_proj.weight": "model-00006-of-00008.safetensors",
261
+ "model.layers.3.input_layernorm.weight": "model-00002-of-00008.safetensors",
262
+ "model.layers.3.mlp.down_proj.weight": "model-00002-of-00008.safetensors",
263
+ "model.layers.3.mlp.gate_proj.weight": "model-00001-of-00008.safetensors",
264
+ "model.layers.3.mlp.up_proj.weight": "model-00002-of-00008.safetensors",
265
+ "model.layers.3.post_attention_layernorm.weight": "model-00002-of-00008.safetensors",
266
+ "model.layers.3.self_attn.k_norm.weight": "model-00001-of-00008.safetensors",
267
+ "model.layers.3.self_attn.k_proj.weight": "model-00001-of-00008.safetensors",
268
+ "model.layers.3.self_attn.o_proj.weight": "model-00001-of-00008.safetensors",
269
+ "model.layers.3.self_attn.q_norm.weight": "model-00001-of-00008.safetensors",
270
+ "model.layers.3.self_attn.q_proj.weight": "model-00001-of-00008.safetensors",
271
+ "model.layers.3.self_attn.v_proj.weight": "model-00001-of-00008.safetensors",
272
+ "model.layers.30.input_layernorm.weight": "model-00006-of-00008.safetensors",
273
+ "model.layers.30.mlp.down_proj.weight": "model-00006-of-00008.safetensors",
274
+ "model.layers.30.mlp.gate_proj.weight": "model-00006-of-00008.safetensors",
275
+ "model.layers.30.mlp.up_proj.weight": "model-00006-of-00008.safetensors",
276
+ "model.layers.30.post_attention_layernorm.weight": "model-00006-of-00008.safetensors",
277
+ "model.layers.30.self_attn.k_norm.weight": "model-00006-of-00008.safetensors",
278
+ "model.layers.30.self_attn.k_proj.weight": "model-00006-of-00008.safetensors",
279
+ "model.layers.30.self_attn.o_proj.weight": "model-00006-of-00008.safetensors",
280
+ "model.layers.30.self_attn.q_norm.weight": "model-00006-of-00008.safetensors",
281
+ "model.layers.30.self_attn.q_proj.weight": "model-00006-of-00008.safetensors",
282
+ "model.layers.30.self_attn.v_proj.weight": "model-00006-of-00008.safetensors",
283
+ "model.layers.31.input_layernorm.weight": "model-00006-of-00008.safetensors",
284
+ "model.layers.31.mlp.down_proj.weight": "model-00006-of-00008.safetensors",
285
+ "model.layers.31.mlp.gate_proj.weight": "model-00006-of-00008.safetensors",
286
+ "model.layers.31.mlp.up_proj.weight": "model-00006-of-00008.safetensors",
287
+ "model.layers.31.post_attention_layernorm.weight": "model-00006-of-00008.safetensors",
288
+ "model.layers.31.self_attn.k_norm.weight": "model-00006-of-00008.safetensors",
289
+ "model.layers.31.self_attn.k_proj.weight": "model-00006-of-00008.safetensors",
290
+ "model.layers.31.self_attn.o_proj.weight": "model-00006-of-00008.safetensors",
291
+ "model.layers.31.self_attn.q_norm.weight": "model-00006-of-00008.safetensors",
292
+ "model.layers.31.self_attn.q_proj.weight": "model-00006-of-00008.safetensors",
293
+ "model.layers.31.self_attn.v_proj.weight": "model-00006-of-00008.safetensors",
294
+ "model.layers.32.input_layernorm.weight": "model-00006-of-00008.safetensors",
295
+ "model.layers.32.mlp.down_proj.weight": "model-00006-of-00008.safetensors",
296
+ "model.layers.32.mlp.gate_proj.weight": "model-00006-of-00008.safetensors",
297
+ "model.layers.32.mlp.up_proj.weight": "model-00006-of-00008.safetensors",
298
+ "model.layers.32.post_attention_layernorm.weight": "model-00006-of-00008.safetensors",
299
+ "model.layers.32.self_attn.k_norm.weight": "model-00006-of-00008.safetensors",
300
+ "model.layers.32.self_attn.k_proj.weight": "model-00006-of-00008.safetensors",
301
+ "model.layers.32.self_attn.o_proj.weight": "model-00006-of-00008.safetensors",
302
+ "model.layers.32.self_attn.q_norm.weight": "model-00006-of-00008.safetensors",
303
+ "model.layers.32.self_attn.q_proj.weight": "model-00006-of-00008.safetensors",
304
+ "model.layers.32.self_attn.v_proj.weight": "model-00006-of-00008.safetensors",
305
+ "model.layers.33.input_layernorm.weight": "model-00007-of-00008.safetensors",
306
+ "model.layers.33.mlp.down_proj.weight": "model-00007-of-00008.safetensors",
307
+ "model.layers.33.mlp.gate_proj.weight": "model-00006-of-00008.safetensors",
308
+ "model.layers.33.mlp.up_proj.weight": "model-00007-of-00008.safetensors",
309
+ "model.layers.33.post_attention_layernorm.weight": "model-00007-of-00008.safetensors",
310
+ "model.layers.33.self_attn.k_norm.weight": "model-00006-of-00008.safetensors",
311
+ "model.layers.33.self_attn.k_proj.weight": "model-00006-of-00008.safetensors",
312
+ "model.layers.33.self_attn.o_proj.weight": "model-00006-of-00008.safetensors",
313
+ "model.layers.33.self_attn.q_norm.weight": "model-00006-of-00008.safetensors",
314
+ "model.layers.33.self_attn.q_proj.weight": "model-00006-of-00008.safetensors",
315
+ "model.layers.33.self_attn.v_proj.weight": "model-00006-of-00008.safetensors",
316
+ "model.layers.34.input_layernorm.weight": "model-00007-of-00008.safetensors",
317
+ "model.layers.34.mlp.down_proj.weight": "model-00007-of-00008.safetensors",
318
+ "model.layers.34.mlp.gate_proj.weight": "model-00007-of-00008.safetensors",
319
+ "model.layers.34.mlp.up_proj.weight": "model-00007-of-00008.safetensors",
320
+ "model.layers.34.post_attention_layernorm.weight": "model-00007-of-00008.safetensors",
321
+ "model.layers.34.self_attn.k_norm.weight": "model-00007-of-00008.safetensors",
322
+ "model.layers.34.self_attn.k_proj.weight": "model-00007-of-00008.safetensors",
323
+ "model.layers.34.self_attn.o_proj.weight": "model-00007-of-00008.safetensors",
324
+ "model.layers.34.self_attn.q_norm.weight": "model-00007-of-00008.safetensors",
325
+ "model.layers.34.self_attn.q_proj.weight": "model-00007-of-00008.safetensors",
326
+ "model.layers.34.self_attn.v_proj.weight": "model-00007-of-00008.safetensors",
327
+ "model.layers.35.input_layernorm.weight": "model-00007-of-00008.safetensors",
328
+ "model.layers.35.mlp.down_proj.weight": "model-00007-of-00008.safetensors",
329
+ "model.layers.35.mlp.gate_proj.weight": "model-00007-of-00008.safetensors",
330
+ "model.layers.35.mlp.up_proj.weight": "model-00007-of-00008.safetensors",
331
+ "model.layers.35.post_attention_layernorm.weight": "model-00007-of-00008.safetensors",
332
+ "model.layers.35.self_attn.k_norm.weight": "model-00007-of-00008.safetensors",
333
+ "model.layers.35.self_attn.k_proj.weight": "model-00007-of-00008.safetensors",
334
+ "model.layers.35.self_attn.o_proj.weight": "model-00007-of-00008.safetensors",
335
+ "model.layers.35.self_attn.q_norm.weight": "model-00007-of-00008.safetensors",
336
+ "model.layers.35.self_attn.q_proj.weight": "model-00007-of-00008.safetensors",
337
+ "model.layers.35.self_attn.v_proj.weight": "model-00007-of-00008.safetensors",
338
+ "model.layers.36.input_layernorm.weight": "model-00007-of-00008.safetensors",
339
+ "model.layers.36.mlp.down_proj.weight": "model-00007-of-00008.safetensors",
340
+ "model.layers.36.mlp.gate_proj.weight": "model-00007-of-00008.safetensors",
341
+ "model.layers.36.mlp.up_proj.weight": "model-00007-of-00008.safetensors",
342
+ "model.layers.36.post_attention_layernorm.weight": "model-00007-of-00008.safetensors",
343
+ "model.layers.36.self_attn.k_norm.weight": "model-00007-of-00008.safetensors",
344
+ "model.layers.36.self_attn.k_proj.weight": "model-00007-of-00008.safetensors",
345
+ "model.layers.36.self_attn.o_proj.weight": "model-00007-of-00008.safetensors",
346
+ "model.layers.36.self_attn.q_norm.weight": "model-00007-of-00008.safetensors",
347
+ "model.layers.36.self_attn.q_proj.weight": "model-00007-of-00008.safetensors",
348
+ "model.layers.36.self_attn.v_proj.weight": "model-00007-of-00008.safetensors",
349
+ "model.layers.37.input_layernorm.weight": "model-00007-of-00008.safetensors",
350
+ "model.layers.37.mlp.down_proj.weight": "model-00007-of-00008.safetensors",
351
+ "model.layers.37.mlp.gate_proj.weight": "model-00007-of-00008.safetensors",
352
+ "model.layers.37.mlp.up_proj.weight": "model-00007-of-00008.safetensors",
353
+ "model.layers.37.post_attention_layernorm.weight": "model-00007-of-00008.safetensors",
354
+ "model.layers.37.self_attn.k_norm.weight": "model-00007-of-00008.safetensors",
355
+ "model.layers.37.self_attn.k_proj.weight": "model-00007-of-00008.safetensors",
356
+ "model.layers.37.self_attn.o_proj.weight": "model-00007-of-00008.safetensors",
357
+ "model.layers.37.self_attn.q_norm.weight": "model-00007-of-00008.safetensors",
358
+ "model.layers.37.self_attn.q_proj.weight": "model-00007-of-00008.safetensors",
359
+ "model.layers.37.self_attn.v_proj.weight": "model-00007-of-00008.safetensors",
360
+ "model.layers.38.input_layernorm.weight": "model-00007-of-00008.safetensors",
361
+ "model.layers.38.mlp.down_proj.weight": "model-00007-of-00008.safetensors",
362
+ "model.layers.38.mlp.gate_proj.weight": "model-00007-of-00008.safetensors",
363
+ "model.layers.38.mlp.up_proj.weight": "model-00007-of-00008.safetensors",
364
+ "model.layers.38.post_attention_layernorm.weight": "model-00007-of-00008.safetensors",
365
+ "model.layers.38.self_attn.k_norm.weight": "model-00007-of-00008.safetensors",
366
+ "model.layers.38.self_attn.k_proj.weight": "model-00007-of-00008.safetensors",
367
+ "model.layers.38.self_attn.o_proj.weight": "model-00007-of-00008.safetensors",
368
+ "model.layers.38.self_attn.q_norm.weight": "model-00007-of-00008.safetensors",
369
+ "model.layers.38.self_attn.q_proj.weight": "model-00007-of-00008.safetensors",
370
+ "model.layers.38.self_attn.v_proj.weight": "model-00007-of-00008.safetensors",
371
+ "model.layers.39.input_layernorm.weight": "model-00008-of-00008.safetensors",
372
+ "model.layers.39.mlp.down_proj.weight": "model-00008-of-00008.safetensors",
373
+ "model.layers.39.mlp.gate_proj.weight": "model-00007-of-00008.safetensors",
374
+ "model.layers.39.mlp.up_proj.weight": "model-00008-of-00008.safetensors",
375
+ "model.layers.39.post_attention_layernorm.weight": "model-00008-of-00008.safetensors",
376
+ "model.layers.39.self_attn.k_norm.weight": "model-00007-of-00008.safetensors",
377
+ "model.layers.39.self_attn.k_proj.weight": "model-00007-of-00008.safetensors",
378
+ "model.layers.39.self_attn.o_proj.weight": "model-00007-of-00008.safetensors",
379
+ "model.layers.39.self_attn.q_norm.weight": "model-00007-of-00008.safetensors",
380
+ "model.layers.39.self_attn.q_proj.weight": "model-00007-of-00008.safetensors",
381
+ "model.layers.39.self_attn.v_proj.weight": "model-00007-of-00008.safetensors",
382
+ "model.layers.4.input_layernorm.weight": "model-00002-of-00008.safetensors",
383
+ "model.layers.4.mlp.down_proj.weight": "model-00002-of-00008.safetensors",
384
+ "model.layers.4.mlp.gate_proj.weight": "model-00002-of-00008.safetensors",
385
+ "model.layers.4.mlp.up_proj.weight": "model-00002-of-00008.safetensors",
386
+ "model.layers.4.post_attention_layernorm.weight": "model-00002-of-00008.safetensors",
387
+ "model.layers.4.self_attn.k_norm.weight": "model-00002-of-00008.safetensors",
388
+ "model.layers.4.self_attn.k_proj.weight": "model-00002-of-00008.safetensors",
389
+ "model.layers.4.self_attn.o_proj.weight": "model-00002-of-00008.safetensors",
390
+ "model.layers.4.self_attn.q_norm.weight": "model-00002-of-00008.safetensors",
391
+ "model.layers.4.self_attn.q_proj.weight": "model-00002-of-00008.safetensors",
392
+ "model.layers.4.self_attn.v_proj.weight": "model-00002-of-00008.safetensors",
393
+ "model.layers.5.input_layernorm.weight": "model-00002-of-00008.safetensors",
394
+ "model.layers.5.mlp.down_proj.weight": "model-00002-of-00008.safetensors",
395
+ "model.layers.5.mlp.gate_proj.weight": "model-00002-of-00008.safetensors",
396
+ "model.layers.5.mlp.up_proj.weight": "model-00002-of-00008.safetensors",
397
+ "model.layers.5.post_attention_layernorm.weight": "model-00002-of-00008.safetensors",
398
+ "model.layers.5.self_attn.k_norm.weight": "model-00002-of-00008.safetensors",
399
+ "model.layers.5.self_attn.k_proj.weight": "model-00002-of-00008.safetensors",
400
+ "model.layers.5.self_attn.o_proj.weight": "model-00002-of-00008.safetensors",
401
+ "model.layers.5.self_attn.q_norm.weight": "model-00002-of-00008.safetensors",
402
+ "model.layers.5.self_attn.q_proj.weight": "model-00002-of-00008.safetensors",
403
+ "model.layers.5.self_attn.v_proj.weight": "model-00002-of-00008.safetensors",
404
+ "model.layers.6.input_layernorm.weight": "model-00002-of-00008.safetensors",
405
+ "model.layers.6.mlp.down_proj.weight": "model-00002-of-00008.safetensors",
406
+ "model.layers.6.mlp.gate_proj.weight": "model-00002-of-00008.safetensors",
407
+ "model.layers.6.mlp.up_proj.weight": "model-00002-of-00008.safetensors",
408
+ "model.layers.6.post_attention_layernorm.weight": "model-00002-of-00008.safetensors",
409
+ "model.layers.6.self_attn.k_norm.weight": "model-00002-of-00008.safetensors",
410
+ "model.layers.6.self_attn.k_proj.weight": "model-00002-of-00008.safetensors",
411
+ "model.layers.6.self_attn.o_proj.weight": "model-00002-of-00008.safetensors",
412
+ "model.layers.6.self_attn.q_norm.weight": "model-00002-of-00008.safetensors",
413
+ "model.layers.6.self_attn.q_proj.weight": "model-00002-of-00008.safetensors",
414
+ "model.layers.6.self_attn.v_proj.weight": "model-00002-of-00008.safetensors",
415
+ "model.layers.7.input_layernorm.weight": "model-00002-of-00008.safetensors",
416
+ "model.layers.7.mlp.down_proj.weight": "model-00002-of-00008.safetensors",
417
+ "model.layers.7.mlp.gate_proj.weight": "model-00002-of-00008.safetensors",
418
+ "model.layers.7.mlp.up_proj.weight": "model-00002-of-00008.safetensors",
419
+ "model.layers.7.post_attention_layernorm.weight": "model-00002-of-00008.safetensors",
420
+ "model.layers.7.self_attn.k_norm.weight": "model-00002-of-00008.safetensors",
421
+ "model.layers.7.self_attn.k_proj.weight": "model-00002-of-00008.safetensors",
422
+ "model.layers.7.self_attn.o_proj.weight": "model-00002-of-00008.safetensors",
423
+ "model.layers.7.self_attn.q_norm.weight": "model-00002-of-00008.safetensors",
424
+ "model.layers.7.self_attn.q_proj.weight": "model-00002-of-00008.safetensors",
425
+ "model.layers.7.self_attn.v_proj.weight": "model-00002-of-00008.safetensors",
426
+ "model.layers.8.input_layernorm.weight": "model-00002-of-00008.safetensors",
427
+ "model.layers.8.mlp.down_proj.weight": "model-00002-of-00008.safetensors",
428
+ "model.layers.8.mlp.gate_proj.weight": "model-00002-of-00008.safetensors",
429
+ "model.layers.8.mlp.up_proj.weight": "model-00002-of-00008.safetensors",
430
+ "model.layers.8.post_attention_layernorm.weight": "model-00002-of-00008.safetensors",
431
+ "model.layers.8.self_attn.k_norm.weight": "model-00002-of-00008.safetensors",
432
+ "model.layers.8.self_attn.k_proj.weight": "model-00002-of-00008.safetensors",
433
+ "model.layers.8.self_attn.o_proj.weight": "model-00002-of-00008.safetensors",
434
+ "model.layers.8.self_attn.q_norm.weight": "model-00002-of-00008.safetensors",
435
+ "model.layers.8.self_attn.q_proj.weight": "model-00002-of-00008.safetensors",
436
+ "model.layers.8.self_attn.v_proj.weight": "model-00002-of-00008.safetensors",
437
+ "model.layers.9.input_layernorm.weight": "model-00003-of-00008.safetensors",
438
+ "model.layers.9.mlp.down_proj.weight": "model-00003-of-00008.safetensors",
439
+ "model.layers.9.mlp.gate_proj.weight": "model-00002-of-00008.safetensors",
440
+ "model.layers.9.mlp.up_proj.weight": "model-00003-of-00008.safetensors",
441
+ "model.layers.9.post_attention_layernorm.weight": "model-00003-of-00008.safetensors",
442
+ "model.layers.9.self_attn.k_norm.weight": "model-00002-of-00008.safetensors",
443
+ "model.layers.9.self_attn.k_proj.weight": "model-00002-of-00008.safetensors",
444
+ "model.layers.9.self_attn.o_proj.weight": "model-00002-of-00008.safetensors",
445
+ "model.layers.9.self_attn.q_norm.weight": "model-00002-of-00008.safetensors",
446
+ "model.layers.9.self_attn.q_proj.weight": "model-00002-of-00008.safetensors",
447
+ "model.layers.9.self_attn.v_proj.weight": "model-00002-of-00008.safetensors",
448
+ "model.norm.weight": "model-00008-of-00008.safetensors"
449
+ }
450
+ }
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
+ "chat_template": "{%- if tools %}\n {{- '<|im_start|>system\\n' }}\n {%- if messages[0].role == 'system' %}\n {{- messages[0].content + '\\n\\n' }}\n {%- endif %}\n {{- \"# 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>\" }}\n {%- for tool in tools %}\n {{- \"\\n\" }}\n {{- tool | tojson }}\n {%- endfor %}\n {{- \"\\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\" }}\n{%- else %}\n {%- if messages[0].role == 'system' %}\n {{- '<|im_start|>system\\n' + messages[0].content + '<|im_end|>\\n' }}\n {%- endif %}\n{%- endif %}\n{%- set ns = namespace(multi_step_tool=true, last_query_index=messages|length - 1) %}\n{%- for message in messages[::-1] %}\n {%- set index = (messages|length - 1) - loop.index0 %}\n {%- if ns.multi_step_tool and message.role == \"user\" and message.content is string and not(message.content.startswith('<tool_response>') and message.content.endswith('</tool_response>')) %}\n {%- set ns.multi_step_tool = false %}\n {%- set ns.last_query_index = index %}\n {%- endif %}\n{%- endfor %}\n{%- for message in messages %}\n {%- if message.content is string %}\n {%- set content = message.content %}\n {%- else %}\n {%- set content = '' %}\n {%- endif %}\n {%- if (message.role == \"user\") or (message.role == \"system\" and not loop.first) %}\n {{- '<|im_start|>' + message.role + '\\n' + content + '<|im_end|>' + '\\n' }}\n {%- elif message.role == \"assistant\" %}\n {%- set reasoning_content = '' %}\n {%- if message.reasoning_content is string %}\n {%- set reasoning_content = message.reasoning_content %}\n {%- else %}\n {%- if '</think>' in content %}\n {%- set reasoning_content = content.split('</think>')[0].rstrip('\\n').split('<think>')[-1].lstrip('\\n') %}\n {%- set content = content.split('</think>')[-1].lstrip('\\n') %}\n {%- endif %}\n {%- endif %}\n {%- if loop.index0 > ns.last_query_index %}\n {%- if loop.last or (not loop.last and reasoning_content) %}\n {{- '<|im_start|>' + message.role + '\\n<think>\\n' + reasoning_content.strip('\\n') + '\\n</think>\\n\\n' + content.lstrip('\\n') }}\n {%- else %}\n {{- '<|im_start|>' + message.role + '\\n' + content }}\n {%- endif %}\n {%- else %}\n {{- '<|im_start|>' + message.role + '\\n' + content }}\n {%- endif %}\n {%- if message.tool_calls %}\n {%- for tool_call in message.tool_calls %}\n {%- if (loop.first and content) or (not loop.first) %}\n {{- '\\n' }}\n {%- endif %}\n {%- if tool_call.function %}\n {%- set tool_call = tool_call.function %}\n {%- endif %}\n {{- '<tool_call>\\n{\"name\": \"' }}\n {{- tool_call.name }}\n {{- '\", \"arguments\": ' }}\n {%- if tool_call.arguments is string %}\n {{- tool_call.arguments }}\n {%- else %}\n {{- tool_call.arguments | tojson }}\n {%- endif %}\n {{- '}\\n</tool_call>' }}\n {%- endfor %}\n {%- endif %}\n {{- '<|im_end|>\\n' }}\n {%- elif message.role == \"tool\" %}\n {%- if loop.first or (messages[loop.index0 - 1].role != \"tool\") %}\n {{- '<|im_start|>user' }}\n {%- endif %}\n {{- '\\n<tool_response>\\n' }}\n {{- content }}\n {{- '\\n</tool_response>' }}\n {%- if loop.last or (messages[loop.index0 + 1].role != \"tool\") %}\n {{- '<|im_end|>\\n' }}\n {%- endif %}\n {%- endif %}\n{%- endfor %}\n{%- if add_generation_prompt %}\n {{- '<|im_start|>assistant\\n' }}\n {%- if enable_thinking is defined and enable_thinking is false %}\n {{- '<think>\\n\\n</think>\\n\\n' }}\n {%- endif %}\n{%- endif %}",
231
+ "clean_up_tokenization_spaces": false,
232
+ "eos_token": "<|im_end|>",
233
+ "errors": "replace",
234
+ "model_max_length": 131072,
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