Model

wdtest-a/Qwen3-4B

Stage Qwen/Qwen3-4B for quantize acceptance

wdtest-a committed on November 4, 2026

0b4308c78ea432d8329aeefb8842cd98164c08feParent 9f43179Browse files

12 files changed+1245 -0

LICENSE

Added+202 -0
Lines 0 to 0 become lines 1 to 202
@@ -0,0 +1,202 @@
1Added:
2Added: Apache License
3Added: Version 2.0, January 2004
4Added: http://www.apache.org/licenses/
5Added:
6Added: TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7Added:
8Added: 1. Definitions.
9Added:
10Added: "License" shall mean the terms and conditions for use, reproduction,
11Added: and distribution as defined by Sections 1 through 9 of this document.
12Added:
13Added: "Licensor" shall mean the copyright owner or entity authorized by
14Added: the copyright owner that is granting the License.
15Added:
16Added: "Legal Entity" shall mean the union of the acting entity and all
17Added: other entities that control, are controlled by, or are under common
18Added: control with that entity. For the purposes of this definition,
19Added: "control" means (i) the power, direct or indirect, to cause the
20Added: direction or management of such entity, whether by contract or
21Added: otherwise, or (ii) ownership of fifty percent (50%) or more of the
22Added: outstanding shares, or (iii) beneficial ownership of such entity.
23Added:
24Added: "You" (or "Your") shall mean an individual or Legal Entity
25Added: exercising permissions granted by this License.
26Added:
27Added: "Source" form shall mean the preferred form for making modifications,
28Added: including but not limited to software source code, documentation
29Added: source, and configuration files.
30Added:
31Added: "Object" form shall mean any form resulting from mechanical
32Added: transformation or translation of a Source form, including but
33Added: not limited to compiled object code, generated documentation,
34Added: and conversions to other media types.
35Added:
36Added: "Work" shall mean the work of authorship, whether in Source or
37Added: Object form, made available under the License, as indicated by a
38Added: copyright notice that is included in or attached to the work
39Added: (an example is provided in the Appendix below).
40Added:
41Added: "Derivative Works" shall mean any work, whether in Source or Object
42Added: form, that is based on (or derived from) the Work and for which the
43Added: editorial revisions, annotations, elaborations, or other modifications
44Added: represent, as a whole, an original work of authorship. For the purposes
45Added: of this License, Derivative Works shall not include works that remain
46Added: separable from, or merely link (or bind by name) to the interfaces of,
47Added: the Work and Derivative Works thereof.
48Added:
49Added: "Contribution" shall mean any work of authorship, including
50Added: the original version of the Work and any modifications or additions
51Added: to that Work or Derivative Works thereof, that is intentionally
52Added: submitted to Licensor for inclusion in the Work by the copyright owner
53Added: or by an individual or Legal Entity authorized to submit on behalf of
54Added: the copyright owner. For the purposes of this definition, "submitted"
55Added: means any form of electronic, verbal, or written communication sent
56Added: to the Licensor or its representatives, including but not limited to
57Added: communication on electronic mailing lists, source code control systems,
58Added: and issue tracking systems that are managed by, or on behalf of, the
59Added: Licensor for the purpose of discussing and improving the Work, but
60Added: excluding communication that is conspicuously marked or otherwise
61Added: designated in writing by the copyright owner as "Not a Contribution."
62Added:
63Added: "Contributor" shall mean Licensor and any individual or Legal Entity
64Added: on behalf of whom a Contribution has been received by Licensor and
65Added: subsequently incorporated within the Work.
66Added:
67Added: 2. Grant of Copyright License. Subject to the terms and conditions of
68Added: this License, each Contributor hereby grants to You a perpetual,
69Added: worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70Added: copyright license to reproduce, prepare Derivative Works of,
71Added: publicly display, publicly perform, sublicense, and distribute the
72Added: Work and such Derivative Works in Source or Object form.
73Added:
74Added: 3. Grant of Patent License. Subject to the terms and conditions of
75Added: this License, each Contributor hereby grants to You a perpetual,
76Added: worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77Added: (except as stated in this section) patent license to make, have made,
78Added: use, offer to sell, sell, import, and otherwise transfer the Work,
79Added: where such license applies only to those patent claims licensable
80Added: by such Contributor that are necessarily infringed by their
81Added: Contribution(s) alone or by combination of their Contribution(s)
82Added: with the Work to which such Contribution(s) was submitted. If You
83Added: institute patent litigation against any entity (including a
84Added: cross-claim or counterclaim in a lawsuit) alleging that the Work
85Added: or a Contribution incorporated within the Work constitutes direct
86Added: or contributory patent infringement, then any patent licenses
87Added: granted to You under this License for that Work shall terminate
88Added: as of the date such litigation is filed.
89Added:
90Added: 4. Redistribution. You may reproduce and distribute copies of the
91Added: Work or Derivative Works thereof in any medium, with or without
92Added: modifications, and in Source or Object form, provided that You
93Added: meet the following conditions:
94Added:
95Added: (a) You must give any other recipients of the Work or
96Added: Derivative Works a copy of this License; and
97Added:
98Added: (b) You must cause any modified files to carry prominent notices
99Added: stating that You changed the files; and
100Added:
101Added: (c) You must retain, in the Source form of any Derivative Works
102Added: that You distribute, all copyright, patent, trademark, and
103Added: attribution notices from the Source form of the Work,
104Added: excluding those notices that do not pertain to any part of
105Added: the Derivative Works; and
106Added:
107Added: (d) If the Work includes a "NOTICE" text file as part of its
108Added: distribution, then any Derivative Works that You distribute must
109Added: include a readable copy of the attribution notices contained
110Added: within such NOTICE file, excluding those notices that do not
111Added: pertain to any part of the Derivative Works, in at least one
112Added: of the following places: within a NOTICE text file distributed
113Added: as part of the Derivative Works; within the Source form or
114Added: documentation, if provided along with the Derivative Works; or,
115Added: within a display generated by the Derivative Works, if and
116Added: wherever such third-party notices normally appear. The contents
117Added: of the NOTICE file are for informational purposes only and
118Added: do not modify the License. You may add Your own attribution
119Added: notices within Derivative Works that You distribute, alongside
120Added: or as an addendum to the NOTICE text from the Work, provided
121Added: that such additional attribution notices cannot be construed
122Added: as modifying the License.
123Added:
124Added: You may add Your own copyright statement to Your modifications and
125Added: may provide additional or different license terms and conditions
126Added: for use, reproduction, or distribution of Your modifications, or
127Added: for any such Derivative Works as a whole, provided Your use,
128Added: reproduction, and distribution of the Work otherwise complies with
129Added: the conditions stated in this License.
130Added:
131Added: 5. Submission of Contributions. Unless You explicitly state otherwise,
132Added: any Contribution intentionally submitted for inclusion in the Work
133Added: by You to the Licensor shall be under the terms and conditions of
134Added: this License, without any additional terms or conditions.
135Added: Notwithstanding the above, nothing herein shall supersede or modify
136Added: the terms of any separate license agreement you may have executed
137Added: with Licensor regarding such Contributions.
138Added:
139Added: 6. Trademarks. This License does not grant permission to use the trade
140Added: names, trademarks, service marks, or product names of the Licensor,
141Added: except as required for reasonable and customary use in describing the
142Added: origin of the Work and reproducing the content of the NOTICE file.
143Added:
144Added: 7. Disclaimer of Warranty. Unless required by applicable law or
145Added: agreed to in writing, Licensor provides the Work (and each
146Added: Contributor provides its Contributions) on an "AS IS" BASIS,
147Added: WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148Added: implied, including, without limitation, any warranties or conditions
149Added: of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150Added: PARTICULAR PURPOSE. You are solely responsible for determining the
151Added: appropriateness of using or redistributing the Work and assume any
152Added: risks associated with Your exercise of permissions under this License.
153Added:
154Added: 8. Limitation of Liability. In no event and under no legal theory,
155Added: whether in tort (including negligence), contract, or otherwise,
156Added: unless required by applicable law (such as deliberate and grossly
157Added: negligent acts) or agreed to in writing, shall any Contributor be
158Added: liable to You for damages, including any direct, indirect, special,
159Added: incidental, or consequential damages of any character arising as a
160Added: result of this License or out of the use or inability to use the
161Added: Work (including but not limited to damages for loss of goodwill,
162Added: work stoppage, computer failure or malfunction, or any and all
163Added: other commercial damages or losses), even if such Contributor
164Added: has been advised of the possibility of such damages.
165Added:
166Added: 9. Accepting Warranty or Additional Liability. While redistributing
167Added: the Work or Derivative Works thereof, You may choose to offer,
168Added: and charge a fee for, acceptance of support, warranty, indemnity,
169Added: or other liability obligations and/or rights consistent with this
170Added: License. However, in accepting such obligations, You may act only
171Added: on Your own behalf and on Your sole responsibility, not on behalf
172Added: of any other Contributor, and only if You agree to indemnify,
173Added: defend, and hold each Contributor harmless for any liability
174Added: incurred by, or claims asserted against, such Contributor by reason
175Added: of your accepting any such warranty or additional liability.
176Added:
177Added: END OF TERMS AND CONDITIONS
178Added:
179Added: APPENDIX: How to apply the Apache License to your work.
180Added:
181Added: To apply the Apache License to your work, attach the following
182Added: boilerplate notice, with the fields enclosed by brackets "[]"
183Added: replaced with your own identifying information. (Don't include
184Added: the brackets!) The text should be enclosed in the appropriate
185Added: comment syntax for the file format. We also recommend that a
186Added: file or class name and description of purpose be included on the
187Added: same "printed page" as the copyright notice for easier
188Added: identification within third-party archives.
189Added:
190Added: Copyright 2024 Alibaba Cloud
191Added:
192Added: Licensed under the Apache License, Version 2.0 (the "License");
193Added: you may not use this file except in compliance with the License.
194Added: You may obtain a copy of the License at
195Added:
196Added: http://www.apache.org/licenses/LICENSE-2.0
197Added:
198Added: Unless required by applicable law or agreed to in writing, software
199Added: distributed under the License is distributed on an "AS IS" BASIS,
200Added: WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201Added: See the License for the specific language governing permissions and
202Added: limitations under the License.(no newline at end of file)

README.md

Added+356 -0
Lines 0 to 0 become lines 1 to 356
@@ -0,0 +1,356 @@
1Added: ---
2Added: library_name: transformers
3Added: license: apache-2.0
4Added: license_link: https://huggingface.co/Qwen/Qwen3-4B/blob/main/LICENSE
5Added: pipeline_tag: text-generation
6Added: base_model:
7Added: - Qwen/Qwen3-4B-Base
8Added: ---
9Added:
10Added: # Qwen3-4B
11Added: <a href="https://chat.qwen.ai/" target="_blank" style="margin: 2px;">
12Added: <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;"/>
13Added: </a>
14Added:
15Added: ## Qwen3 Highlights
16Added:
17Added: 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:
18Added:
19Added: - **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.
20Added: - **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.
21Added: - **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.
22Added: - **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.
23Added: - **Support of 100+ languages and dialects** with strong capabilities for **multilingual instruction following** and **translation**.
24Added:
25Added: ## Model Overview
26Added:
27Added: **Qwen3-4B** has the following features:
28Added: - Type: Causal Language Models
29Added: - Training Stage: Pretraining & Post-training
30Added: - Number of Parameters: 4.0B
31Added: - Number of Paramaters (Non-Embedding): 3.6B
32Added: - Number of Layers: 36
33Added: - Number of Attention Heads (GQA): 32 for Q and 8 for KV
34Added: - Context Length: 32,768 natively and [131,072 tokens with YaRN](#processing-long-texts).
35Added:
36Added: 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/).
37Added:
38Added: > [!TIP]
39Added: > If you encounter significant endless repetitions, please refer to the [Best Practices](#best-practices) section for optimal sampling parameters, and set the ``presence_penalty`` to 1.5.
40Added:
41Added: ## Quickstart
42Added:
43Added: The code of Qwen3 has been in the latest Hugging Face `transformers` and we advise you to use the latest version of `transformers`.
44Added:
45Added: With `transformers<4.51.0`, you will encounter the following error:
46Added: ```
47Added: KeyError: 'qwen3'
48Added: ```
49Added:
50Added: The following contains a code snippet illustrating how to use the model generate content based on given inputs.
51Added: ```python
52Added: from transformers import AutoModelForCausalLM, AutoTokenizer
53Added:
54Added: model_name = "Qwen/Qwen3-4B"
55Added:
56Added: # load the tokenizer and the model
57Added: tokenizer = AutoTokenizer.from_pretrained(model_name)
58Added: model = AutoModelForCausalLM.from_pretrained(
59Added: model_name,
60Added: torch_dtype="auto",
61Added: device_map="auto"
62Added: )
63Added:
64Added: # prepare the model input
65Added: prompt = "Give me a short introduction to large language model."
66Added: messages = [
67Added: {"role": "user", "content": prompt}
68Added: ]
69Added: text = tokenizer.apply_chat_template(
70Added: messages,
71Added: tokenize=False,
72Added: add_generation_prompt=True,
73Added: enable_thinking=True # Switches between thinking and non-thinking modes. Default is True.
74Added: )
75Added: model_inputs = tokenizer([text], return_tensors="pt").to(model.device)
76Added:
77Added: # conduct text completion
78Added: generated_ids = model.generate(
79Added: **model_inputs,
80Added: max_new_tokens=32768
81Added: )
82Added: output_ids = generated_ids[0][len(model_inputs.input_ids[0]):].tolist()
83Added:
84Added: # parsing thinking content
85Added: try:
86Added: # rindex finding 151668 (</think>)
87Added: index = len(output_ids) - output_ids[::-1].index(151668)
88Added: except ValueError:
89Added: index = 0
90Added:
91Added: thinking_content = tokenizer.decode(output_ids[:index], skip_special_tokens=True).strip("\n")
92Added: content = tokenizer.decode(output_ids[index:], skip_special_tokens=True).strip("\n")
93Added:
94Added: print("thinking content:", thinking_content)
95Added: print("content:", content)
96Added: ```
97Added:
98Added: For deployment, you can use `sglang>=0.4.6.post1` or `vllm>=0.8.5` or to create an OpenAI-compatible API endpoint:
99Added: - SGLang:
100Added: ```shell
101Added: python -m sglang.launch_server --model-path Qwen/Qwen3-4B --reasoning-parser qwen3
102Added: ```
103Added: - vLLM:
104Added: ```shell
105Added: vllm serve Qwen/Qwen3-4B --enable-reasoning --reasoning-parser deepseek_r1
106Added: ```
107Added:
108Added: For local use, applications such as Ollama, LMStudio, MLX-LM, llama.cpp, and KTransformers have also supported Qwen3.
109Added:
110Added: ## Switching Between Thinking and Non-Thinking Mode
111Added:
112Added: > [!TIP]
113Added: > The `enable_thinking` switch is also available in APIs created by SGLang and vLLM.
114Added: > 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.
115Added:
116Added: ### `enable_thinking=True`
117Added:
118Added: 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.
119Added:
120Added: ```python
121Added: text = tokenizer.apply_chat_template(
122Added: messages,
123Added: tokenize=False,
124Added: add_generation_prompt=True,
125Added: enable_thinking=True # True is the default value for enable_thinking
126Added: )
127Added: ```
128Added:
129Added: In this mode, the model will generate think content wrapped in a `<think>...</think>` block, followed by the final response.
130Added:
131Added: > [!NOTE]
132Added: > 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.
133Added:
134Added:
135Added: ### `enable_thinking=False`
136Added:
137Added: 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.
138Added:
139Added: ```python
140Added: text = tokenizer.apply_chat_template(
141Added: messages,
142Added: tokenize=False,
143Added: add_generation_prompt=True,
144Added: enable_thinking=False # Setting enable_thinking=False disables thinking mode
145Added: )
146Added: ```
147Added:
148Added: In this mode, the model will not generate any think content and will not include a `<think>...</think>` block.
149Added:
150Added: > [!NOTE]
151Added: > 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.
152Added:
153Added: ### Advanced Usage: Switching Between Thinking and Non-Thinking Modes via User Input
154Added:
155Added: 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.
156Added:
157Added: Here is an example of a multi-turn conversation:
158Added:
159Added: ```python
160Added: from transformers import AutoModelForCausalLM, AutoTokenizer
161Added:
162Added: class QwenChatbot:
163Added: def __init__(self, model_name="Qwen/Qwen3-4B"):
164Added: self.tokenizer = AutoTokenizer.from_pretrained(model_name)
165Added: self.model = AutoModelForCausalLM.from_pretrained(model_name)
166Added: self.history = []
167Added:
168Added: def generate_response(self, user_input):
169Added: messages = self.history + [{"role": "user", "content": user_input}]
170Added:
171Added: text = self.tokenizer.apply_chat_template(
172Added: messages,
173Added: tokenize=False,
174Added: add_generation_prompt=True
175Added: )
176Added:
177Added: inputs = self.tokenizer(text, return_tensors="pt")
178Added: response_ids = self.model.generate(**inputs, max_new_tokens=32768)[0][len(inputs.input_ids[0]):].tolist()
179Added: response = self.tokenizer.decode(response_ids, skip_special_tokens=True)
180Added:
181Added: # Update history
182Added: self.history.append({"role": "user", "content": user_input})
183Added: self.history.append({"role": "assistant", "content": response})
184Added:
185Added: return response
186Added:
187Added: # Example Usage
188Added: if __name__ == "__main__":
189Added: chatbot = QwenChatbot()
190Added:
191Added: # First input (without /think or /no_think tags, thinking mode is enabled by default)
192Added: user_input_1 = "How many r's in strawberries?"
193Added: print(f"User: {user_input_1}")
194Added: response_1 = chatbot.generate_response(user_input_1)
195Added: print(f"Bot: {response_1}")
196Added: print("----------------------")
197Added:
198Added: # Second input with /no_think
199Added: user_input_2 = "Then, how many r's in blueberries? /no_think"
200Added: print(f"User: {user_input_2}")
201Added: response_2 = chatbot.generate_response(user_input_2)
202Added: print(f"Bot: {response_2}")
203Added: print("----------------------")
204Added:
205Added: # Third input with /think
206Added: user_input_3 = "Really? /think"
207Added: print(f"User: {user_input_3}")
208Added: response_3 = chatbot.generate_response(user_input_3)
209Added: print(f"Bot: {response_3}")
210Added: ```
211Added:
212Added: > [!NOTE]
213Added: > 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.
214Added: > 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.
215Added:
216Added: ## Agentic Use
217Added:
218Added: 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.
219Added:
220Added: 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.
221Added: ```python
222Added: from qwen_agent.agents import Assistant
223Added:
224Added: # Define LLM
225Added: llm_cfg = {
226Added: 'model': 'Qwen3-4B',
227Added:
228Added: # Use the endpoint provided by Alibaba Model Studio:
229Added: # 'model_type': 'qwen_dashscope',
230Added: # 'api_key': os.getenv('DASHSCOPE_API_KEY'),
231Added:
232Added: # Use a custom endpoint compatible with OpenAI API:
233Added: 'model_server': 'http://localhost:8000/v1', # api_base
234Added: 'api_key': 'EMPTY',
235Added:
236Added: # Other parameters:
237Added: # 'generate_cfg': {
238Added: # # Add: When the response content is `<think>this is the thought</think>this is the answer;
239Added: # # Do not add: When the response has been separated by reasoning_content and content.
240Added: # 'thought_in_content': True,
241Added: # },
242Added: }
243Added:
244Added: # Define Tools
245Added: tools = [
246Added: {'mcpServers': { # You can specify the MCP configuration file
247Added: 'time': {
248Added: 'command': 'uvx',
249Added: 'args': ['mcp-server-time', '--local-timezone=Asia/Shanghai']
250Added: },
251Added: "fetch": {
252Added: "command": "uvx",
253Added: "args": ["mcp-server-fetch"]
254Added: }
255Added: }
256Added: },
257Added: 'code_interpreter', # Built-in tools
258Added: ]
259Added:
260Added: # Define Agent
261Added: bot = Assistant(llm=llm_cfg, function_list=tools)
262Added:
263Added: # Streaming generation
264Added: messages = [{'role': 'user', 'content': 'https://qwenlm.github.io/blog/ Introduce the latest developments of Qwen'}]
265Added: for responses in bot.run(messages=messages):
266Added: pass
267Added: print(responses)
268Added: ```
269Added:
270Added: ## Processing Long Texts
271Added:
272Added: 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.
273Added:
274Added: 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:
275Added:
276Added: - Modifying the model files:
277Added: In the `config.json` file, add the `rope_scaling` fields:
278Added: ```json
279Added: {
280Added: ...,
281Added: "rope_scaling": {
282Added: "rope_type": "yarn",
283Added: "factor": 4.0,
284Added: "original_max_position_embeddings": 32768
285Added: }
286Added: }
287Added: ```
288Added: For `llama.cpp`, you need to regenerate the GGUF file after the modification.
289Added:
290Added: - Passing command line arguments:
291Added:
292Added: For `vllm`, you can use
293Added: ```shell
294Added: vllm serve ... --rope-scaling '{"rope_type":"yarn","factor":4.0,"original_max_position_embeddings":32768}' --max-model-len 131072
295Added: ```
296Added:
297Added: For `sglang`, you can use
298Added: ```shell
299Added: python -m sglang.launch_server ... --json-model-override-args '{"rope_scaling":{"rope_type":"yarn","factor":4.0,"original_max_position_embeddings":32768}}'
300Added: ```
301Added:
302Added: For `llama-server` from `llama.cpp`, you can use
303Added: ```shell
304Added: llama-server ... --rope-scaling yarn --rope-scale 4 --yarn-orig-ctx 32768
305Added: ```
306Added:
307Added: > [!IMPORTANT]
308Added: > If you encounter the following warning
309Added: > ```
310Added: > Unrecognized keys in `rope_scaling` for 'rope_type'='yarn': {'original_max_position_embeddings'}
311Added: > ```
312Added: > please upgrade `transformers>=4.51.0`.
313Added:
314Added: > [!NOTE]
315Added: > 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.**
316Added: > We advise adding the `rope_scaling` configuration only when processing long contexts is required.
317Added: > 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.
318Added:
319Added: > [!NOTE]
320Added: > 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.
321Added:
322Added: > [!TIP]
323Added: > The endpoint provided by Alibaba Model Studio supports dynamic YaRN by default and no extra configuration is needed.
324Added:
325Added: ## Best Practices
326Added:
327Added: To achieve optimal performance, we recommend the following settings:
328Added:
329Added: 1. **Sampling Parameters**:
330Added: - 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.
331Added: - For non-thinking mode (`enable_thinking=False`), we suggest using `Temperature=0.7`, `TopP=0.8`, `TopK=20`, and `MinP=0`.
332Added: - 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.
333Added:
334Added: 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.
335Added:
336Added: 3. **Standardize Output Format**: We recommend using prompts to standardize model outputs when benchmarking.
337Added: - **Math Problems**: Include "Please reason step by step, and put your final answer within \boxed{}." in the prompt.
338Added: - **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"`."
339Added:
340Added: 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.
341Added:
342Added: ### Citation
343Added:
344Added: If you find our work helpful, feel free to give us a cite.
345Added:
346Added: ```
347Added: @misc{qwen3technicalreport,
348Added: title={Qwen3 Technical Report},
349Added: author={Qwen Team},
350Added: year={2025},
351Added: eprint={2505.09388},
352Added: archivePrefix={arXiv},
353Added: primaryClass={cs.CL},
354Added: url={https://arxiv.org/abs/2505.09388},
355Added: }
356Added: ```(no newline at end of file)

config.json

Added+30 -0
Lines 0 to 0 become lines 1 to 30
@@ -0,0 +1,30 @@
1Added: {
2Added: "architectures": [
3Added: "Qwen3ForCausalLM"
4Added: ],
5Added: "attention_bias": false,
6Added: "attention_dropout": 0.0,
7Added: "bos_token_id": 151643,
8Added: "eos_token_id": 151645,
9Added: "head_dim": 128,
10Added: "hidden_act": "silu",
11Added: "hidden_size": 2560,
12Added: "initializer_range": 0.02,
13Added: "intermediate_size": 9728,
14Added: "max_position_embeddings": 40960,
15Added: "max_window_layers": 36,
16Added: "model_type": "qwen3",
17Added: "num_attention_heads": 32,
18Added: "num_hidden_layers": 36,
19Added: "num_key_value_heads": 8,
20Added: "rms_norm_eps": 1e-06,
21Added: "rope_scaling": null,
22Added: "rope_theta": 1000000,
23Added: "sliding_window": null,
24Added: "tie_word_embeddings": true,
25Added: "torch_dtype": "bfloat16",
26Added: "transformers_version": "4.51.0",
27Added: "use_cache": true,
28Added: "use_sliding_window": false,
29Added: "vocab_size": 151936
30Added: }(no newline at end of file)

generation_config.json

Added+13 -0
Lines 0 to 0 become lines 1 to 13
@@ -0,0 +1,13 @@
1Added: {
2Added: "bos_token_id": 151643,
3Added: "do_sample": true,
4Added: "eos_token_id": [
5Added: 151645,
6Added: 151643
7Added: ],
8Added: "pad_token_id": 151643,
9Added: "temperature": 0.6,
10Added: "top_k": 20,
11Added: "top_p": 0.95,
12Added: "transformers_version": "4.51.0"
13Added: }(no newline at end of file)

merges.txt

Added

This file is too large to display.

model-00001-of-00003.safetensors

Added

Large (LFS-tracked) file content changed — 3.7 GB

model-00002-of-00003.safetensors

Added

Large (LFS-tracked) file content changed — 3.7 GB

model-00003-of-00003.safetensors

Added

Large (LFS-tracked) file content changed — 95 MB

model.safetensors.index.json

Added+405 -0
Lines 0 to 0 become lines 1 to 405
@@ -0,0 +1,405 @@
1Added: {
2Added: "metadata": {
3Added: "total_size": 8044936192
4Added: },
5Added: "weight_map": {
6Added: "model.embed_tokens.weight": "model-00001-of-00003.safetensors",
7Added: "model.layers.0.input_layernorm.weight": "model-00001-of-00003.safetensors",
8Added: "model.layers.0.mlp.down_proj.weight": "model-00001-of-00003.safetensors",
9Added: "model.layers.0.mlp.gate_proj.weight": "model-00001-of-00003.safetensors",
10Added: "model.layers.0.mlp.up_proj.weight": "model-00001-of-00003.safetensors",
11Added: "model.layers.0.post_attention_layernorm.weight": "model-00001-of-00003.safetensors",
12Added: "model.layers.0.self_attn.k_norm.weight": "model-00001-of-00003.safetensors",
13Added: "model.layers.0.self_attn.k_proj.weight": "model-00001-of-00003.safetensors",
14Added: "model.layers.0.self_attn.o_proj.weight": "model-00001-of-00003.safetensors",
15Added: "model.layers.0.self_attn.q_norm.weight": "model-00001-of-00003.safetensors",
16Added: "model.layers.0.self_attn.q_proj.weight": "model-00001-of-00003.safetensors",
17Added: "model.layers.0.self_attn.v_proj.weight": "model-00001-of-00003.safetensors",
18Added: "model.layers.1.input_layernorm.weight": "model-00001-of-00003.safetensors",
19Added: "model.layers.1.mlp.down_proj.weight": "model-00001-of-00003.safetensors",
20Added: "model.layers.1.mlp.gate_proj.weight": "model-00001-of-00003.safetensors",
21Added: "model.layers.1.mlp.up_proj.weight": "model-00001-of-00003.safetensors",
22Added: "model.layers.1.post_attention_layernorm.weight": "model-00001-of-00003.safetensors",
23Added: "model.layers.1.self_attn.k_norm.weight": "model-00001-of-00003.safetensors",
24Added: "model.layers.1.self_attn.k_proj.weight": "model-00001-of-00003.safetensors",
25Added: "model.layers.1.self_attn.o_proj.weight": "model-00001-of-00003.safetensors",
26Added: "model.layers.1.self_attn.q_norm.weight": "model-00001-of-00003.safetensors",
27Added: "model.layers.1.self_attn.q_proj.weight": "model-00001-of-00003.safetensors",
28Added: "model.layers.1.self_attn.v_proj.weight": "model-00001-of-00003.safetensors",
29Added: "model.layers.10.input_layernorm.weight": "model-00001-of-00003.safetensors",
30Added: "model.layers.10.mlp.down_proj.weight": "model-00001-of-00003.safetensors",
31Added: "model.layers.10.mlp.gate_proj.weight": "model-00001-of-00003.safetensors",
32Added: "model.layers.10.mlp.up_proj.weight": "model-00001-of-00003.safetensors",
33Added: "model.layers.10.post_attention_layernorm.weight": "model-00001-of-00003.safetensors",
34Added: "model.layers.10.self_attn.k_norm.weight": "model-00001-of-00003.safetensors",
35Added: "model.layers.10.self_attn.k_proj.weight": "model-00001-of-00003.safetensors",
36Added: "model.layers.10.self_attn.o_proj.weight": "model-00001-of-00003.safetensors",
37Added: "model.layers.10.self_attn.q_norm.weight": "model-00001-of-00003.safetensors",
38Added: "model.layers.10.self_attn.q_proj.weight": "model-00001-of-00003.safetensors",
39Added: "model.layers.10.self_attn.v_proj.weight": "model-00001-of-00003.safetensors",
40Added: "model.layers.11.input_layernorm.weight": "model-00001-of-00003.safetensors",
41Added: "model.layers.11.mlp.down_proj.weight": "model-00001-of-00003.safetensors",
42Added: "model.layers.11.mlp.gate_proj.weight": "model-00001-of-00003.safetensors",
43Added: "model.layers.11.mlp.up_proj.weight": "model-00001-of-00003.safetensors",
44Added: "model.layers.11.post_attention_layernorm.weight": "model-00001-of-00003.safetensors",
45Added: "model.layers.11.self_attn.k_norm.weight": "model-00001-of-00003.safetensors",
46Added: "model.layers.11.self_attn.k_proj.weight": "model-00001-of-00003.safetensors",
47Added: "model.layers.11.self_attn.o_proj.weight": "model-00001-of-00003.safetensors",
48Added: "model.layers.11.self_attn.q_norm.weight": "model-00001-of-00003.safetensors",
49Added: "model.layers.11.self_attn.q_proj.weight": "model-00001-of-00003.safetensors",
50Added: "model.layers.11.self_attn.v_proj.weight": "model-00001-of-00003.safetensors",
51Added: "model.layers.12.input_layernorm.weight": "model-00001-of-00003.safetensors",
52Added: "model.layers.12.mlp.down_proj.weight": "model-00001-of-00003.safetensors",
53Added: "model.layers.12.mlp.gate_proj.weight": "model-00001-of-00003.safetensors",
54Added: "model.layers.12.mlp.up_proj.weight": "model-00001-of-00003.safetensors",
55Added: "model.layers.12.post_attention_layernorm.weight": "model-00001-of-00003.safetensors",
56Added: "model.layers.12.self_attn.k_norm.weight": "model-00001-of-00003.safetensors",
57Added: "model.layers.12.self_attn.k_proj.weight": "model-00001-of-00003.safetensors",
58Added: "model.layers.12.self_attn.o_proj.weight": "model-00001-of-00003.safetensors",
59Added: "model.layers.12.self_attn.q_norm.weight": "model-00001-of-00003.safetensors",
60Added: "model.layers.12.self_attn.q_proj.weight": "model-00001-of-00003.safetensors",
61Added: "model.layers.12.self_attn.v_proj.weight": "model-00001-of-00003.safetensors",
62Added: "model.layers.13.input_layernorm.weight": "model-00001-of-00003.safetensors",
63Added: "model.layers.13.mlp.down_proj.weight": "model-00001-of-00003.safetensors",
64Added: "model.layers.13.mlp.gate_proj.weight": "model-00001-of-00003.safetensors",
65Added: "model.layers.13.mlp.up_proj.weight": "model-00001-of-00003.safetensors",
66Added: "model.layers.13.post_attention_layernorm.weight": "model-00001-of-00003.safetensors",
67Added: "model.layers.13.self_attn.k_norm.weight": "model-00001-of-00003.safetensors",
68Added: "model.layers.13.self_attn.k_proj.weight": "model-00001-of-00003.safetensors",
69Added: "model.layers.13.self_attn.o_proj.weight": "model-00001-of-00003.safetensors",
70Added: "model.layers.13.self_attn.q_norm.weight": "model-00001-of-00003.safetensors",
71Added: "model.layers.13.self_attn.q_proj.weight": "model-00001-of-00003.safetensors",
72Added: "model.layers.13.self_attn.v_proj.weight": "model-00001-of-00003.safetensors",
73Added: "model.layers.14.input_layernorm.weight": "model-00001-of-00003.safetensors",
74Added: "model.layers.14.mlp.down_proj.weight": "model-00001-of-00003.safetensors",
75Added: "model.layers.14.mlp.gate_proj.weight": "model-00001-of-00003.safetensors",
76Added: "model.layers.14.mlp.up_proj.weight": "model-00001-of-00003.safetensors",
77Added: "model.layers.14.post_attention_layernorm.weight": "model-00001-of-00003.safetensors",
78Added: "model.layers.14.self_attn.k_norm.weight": "model-00001-of-00003.safetensors",
79Added: "model.layers.14.self_attn.k_proj.weight": "model-00001-of-00003.safetensors",
80Added: "model.layers.14.self_attn.o_proj.weight": "model-00001-of-00003.safetensors",
81Added: "model.layers.14.self_attn.q_norm.weight": "model-00001-of-00003.safetensors",
82Added: "model.layers.14.self_attn.q_proj.weight": "model-00001-of-00003.safetensors",
83Added: "model.layers.14.self_attn.v_proj.weight": "model-00001-of-00003.safetensors",
84Added: "model.layers.15.input_layernorm.weight": "model-00002-of-00003.safetensors",
85Added: "model.layers.15.mlp.down_proj.weight": "model-00002-of-00003.safetensors",
86Added: "model.layers.15.mlp.gate_proj.weight": "model-00001-of-00003.safetensors",
87Added: "model.layers.15.mlp.up_proj.weight": "model-00001-of-00003.safetensors",
88Added: "model.layers.15.post_attention_layernorm.weight": "model-00002-of-00003.safetensors",
89Added: "model.layers.15.self_attn.k_norm.weight": "model-00001-of-00003.safetensors",
90Added: "model.layers.15.self_attn.k_proj.weight": "model-00001-of-00003.safetensors",
91Added: "model.layers.15.self_attn.o_proj.weight": "model-00001-of-00003.safetensors",
92Added: "model.layers.15.self_attn.q_norm.weight": "model-00001-of-00003.safetensors",
93Added: "model.layers.15.self_attn.q_proj.weight": "model-00001-of-00003.safetensors",
94Added: "model.layers.15.self_attn.v_proj.weight": "model-00001-of-00003.safetensors",
95Added: "model.layers.16.input_layernorm.weight": "model-00002-of-00003.safetensors",
96Added: "model.layers.16.mlp.down_proj.weight": "model-00002-of-00003.safetensors",
97Added: "model.layers.16.mlp.gate_proj.weight": "model-00002-of-00003.safetensors",
98Added: "model.layers.16.mlp.up_proj.weight": "model-00002-of-00003.safetensors",
99Added: "model.layers.16.post_attention_layernorm.weight": "model-00002-of-00003.safetensors",
100Added: "model.layers.16.self_attn.k_norm.weight": "model-00002-of-00003.safetensors",
101Added: "model.layers.16.self_attn.k_proj.weight": "model-00002-of-00003.safetensors",
102Added: "model.layers.16.self_attn.o_proj.weight": "model-00002-of-00003.safetensors",
103Added: "model.layers.16.self_attn.q_norm.weight": "model-00002-of-00003.safetensors",
104Added: "model.layers.16.self_attn.q_proj.weight": "model-00002-of-00003.safetensors",
105Added: "model.layers.16.self_attn.v_proj.weight": "model-00002-of-00003.safetensors",
106Added: "model.layers.17.input_layernorm.weight": "model-00002-of-00003.safetensors",
107Added: "model.layers.17.mlp.down_proj.weight": "model-00002-of-00003.safetensors",
108Added: "model.layers.17.mlp.gate_proj.weight": "model-00002-of-00003.safetensors",
109Added: "model.layers.17.mlp.up_proj.weight": "model-00002-of-00003.safetensors",
110Added: "model.layers.17.post_attention_layernorm.weight": "model-00002-of-00003.safetensors",
111Added: "model.layers.17.self_attn.k_norm.weight": "model-00002-of-00003.safetensors",
112Added: "model.layers.17.self_attn.k_proj.weight": "model-00002-of-00003.safetensors",
113Added: "model.layers.17.self_attn.o_proj.weight": "model-00002-of-00003.safetensors",
114Added: "model.layers.17.self_attn.q_norm.weight": "model-00002-of-00003.safetensors",
115Added: "model.layers.17.self_attn.q_proj.weight": "model-00002-of-00003.safetensors",
116Added: "model.layers.17.self_attn.v_proj.weight": "model-00002-of-00003.safetensors",
117Added: "model.layers.18.input_layernorm.weight": "model-00002-of-00003.safetensors",
118Added: "model.layers.18.mlp.down_proj.weight": "model-00002-of-00003.safetensors",
119Added: "model.layers.18.mlp.gate_proj.weight": "model-00002-of-00003.safetensors",
120Added: "model.layers.18.mlp.up_proj.weight": "model-00002-of-00003.safetensors",
121Added: "model.layers.18.post_attention_layernorm.weight": "model-00002-of-00003.safetensors",
122Added: "model.layers.18.self_attn.k_norm.weight": "model-00002-of-00003.safetensors",
123Added: "model.layers.18.self_attn.k_proj.weight": "model-00002-of-00003.safetensors",
124Added: "model.layers.18.self_attn.o_proj.weight": "model-00002-of-00003.safetensors",
125Added: "model.layers.18.self_attn.q_norm.weight": "model-00002-of-00003.safetensors",
126Added: "model.layers.18.self_attn.q_proj.weight": "model-00002-of-00003.safetensors",
127Added: "model.layers.18.self_attn.v_proj.weight": "model-00002-of-00003.safetensors",
128Added: "model.layers.19.input_layernorm.weight": "model-00002-of-00003.safetensors",
129Added: "model.layers.19.mlp.down_proj.weight": "model-00002-of-00003.safetensors",
130Added: "model.layers.19.mlp.gate_proj.weight": "model-00002-of-00003.safetensors",
131Added: "model.layers.19.mlp.up_proj.weight": "model-00002-of-00003.safetensors",
132Added: "model.layers.19.post_attention_layernorm.weight": "model-00002-of-00003.safetensors",
133Added: "model.layers.19.self_attn.k_norm.weight": "model-00002-of-00003.safetensors",
134Added: "model.layers.19.self_attn.k_proj.weight": "model-00002-of-00003.safetensors",
135Added: "model.layers.19.self_attn.o_proj.weight": "model-00002-of-00003.safetensors",
136Added: "model.layers.19.self_attn.q_norm.weight": "model-00002-of-00003.safetensors",
137Added: "model.layers.19.self_attn.q_proj.weight": "model-00002-of-00003.safetensors",
138Added: "model.layers.19.self_attn.v_proj.weight": "model-00002-of-00003.safetensors",
139Added: "model.layers.2.input_layernorm.weight": "model-00001-of-00003.safetensors",
140Added: "model.layers.2.mlp.down_proj.weight": "model-00001-of-00003.safetensors",
141Added: "model.layers.2.mlp.gate_proj.weight": "model-00001-of-00003.safetensors",
142Added: "model.layers.2.mlp.up_proj.weight": "model-00001-of-00003.safetensors",
143Added: "model.layers.2.post_attention_layernorm.weight": "model-00001-of-00003.safetensors",
144Added: "model.layers.2.self_attn.k_norm.weight": "model-00001-of-00003.safetensors",
145Added: "model.layers.2.self_attn.k_proj.weight": "model-00001-of-00003.safetensors",
146Added: "model.layers.2.self_attn.o_proj.weight": "model-00001-of-00003.safetensors",
147Added: "model.layers.2.self_attn.q_norm.weight": "model-00001-of-00003.safetensors",
148Added: "model.layers.2.self_attn.q_proj.weight": "model-00001-of-00003.safetensors",
149Added: "model.layers.2.self_attn.v_proj.weight": "model-00001-of-00003.safetensors",
150Added: "model.layers.20.input_layernorm.weight": "model-00002-of-00003.safetensors",
151Added: "model.layers.20.mlp.down_proj.weight": "model-00002-of-00003.safetensors",
152Added: "model.layers.20.mlp.gate_proj.weight": "model-00002-of-00003.safetensors",
153Added: "model.layers.20.mlp.up_proj.weight": "model-00002-of-00003.safetensors",
154Added: "model.layers.20.post_attention_layernorm.weight": "model-00002-of-00003.safetensors",
155Added: "model.layers.20.self_attn.k_norm.weight": "model-00002-of-00003.safetensors",
156Added: "model.layers.20.self_attn.k_proj.weight": "model-00002-of-00003.safetensors",
157Added: "model.layers.20.self_attn.o_proj.weight": "model-00002-of-00003.safetensors",
158Added: "model.layers.20.self_attn.q_norm.weight": "model-00002-of-00003.safetensors",
159Added: "model.layers.20.self_attn.q_proj.weight": "model-00002-of-00003.safetensors",
160Added: "model.layers.20.self_attn.v_proj.weight": "model-00002-of-00003.safetensors",
161Added: "model.layers.21.input_layernorm.weight": "model-00002-of-00003.safetensors",
162Added: "model.layers.21.mlp.down_proj.weight": "model-00002-of-00003.safetensors",
163Added: "model.layers.21.mlp.gate_proj.weight": "model-00002-of-00003.safetensors",
164Added: "model.layers.21.mlp.up_proj.weight": "model-00002-of-00003.safetensors",
165Added: "model.layers.21.post_attention_layernorm.weight": "model-00002-of-00003.safetensors",
166Added: "model.layers.21.self_attn.k_norm.weight": "model-00002-of-00003.safetensors",
167Added: "model.layers.21.self_attn.k_proj.weight": "model-00002-of-00003.safetensors",
168Added: "model.layers.21.self_attn.o_proj.weight": "model-00002-of-00003.safetensors",
169Added: "model.layers.21.self_attn.q_norm.weight": "model-00002-of-00003.safetensors",
170Added: "model.layers.21.self_attn.q_proj.weight": "model-00002-of-00003.safetensors",
171Added: "model.layers.21.self_attn.v_proj.weight": "model-00002-of-00003.safetensors",
172Added: "model.layers.22.input_layernorm.weight": "model-00002-of-00003.safetensors",
173Added: "model.layers.22.mlp.down_proj.weight": "model-00002-of-00003.safetensors",
174Added: "model.layers.22.mlp.gate_proj.weight": "model-00002-of-00003.safetensors",
175Added: "model.layers.22.mlp.up_proj.weight": "model-00002-of-00003.safetensors",
176Added: "model.layers.22.post_attention_layernorm.weight": "model-00002-of-00003.safetensors",
177Added: "model.layers.22.self_attn.k_norm.weight": "model-00002-of-00003.safetensors",
178Added: "model.layers.22.self_attn.k_proj.weight": "model-00002-of-00003.safetensors",
179Added: "model.layers.22.self_attn.o_proj.weight": "model-00002-of-00003.safetensors",
180Added: "model.layers.22.self_attn.q_norm.weight": "model-00002-of-00003.safetensors",
181Added: "model.layers.22.self_attn.q_proj.weight": "model-00002-of-00003.safetensors",
182Added: "model.layers.22.self_attn.v_proj.weight": "model-00002-of-00003.safetensors",
183Added: "model.layers.23.input_layernorm.weight": "model-00002-of-00003.safetensors",
184Added: "model.layers.23.mlp.down_proj.weight": "model-00002-of-00003.safetensors",
185Added: "model.layers.23.mlp.gate_proj.weight": "model-00002-of-00003.safetensors",
186Added: "model.layers.23.mlp.up_proj.weight": "model-00002-of-00003.safetensors",
187Added: "model.layers.23.post_attention_layernorm.weight": "model-00002-of-00003.safetensors",
188Added: "model.layers.23.self_attn.k_norm.weight": "model-00002-of-00003.safetensors",
189Added: "model.layers.23.self_attn.k_proj.weight": "model-00002-of-00003.safetensors",
190Added: "model.layers.23.self_attn.o_proj.weight": "model-00002-of-00003.safetensors",
191Added: "model.layers.23.self_attn.q_norm.weight": "model-00002-of-00003.safetensors",
192Added: "model.layers.23.self_attn.q_proj.weight": "model-00002-of-00003.safetensors",
193Added: "model.layers.23.self_attn.v_proj.weight": "model-00002-of-00003.safetensors",
194Added: "model.layers.24.input_layernorm.weight": "model-00002-of-00003.safetensors",
195Added: "model.layers.24.mlp.down_proj.weight": "model-00002-of-00003.safetensors",
196Added: "model.layers.24.mlp.gate_proj.weight": "model-00002-of-00003.safetensors",
197Added: "model.layers.24.mlp.up_proj.weight": "model-00002-of-00003.safetensors",
198Added: "model.layers.24.post_attention_layernorm.weight": "model-00002-of-00003.safetensors",
199Added: "model.layers.24.self_attn.k_norm.weight": "model-00002-of-00003.safetensors",
200Added: "model.layers.24.self_attn.k_proj.weight": "model-00002-of-00003.safetensors",
201Added: "model.layers.24.self_attn.o_proj.weight": "model-00002-of-00003.safetensors",
202Added: "model.layers.24.self_attn.q_norm.weight": "model-00002-of-00003.safetensors",
203Added: "model.layers.24.self_attn.q_proj.weight": "model-00002-of-00003.safetensors",
204Added: "model.layers.24.self_attn.v_proj.weight": "model-00002-of-00003.safetensors",
205Added: "model.layers.25.input_layernorm.weight": "model-00002-of-00003.safetensors",
206Added: "model.layers.25.mlp.down_proj.weight": "model-00002-of-00003.safetensors",
207Added: "model.layers.25.mlp.gate_proj.weight": "model-00002-of-00003.safetensors",
208Added: "model.layers.25.mlp.up_proj.weight": "model-00002-of-00003.safetensors",
209Added: "model.layers.25.post_attention_layernorm.weight": "model-00002-of-00003.safetensors",
210Added: "model.layers.25.self_attn.k_norm.weight": "model-00002-of-00003.safetensors",
211Added: "model.layers.25.self_attn.k_proj.weight": "model-00002-of-00003.safetensors",
212Added: "model.layers.25.self_attn.o_proj.weight": "model-00002-of-00003.safetensors",
213Added: "model.layers.25.self_attn.q_norm.weight": "model-00002-of-00003.safetensors",
214Added: "model.layers.25.self_attn.q_proj.weight": "model-00002-of-00003.safetensors",
215Added: "model.layers.25.self_attn.v_proj.weight": "model-00002-of-00003.safetensors",
216Added: "model.layers.26.input_layernorm.weight": "model-00002-of-00003.safetensors",
217Added: "model.layers.26.mlp.down_proj.weight": "model-00002-of-00003.safetensors",
218Added: "model.layers.26.mlp.gate_proj.weight": "model-00002-of-00003.safetensors",
219Added: "model.layers.26.mlp.up_proj.weight": "model-00002-of-00003.safetensors",
220Added: "model.layers.26.post_attention_layernorm.weight": "model-00002-of-00003.safetensors",
221Added: "model.layers.26.self_attn.k_norm.weight": "model-00002-of-00003.safetensors",
222Added: "model.layers.26.self_attn.k_proj.weight": "model-00002-of-00003.safetensors",
223Added: "model.layers.26.self_attn.o_proj.weight": "model-00002-of-00003.safetensors",
224Added: "model.layers.26.self_attn.q_norm.weight": "model-00002-of-00003.safetensors",
225Added: "model.layers.26.self_attn.q_proj.weight": "model-00002-of-00003.safetensors",
226Added: "model.layers.26.self_attn.v_proj.weight": "model-00002-of-00003.safetensors",
227Added: "model.layers.27.input_layernorm.weight": "model-00002-of-00003.safetensors",
228Added: "model.layers.27.mlp.down_proj.weight": "model-00002-of-00003.safetensors",
229Added: "model.layers.27.mlp.gate_proj.weight": "model-00002-of-00003.safetensors",
230Added: "model.layers.27.mlp.up_proj.weight": "model-00002-of-00003.safetensors",
231Added: "model.layers.27.post_attention_layernorm.weight": "model-00002-of-00003.safetensors",
232Added: "model.layers.27.self_attn.k_norm.weight": "model-00002-of-00003.safetensors",
233Added: "model.layers.27.self_attn.k_proj.weight": "model-00002-of-00003.safetensors",
234Added: "model.layers.27.self_attn.o_proj.weight": "model-00002-of-00003.safetensors",
235Added: "model.layers.27.self_attn.q_norm.weight": "model-00002-of-00003.safetensors",
236Added: "model.layers.27.self_attn.q_proj.weight": "model-00002-of-00003.safetensors",
237Added: "model.layers.27.self_attn.v_proj.weight": "model-00002-of-00003.safetensors",
238Added: "model.layers.28.input_layernorm.weight": "model-00002-of-00003.safetensors",
239Added: "model.layers.28.mlp.down_proj.weight": "model-00002-of-00003.safetensors",
240Added: "model.layers.28.mlp.gate_proj.weight": "model-00002-of-00003.safetensors",
241Added: "model.layers.28.mlp.up_proj.weight": "model-00002-of-00003.safetensors",
242Added: "model.layers.28.post_attention_layernorm.weight": "model-00002-of-00003.safetensors",
243Added: "model.layers.28.self_attn.k_norm.weight": "model-00002-of-00003.safetensors",
244Added: "model.layers.28.self_attn.k_proj.weight": "model-00002-of-00003.safetensors",
245Added: "model.layers.28.self_attn.o_proj.weight": "model-00002-of-00003.safetensors",
246Added: "model.layers.28.self_attn.q_norm.weight": "model-00002-of-00003.safetensors",
247Added: "model.layers.28.self_attn.q_proj.weight": "model-00002-of-00003.safetensors",
248Added: "model.layers.28.self_attn.v_proj.weight": "model-00002-of-00003.safetensors",
249Added: "model.layers.29.input_layernorm.weight": "model-00002-of-00003.safetensors",
250Added: "model.layers.29.mlp.down_proj.weight": "model-00002-of-00003.safetensors",
251Added: "model.layers.29.mlp.gate_proj.weight": "model-00002-of-00003.safetensors",
252Added: "model.layers.29.mlp.up_proj.weight": "model-00002-of-00003.safetensors",
253Added: "model.layers.29.post_attention_layernorm.weight": "model-00002-of-00003.safetensors",
254Added: "model.layers.29.self_attn.k_norm.weight": "model-00002-of-00003.safetensors",
255Added: "model.layers.29.self_attn.k_proj.weight": "model-00002-of-00003.safetensors",
256Added: "model.layers.29.self_attn.o_proj.weight": "model-00002-of-00003.safetensors",
257Added: "model.layers.29.self_attn.q_norm.weight": "model-00002-of-00003.safetensors",
258Added: "model.layers.29.self_attn.q_proj.weight": "model-00002-of-00003.safetensors",
259Added: "model.layers.29.self_attn.v_proj.weight": "model-00002-of-00003.safetensors",
260Added: "model.layers.3.input_layernorm.weight": "model-00001-of-00003.safetensors",
261Added: "model.layers.3.mlp.down_proj.weight": "model-00001-of-00003.safetensors",
262Added: "model.layers.3.mlp.gate_proj.weight": "model-00001-of-00003.safetensors",
263Added: "model.layers.3.mlp.up_proj.weight": "model-00001-of-00003.safetensors",
264Added: "model.layers.3.post_attention_layernorm.weight": "model-00001-of-00003.safetensors",
265Added: "model.layers.3.self_attn.k_norm.weight": "model-00001-of-00003.safetensors",
266Added: "model.layers.3.self_attn.k_proj.weight": "model-00001-of-00003.safetensors",
267Added: "model.layers.3.self_attn.o_proj.weight": "model-00001-of-00003.safetensors",
268Added: "model.layers.3.self_attn.q_norm.weight": "model-00001-of-00003.safetensors",
269Added: "model.layers.3.self_attn.q_proj.weight": "model-00001-of-00003.safetensors",
270Added: "model.layers.3.self_attn.v_proj.weight": "model-00001-of-00003.safetensors",
271Added: "model.layers.30.input_layernorm.weight": "model-00002-of-00003.safetensors",
272Added: "model.layers.30.mlp.down_proj.weight": "model-00002-of-00003.safetensors",
273Added: "model.layers.30.mlp.gate_proj.weight": "model-00002-of-00003.safetensors",
274Added: "model.layers.30.mlp.up_proj.weight": "model-00002-of-00003.safetensors",
275Added: "model.layers.30.post_attention_layernorm.weight": "model-00002-of-00003.safetensors",
276Added: "model.layers.30.self_attn.k_norm.weight": "model-00002-of-00003.safetensors",
277Added: "model.layers.30.self_attn.k_proj.weight": "model-00002-of-00003.safetensors",
278Added: "model.layers.30.self_attn.o_proj.weight": "model-00002-of-00003.safetensors",
279Added: "model.layers.30.self_attn.q_norm.weight": "model-00002-of-00003.safetensors",
280Added: "model.layers.30.self_attn.q_proj.weight": "model-00002-of-00003.safetensors",
281Added: "model.layers.30.self_attn.v_proj.weight": "model-00002-of-00003.safetensors",
282Added: "model.layers.31.input_layernorm.weight": "model-00002-of-00003.safetensors",
283Added: "model.layers.31.mlp.down_proj.weight": "model-00002-of-00003.safetensors",
284Added: "model.layers.31.mlp.gate_proj.weight": "model-00002-of-00003.safetensors",
285Added: "model.layers.31.mlp.up_proj.weight": "model-00002-of-00003.safetensors",
286Added: "model.layers.31.post_attention_layernorm.weight": "model-00002-of-00003.safetensors",
287Added: "model.layers.31.self_attn.k_norm.weight": "model-00002-of-00003.safetensors",
288Added: "model.layers.31.self_attn.k_proj.weight": "model-00002-of-00003.safetensors",
289Added: "model.layers.31.self_attn.o_proj.weight": "model-00002-of-00003.safetensors",
290Added: "model.layers.31.self_attn.q_norm.weight": "model-00002-of-00003.safetensors",
291Added: "model.layers.31.self_attn.q_proj.weight": "model-00002-of-00003.safetensors",
292Added: "model.layers.31.self_attn.v_proj.weight": "model-00002-of-00003.safetensors",
293Added: "model.layers.32.input_layernorm.weight": "model-00002-of-00003.safetensors",
294Added: "model.layers.32.mlp.down_proj.weight": "model-00002-of-00003.safetensors",
295Added: "model.layers.32.mlp.gate_proj.weight": "model-00002-of-00003.safetensors",
296Added: "model.layers.32.mlp.up_proj.weight": "model-00002-of-00003.safetensors",
297Added: "model.layers.32.post_attention_layernorm.weight": "model-00002-of-00003.safetensors",
298Added: "model.layers.32.self_attn.k_norm.weight": "model-00002-of-00003.safetensors",
299Added: "model.layers.32.self_attn.k_proj.weight": "model-00002-of-00003.safetensors",
300Added: "model.layers.32.self_attn.o_proj.weight": "model-00002-of-00003.safetensors",
301Added: "model.layers.32.self_attn.q_norm.weight": "model-00002-of-00003.safetensors",
302Added: "model.layers.32.self_attn.q_proj.weight": "model-00002-of-00003.safetensors",
303Added: "model.layers.32.self_attn.v_proj.weight": "model-00002-of-00003.safetensors",
304Added: "model.layers.33.input_layernorm.weight": "model-00002-of-00003.safetensors",
305Added: "model.layers.33.mlp.down_proj.weight": "model-00002-of-00003.safetensors",
306Added: "model.layers.33.mlp.gate_proj.weight": "model-00002-of-00003.safetensors",
307Added: "model.layers.33.mlp.up_proj.weight": "model-00002-of-00003.safetensors",
308Added: "model.layers.33.post_attention_layernorm.weight": "model-00002-of-00003.safetensors",
309Added: "model.layers.33.self_attn.k_norm.weight": "model-00002-of-00003.safetensors",
310Added: "model.layers.33.self_attn.k_proj.weight": "model-00002-of-00003.safetensors",
311Added: "model.layers.33.self_attn.o_proj.weight": "model-00002-of-00003.safetensors",
312Added: "model.layers.33.self_attn.q_norm.weight": "model-00002-of-00003.safetensors",
313Added: "model.layers.33.self_attn.q_proj.weight": "model-00002-of-00003.safetensors",
314Added: "model.layers.33.self_attn.v_proj.weight": "model-00002-of-00003.safetensors",
315Added: "model.layers.34.input_layernorm.weight": "model-00002-of-00003.safetensors",
316Added: "model.layers.34.mlp.down_proj.weight": "model-00002-of-00003.safetensors",
317Added: "model.layers.34.mlp.gate_proj.weight": "model-00002-of-00003.safetensors",
318Added: "model.layers.34.mlp.up_proj.weight": "model-00002-of-00003.safetensors",
319Added: "model.layers.34.post_attention_layernorm.weight": "model-00002-of-00003.safetensors",
320Added: "model.layers.34.self_attn.k_norm.weight": "model-00002-of-00003.safetensors",
321Added: "model.layers.34.self_attn.k_proj.weight": "model-00002-of-00003.safetensors",
322Added: "model.layers.34.self_attn.o_proj.weight": "model-00002-of-00003.safetensors",
323Added: "model.layers.34.self_attn.q_norm.weight": "model-00002-of-00003.safetensors",
324Added: "model.layers.34.self_attn.q_proj.weight": "model-00002-of-00003.safetensors",
325Added: "model.layers.34.self_attn.v_proj.weight": "model-00002-of-00003.safetensors",
326Added: "model.layers.35.input_layernorm.weight": "model-00003-of-00003.safetensors",
327Added: "model.layers.35.mlp.down_proj.weight": "model-00003-of-00003.safetensors",
328Added: "model.layers.35.mlp.gate_proj.weight": "model-00002-of-00003.safetensors",
329Added: "model.layers.35.mlp.up_proj.weight": "model-00003-of-00003.safetensors",
330Added: "model.layers.35.post_attention_layernorm.weight": "model-00003-of-00003.safetensors",
331Added: "model.layers.35.self_attn.k_norm.weight": "model-00002-of-00003.safetensors",
332Added: "model.layers.35.self_attn.k_proj.weight": "model-00002-of-00003.safetensors",
333Added: "model.layers.35.self_attn.o_proj.weight": "model-00002-of-00003.safetensors",
334Added: "model.layers.35.self_attn.q_norm.weight": "model-00002-of-00003.safetensors",
335Added: "model.layers.35.self_attn.q_proj.weight": "model-00002-of-00003.safetensors",
336Added: "model.layers.35.self_attn.v_proj.weight": "model-00002-of-00003.safetensors",
337Added: "model.layers.4.input_layernorm.weight": "model-00001-of-00003.safetensors",
338Added: "model.layers.4.mlp.down_proj.weight": "model-00001-of-00003.safetensors",
339Added: "model.layers.4.mlp.gate_proj.weight": "model-00001-of-00003.safetensors",
340Added: "model.layers.4.mlp.up_proj.weight": "model-00001-of-00003.safetensors",
341Added: "model.layers.4.post_attention_layernorm.weight": "model-00001-of-00003.safetensors",
342Added: "model.layers.4.self_attn.k_norm.weight": "model-00001-of-00003.safetensors",
343Added: "model.layers.4.self_attn.k_proj.weight": "model-00001-of-00003.safetensors",
344Added: "model.layers.4.self_attn.o_proj.weight": "model-00001-of-00003.safetensors",
345Added: "model.layers.4.self_attn.q_norm.weight": "model-00001-of-00003.safetensors",
346Added: "model.layers.4.self_attn.q_proj.weight": "model-00001-of-00003.safetensors",
347Added: "model.layers.4.self_attn.v_proj.weight": "model-00001-of-00003.safetensors",
348Added: "model.layers.5.input_layernorm.weight": "model-00001-of-00003.safetensors",
349Added: "model.layers.5.mlp.down_proj.weight": "model-00001-of-00003.safetensors",
350Added: "model.layers.5.mlp.gate_proj.weight": "model-00001-of-00003.safetensors",
351Added: "model.layers.5.mlp.up_proj.weight": "model-00001-of-00003.safetensors",
352Added: "model.layers.5.post_attention_layernorm.weight": "model-00001-of-00003.safetensors",
353Added: "model.layers.5.self_attn.k_norm.weight": "model-00001-of-00003.safetensors",
354Added: "model.layers.5.self_attn.k_proj.weight": "model-00001-of-00003.safetensors",
355Added: "model.layers.5.self_attn.o_proj.weight": "model-00001-of-00003.safetensors",
356Added: "model.layers.5.self_attn.q_norm.weight": "model-00001-of-00003.safetensors",
357Added: "model.layers.5.self_attn.q_proj.weight": "model-00001-of-00003.safetensors",
358Added: "model.layers.5.self_attn.v_proj.weight": "model-00001-of-00003.safetensors",
359Added: "model.layers.6.input_layernorm.weight": "model-00001-of-00003.safetensors",
360Added: "model.layers.6.mlp.down_proj.weight": "model-00001-of-00003.safetensors",
361Added: "model.layers.6.mlp.gate_proj.weight": "model-00001-of-00003.safetensors",
362Added: "model.layers.6.mlp.up_proj.weight": "model-00001-of-00003.safetensors",
363Added: "model.layers.6.post_attention_layernorm.weight": "model-00001-of-00003.safetensors",
364Added: "model.layers.6.self_attn.k_norm.weight": "model-00001-of-00003.safetensors",
365Added: "model.layers.6.self_attn.k_proj.weight": "model-00001-of-00003.safetensors",
366Added: "model.layers.6.self_attn.o_proj.weight": "model-00001-of-00003.safetensors",
367Added: "model.layers.6.self_attn.q_norm.weight": "model-00001-of-00003.safetensors",
368Added: "model.layers.6.self_attn.q_proj.weight": "model-00001-of-00003.safetensors",
369Added: "model.layers.6.self_attn.v_proj.weight": "model-00001-of-00003.safetensors",
370Added: "model.layers.7.input_layernorm.weight": "model-00001-of-00003.safetensors",
371Added: "model.layers.7.mlp.down_proj.weight": "model-00001-of-00003.safetensors",
372Added: "model.layers.7.mlp.gate_proj.weight": "model-00001-of-00003.safetensors",
373Added: "model.layers.7.mlp.up_proj.weight": "model-00001-of-00003.safetensors",
374Added: "model.layers.7.post_attention_layernorm.weight": "model-00001-of-00003.safetensors",
375Added: "model.layers.7.self_attn.k_norm.weight": "model-00001-of-00003.safetensors",
376Added: "model.layers.7.self_attn.k_proj.weight": "model-00001-of-00003.safetensors",
377Added: "model.layers.7.self_attn.o_proj.weight": "model-00001-of-00003.safetensors",
378Added: "model.layers.7.self_attn.q_norm.weight": "model-00001-of-00003.safetensors",
379Added: "model.layers.7.self_attn.q_proj.weight": "model-00001-of-00003.safetensors",
380Added: "model.layers.7.self_attn.v_proj.weight": "model-00001-of-00003.safetensors",
381Added: "model.layers.8.input_layernorm.weight": "model-00001-of-00003.safetensors",
382Added: "model.layers.8.mlp.down_proj.weight": "model-00001-of-00003.safetensors",
383Added: "model.layers.8.mlp.gate_proj.weight": "model-00001-of-00003.safetensors",
384Added: "model.layers.8.mlp.up_proj.weight": "model-00001-of-00003.safetensors",
385Added: "model.layers.8.post_attention_layernorm.weight": "model-00001-of-00003.safetensors",
386Added: "model.layers.8.self_attn.k_norm.weight": "model-00001-of-00003.safetensors",
387Added: "model.layers.8.self_attn.k_proj.weight": "model-00001-of-00003.safetensors",
388Added: "model.layers.8.self_attn.o_proj.weight": "model-00001-of-00003.safetensors",
389Added: "model.layers.8.self_attn.q_norm.weight": "model-00001-of-00003.safetensors",
390Added: "model.layers.8.self_attn.q_proj.weight": "model-00001-of-00003.safetensors",
391Added: "model.layers.8.self_attn.v_proj.weight": "model-00001-of-00003.safetensors",
392Added: "model.layers.9.input_layernorm.weight": "model-00001-of-00003.safetensors",
393Added: "model.layers.9.mlp.down_proj.weight": "model-00001-of-00003.safetensors",
394Added: "model.layers.9.mlp.gate_proj.weight": "model-00001-of-00003.safetensors",
395Added: "model.layers.9.mlp.up_proj.weight": "model-00001-of-00003.safetensors",
396Added: "model.layers.9.post_attention_layernorm.weight": "model-00001-of-00003.safetensors",
397Added: "model.layers.9.self_attn.k_norm.weight": "model-00001-of-00003.safetensors",
398Added: "model.layers.9.self_attn.k_proj.weight": "model-00001-of-00003.safetensors",
399Added: "model.layers.9.self_attn.o_proj.weight": "model-00001-of-00003.safetensors",
400Added: "model.layers.9.self_attn.q_norm.weight": "model-00001-of-00003.safetensors",
401Added: "model.layers.9.self_attn.q_proj.weight": "model-00001-of-00003.safetensors",
402Added: "model.layers.9.self_attn.v_proj.weight": "model-00001-of-00003.safetensors",
403Added: "model.norm.weight": "model-00003-of-00003.safetensors"
404Added: }
405Added: }

tokenizer.json

Added

Large (LFS-tracked) file content changed — 11 MB

tokenizer_config.json

Added+239 -0
Lines 0 to 0 become lines 1 to 239
@@ -0,0 +1,239 @@
1Added: {
2Added: "add_bos_token": false,
3Added: "add_prefix_space": false,
4Added: "added_tokens_decoder": {
5Added: "151643": {
6Added: "content": "<|endoftext|>",
7Added: "lstrip": false,
8Added: "normalized": false,
9Added: "rstrip": false,
10Added: "single_word": false,
11Added: "special": true
12Added: },
13Added: "151644": {
14Added: "content": "<|im_start|>",
15Added: "lstrip": false,
16Added: "normalized": false,
17Added: "rstrip": false,
18Added: "single_word": false,
19Added: "special": true
20Added: },
21Added: "151645": {
22Added: "content": "<|im_end|>",
23Added: "lstrip": false,
24Added: "normalized": false,
25Added: "rstrip": false,
26Added: "single_word": false,
27Added: "special": true
28Added: },
29Added: "151646": {
30Added: "content": "<|object_ref_start|>",
31Added: "lstrip": false,
32Added: "normalized": false,
33Added: "rstrip": false,
34Added: "single_word": false,
35Added: "special": true
36Added: },
37Added: "151647": {
38Added: "content": "<|object_ref_end|>",
39Added: "lstrip": false,
40Added: "normalized": false,
41Added: "rstrip": false,
42Added: "single_word": false,
43Added: "special": true
44Added: },
45Added: "151648": {
46Added: "content": "<|box_start|>",
47Added: "lstrip": false,
48Added: "normalized": false,
49Added: "rstrip": false,
50Added: "single_word": false,
51Added: "special": true
52Added: },
53Added: "151649": {
54Added: "content": "<|box_end|>",
55Added: "lstrip": false,
56Added: "normalized": false,
57Added: "rstrip": false,
58Added: "single_word": false,
59Added: "special": true
60Added: },
61Added: "151650": {
62Added: "content": "<|quad_start|>",
63Added: "lstrip": false,
64Added: "normalized": false,
65Added: "rstrip": false,
66Added: "single_word": false,
67Added: "special": true
68Added: },
69Added: "151651": {
70Added: "content": "<|quad_end|>",
71Added: "lstrip": false,
72Added: "normalized": false,
73Added: "rstrip": false,
74Added: "single_word": false,
75Added: "special": true
76Added: },
77Added: "151652": {
78Added: "content": "<|vision_start|>",
79Added: "lstrip": false,
80Added: "normalized": false,
81Added: "rstrip": false,
82Added: "single_word": false,
83Added: "special": true
84Added: },
85Added: "151653": {
86Added: "content": "<|vision_end|>",
87Added: "lstrip": false,
88Added: "normalized": false,
89Added: "rstrip": false,
90Added: "single_word": false,
91Added: "special": true
92Added: },
93Added: "151654": {
94Added: "content": "<|vision_pad|>",
95Added: "lstrip": false,
96Added: "normalized": false,
97Added: "rstrip": false,
98Added: "single_word": false,
99Added: "special": true
100Added: },
101Added: "151655": {
102Added: "content": "<|image_pad|>",
103Added: "lstrip": false,
104Added: "normalized": false,
105Added: "rstrip": false,
106Added: "single_word": false,
107Added: "special": true
108Added: },
109Added: "151656": {
110Added: "content": "<|video_pad|>",
111Added: "lstrip": false,
112Added: "normalized": false,
113Added: "rstrip": false,
114Added: "single_word": false,
115Added: "special": true
116Added: },
117Added: "151657": {
118Added: "content": "<tool_call>",
119Added: "lstrip": false,
120Added: "normalized": false,
121Added: "rstrip": false,
122Added: "single_word": false,
123Added: "special": false
124Added: },
125Added: "151658": {
126Added: "content": "</tool_call>",
127Added: "lstrip": false,
128Added: "normalized": false,
129Added: "rstrip": false,
130Added: "single_word": false,
131Added: "special": false
132Added: },
133Added: "151659": {
134Added: "content": "<|fim_prefix|>",
135Added: "lstrip": false,
136Added: "normalized": false,
137Added: "rstrip": false,
138Added: "single_word": false,
139Added: "special": false
140Added: },
141Added: "151660": {
142Added: "content": "<|fim_middle|>",
143Added: "lstrip": false,
144Added: "normalized": false,
145Added: "rstrip": false,
146Added: "single_word": false,
147Added: "special": false
148Added: },
149Added: "151661": {
150Added: "content": "<|fim_suffix|>",
151Added: "lstrip": false,
152Added: "normalized": false,
153Added: "rstrip": false,
154Added: "single_word": false,
155Added: "special": false
156Added: },
157Added: "151662": {
158Added: "content": "<|fim_pad|>",
159Added: "lstrip": false,
160Added: "normalized": false,
161Added: "rstrip": false,
162Added: "single_word": false,
163Added: "special": false
164Added: },
165Added: "151663": {
166Added: "content": "<|repo_name|>",
167Added: "lstrip": false,
168Added: "normalized": false,
169Added: "rstrip": false,
170Added: "single_word": false,
171Added: "special": false
172Added: },
173Added: "151664": {
174Added: "content": "<|file_sep|>",
175Added: "lstrip": false,
176Added: "normalized": false,
177Added: "rstrip": false,
178Added: "single_word": false,
179Added: "special": false
180Added: },
181Added: "151665": {
182Added: "content": "<tool_response>",
183Added: "lstrip": false,
184Added: "normalized": false,
185Added: "rstrip": false,
186Added: "single_word": false,
187Added: "special": false
188Added: },
189Added: "151666": {
190Added: "content": "</tool_response>",
191Added: "lstrip": false,
192Added: "normalized": false,
193Added: "rstrip": false,
194Added: "single_word": false,
195Added: "special": false
196Added: },
197Added: "151667": {
198Added: "content": "<think>",
199Added: "lstrip": false,
200Added: "normalized": false,
201Added: "rstrip": false,
202Added: "single_word": false,
203Added: "special": false
204Added: },
205Added: "151668": {
206Added: "content": "</think>",
207Added: "lstrip": false,
208Added: "normalized": false,
209Added: "rstrip": false,
210Added: "single_word": false,
211Added: "special": false
212Added: }
213Added: },
214Added: "additional_special_tokens": [
215Added: "<|im_start|>",
216Added: "<|im_end|>",
217Added: "<|object_ref_start|>",
218Added: "<|object_ref_end|>",
219Added: "<|box_start|>",
220Added: "<|box_end|>",
221Added: "<|quad_start|>",
222Added: "<|quad_end|>",
223Added: "<|vision_start|>",
224Added: "<|vision_end|>",
225Added: "<|vision_pad|>",
226Added: "<|image_pad|>",
227Added: "<|video_pad|>"
228Added: ],
229Added: "bos_token": null,
230Added: "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 %}",
231Added: "clean_up_tokenization_spaces": false,
232Added: "eos_token": "<|im_end|>",
233Added: "errors": "replace",
234Added: "model_max_length": 131072,
235Added: "pad_token": "<|endoftext|>",
236Added: "split_special_tokens": false,
237Added: "tokenizer_class": "Qwen2Tokenizer",
238Added: "unk_token": null
239Added: }

vocab.json

Added

This file is too large to display.