danielhanchen commited on
Commit
a69e533
·
verified ·
1 Parent(s): 47322a7

Add files using upload-large-folder tool

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. .gitattributes +1 -0
  2. README.md +346 -0
  3. added_tokens.json +28 -0
  4. config.json +38 -0
  5. generation_config.json +13 -0
  6. merges.txt +0 -0
  7. model-00001-of-00118.safetensors +3 -0
  8. model-00002-of-00118.safetensors +3 -0
  9. model-00003-of-00118.safetensors +3 -0
  10. model-00004-of-00118.safetensors +3 -0
  11. model-00005-of-00118.safetensors +3 -0
  12. model-00006-of-00118.safetensors +3 -0
  13. model-00007-of-00118.safetensors +3 -0
  14. model-00008-of-00118.safetensors +3 -0
  15. model-00009-of-00118.safetensors +3 -0
  16. model-00010-of-00118.safetensors +3 -0
  17. model-00011-of-00118.safetensors +3 -0
  18. model-00012-of-00118.safetensors +3 -0
  19. model-00013-of-00118.safetensors +3 -0
  20. model-00014-of-00118.safetensors +3 -0
  21. model-00015-of-00118.safetensors +3 -0
  22. model-00016-of-00118.safetensors +3 -0
  23. model-00017-of-00118.safetensors +3 -0
  24. model-00018-of-00118.safetensors +3 -0
  25. model-00019-of-00118.safetensors +3 -0
  26. model-00020-of-00118.safetensors +3 -0
  27. model-00021-of-00118.safetensors +3 -0
  28. model-00022-of-00118.safetensors +3 -0
  29. model-00023-of-00118.safetensors +3 -0
  30. model-00024-of-00118.safetensors +3 -0
  31. model-00025-of-00118.safetensors +3 -0
  32. model-00026-of-00118.safetensors +3 -0
  33. model-00027-of-00118.safetensors +3 -0
  34. model-00028-of-00118.safetensors +3 -0
  35. model-00029-of-00118.safetensors +3 -0
  36. model-00030-of-00118.safetensors +3 -0
  37. model-00031-of-00118.safetensors +3 -0
  38. model-00032-of-00118.safetensors +3 -0
  39. model-00033-of-00118.safetensors +3 -0
  40. model-00034-of-00118.safetensors +3 -0
  41. model-00035-of-00118.safetensors +3 -0
  42. model-00036-of-00118.safetensors +3 -0
  43. model-00037-of-00118.safetensors +3 -0
  44. model-00038-of-00118.safetensors +3 -0
  45. model-00039-of-00118.safetensors +3 -0
  46. model-00040-of-00118.safetensors +3 -0
  47. model-00041-of-00118.safetensors +3 -0
  48. model-00042-of-00118.safetensors +3 -0
  49. model-00043-of-00118.safetensors +3 -0
  50. model-00044-of-00118.safetensors +3 -0
.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
README.md ADDED
@@ -0,0 +1,346 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ tags:
3
+ - unsloth
4
+ base_model:
5
+ - Qwen/Qwen3-235B-A22B
6
+ license: apache-2.0
7
+ ---
8
+ # Qwen3-235B-A22B
9
+
10
+ ## Qwen3 Highlights
11
+
12
+ 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:
13
+
14
+ - **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.
15
+ - **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.
16
+ - **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.
17
+ - **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.
18
+ - **Support of 100+ languages and dialects** with strong capabilities for **multilingual instruction following** and **translation**.
19
+
20
+ ## Model Overview
21
+
22
+ **Qwen3-235B-A22B** has the following features:
23
+ - Type: Causal Language Models
24
+ - Training Stage: Pretraining & Post-training
25
+ - Number of Parameters: 235B in total and 22B activated
26
+ - Number of Paramaters (Non-Embedding): 234B
27
+ - Number of Layers: 94
28
+ - Number of Attention Heads (GQA): 64 for Q and 4 for KV
29
+ - Number of Experts: 128
30
+ - Number of Activated Experts: 8
31
+ - Context Length: 32,768 natively and [131,072 tokens with YaRN](#processing-long-texts).
32
+
33
+ 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/).
34
+
35
+ ## Quickstart
36
+
37
+ The code of Qwen3-MoE has been in the latest Hugging Face `transformers` and we advise you to use the latest version of `transformers`.
38
+
39
+ With `transformers<4.51.0`, you will encounter the following error:
40
+ ```
41
+ KeyError: 'qwen3_moe'
42
+ ```
43
+
44
+ The following contains a code snippet illustrating how to use the model generate content based on given inputs.
45
+ ```python
46
+ from transformers import AutoModelForCausalLM, AutoTokenizer
47
+
48
+ model_name = "Qwen/Qwen3-235B-A22B"
49
+
50
+ # load the tokenizer and the model
51
+ tokenizer = AutoTokenizer.from_pretrained(model_name)
52
+ model = AutoModelForCausalLM.from_pretrained(
53
+ model_name,
54
+ torch_dtype="auto",
55
+ device_map="auto"
56
+ )
57
+
58
+ # prepare the model input
59
+ prompt = "Give me a short introduction to large language model."
60
+ messages = [
61
+ {"role": "user", "content": prompt}
62
+ ]
63
+ text = tokenizer.apply_chat_template(
64
+ messages,
65
+ tokenize=False,
66
+ add_generation_prompt=True,
67
+ enable_thinking=True # Switches between thinking and non-thinking modes. Default is True.
68
+ )
69
+ model_inputs = tokenizer([text], return_tensors="pt").to(model.device)
70
+
71
+ # conduct text completion
72
+ generated_ids = model.generate(
73
+ **model_inputs,
74
+ max_new_tokens=32768
75
+ )
76
+ output_ids = generated_ids[0][len(model_inputs.input_ids[0]):].tolist()
77
+
78
+ # parsing thinking content
79
+ try:
80
+ # rindex finding 151668 (</think>)
81
+ index = len(output_ids) - output_ids[::-1].index(151668)
82
+ except ValueError:
83
+ index = 0
84
+
85
+ thinking_content = tokenizer.decode(output_ids[:index], skip_special_tokens=True).strip("\n")
86
+ content = tokenizer.decode(output_ids[index:], skip_special_tokens=True).strip("\n")
87
+
88
+ print("thinking content:", thinking_content)
89
+ print("content:", content)
90
+ ```
91
+
92
+ For deployment, you can use `vllm>=0.8.5` or `sglang>=0.4.5.post2` to create an OpenAI-compatible API endpoint:
93
+ - vLLM:
94
+ ```shell
95
+ vllm serve Qwen/Qwen3-235B-A22B --enable-reasoning --reasoning-parser deepseek_r1
96
+ ```
97
+ - SGLang:
98
+ ```shell
99
+ python -m sglang.launch_server --model-path Qwen/Qwen3-235B-A22B --reasoning-parser deepseek-r1
100
+ ```
101
+
102
+ ## Switching Between Thinking and Non-Thinking Mode
103
+
104
+ > [!TIP]
105
+ > The `enable_thinking` switch is also available in APIs created by vLLM and SGLang.
106
+ > Please refer to [our documentation](https://qwen.readthedocs.io/) for more details.
107
+
108
+ ### `enable_thinking=True`
109
+
110
+ 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.
111
+
112
+ ```python
113
+ text = tokenizer.apply_chat_template(
114
+ messages,
115
+ tokenize=False,
116
+ add_generation_prompt=True,
117
+ enable_thinking=True # True is the default value for enable_thinking
118
+ )
119
+ ```
120
+
121
+ In this mode, the model will generate think content wrapped in a `<think>...</think>` block, followed by the final response.
122
+
123
+ > [!NOTE]
124
+ > 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.
125
+
126
+
127
+ ### `enable_thinking=False`
128
+
129
+ 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.
130
+
131
+ ```python
132
+ text = tokenizer.apply_chat_template(
133
+ messages,
134
+ tokenize=False,
135
+ add_generation_prompt=True,
136
+ enable_thinking=False # Setting enable_thinking=False disables thinking mode
137
+ )
138
+ ```
139
+
140
+ In this mode, the model will not generate any think content and will not include a `<think>...</think>` block.
141
+
142
+ > [!NOTE]
143
+ > 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.
144
+
145
+ ### Advanced Usage: Switching Between Thinking and Non-Thinking Modes via User Input
146
+
147
+ 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.
148
+
149
+ Here is an example of a multi-turn conversation:
150
+
151
+ ```python
152
+ from transformers import AutoModelForCausalLM, AutoTokenizer
153
+
154
+ class QwenChatbot:
155
+ def __init__(self, model_name="Qwen/Qwen3-235B-A22B"):
156
+ self.tokenizer = AutoTokenizer.from_pretrained(model_name)
157
+ self.model = AutoModelForCausalLM.from_pretrained(model_name)
158
+ self.history = []
159
+
160
+ def generate_response(self, user_input):
161
+ messages = self.history + [{"role": "user", "content": user_input}]
162
+
163
+ text = self.tokenizer.apply_chat_template(
164
+ messages,
165
+ tokenize=False,
166
+ add_generation_prompt=True
167
+ )
168
+
169
+ inputs = self.tokenizer(text, return_tensors="pt")
170
+ response_ids = self.model.generate(**inputs, max_new_tokens=32768)[0][len(inputs.input_ids[0]):].tolist()
171
+ response = self.tokenizer.decode(response_ids, skip_special_tokens=True)
172
+
173
+ # Update history
174
+ self.history.append({"role": "user", "content": user_input})
175
+ self.history.append({"role": "assistant", "content": response})
176
+
177
+ return response
178
+
179
+ # Example Usage
180
+ if __name__ == "__main__":
181
+ chatbot = QwenChatbot()
182
+
183
+ # First input (without /think or /no_think tags, thinking mode is enabled by default)
184
+ user_input_1 = "How many r's in strawberries?"
185
+ print(f"User: {user_input_1}")
186
+ response_1 = chatbot.generate_response(user_input_1)
187
+ print(f"Bot: {response_1}")
188
+ print("----------------------")
189
+
190
+ # Second input with /no_think
191
+ user_input_2 = "Then, how many r's in blueberries? /no_think"
192
+ print(f"User: {user_input_2}")
193
+ response_2 = chatbot.generate_response(user_input_2)
194
+ print(f"Bot: {response_2}")
195
+ print("----------------------")
196
+
197
+ # Third input with /think
198
+ user_input_3 = "Really? /think"
199
+ print(f"User: {user_input_3}")
200
+ response_3 = chatbot.generate_response(user_input_3)
201
+ print(f"Bot: {response_3}")
202
+ ```
203
+
204
+ > **Note**
205
+ > 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.
206
+ > 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.
207
+
208
+ ## Agentic Use
209
+
210
+ 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.
211
+
212
+ 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.
213
+ ```python
214
+ from qwen_agent.agents import Assistant
215
+
216
+ # Define LLM
217
+ llm_cfg = {
218
+ 'model': 'Qwen3-235B-A22B',
219
+
220
+ # Use the endpoint provided by Alibaba Model Studio:
221
+ # 'model_type': 'qwen_dashscope',
222
+ # 'api_key': os.getenv('DASHSCOPE_API_KEY'),
223
+
224
+ # Use a custom endpoint compatible with OpenAI API:
225
+ 'model_server': 'http://localhost:8000/v1', # api_base
226
+ 'api_key': 'EMPTY',
227
+
228
+ # Other parameters:
229
+ # 'generate_cfg': {
230
+ # # Add: When the response content is `<think>this is the thought</think>this is the answer;
231
+ # # Do not add: When the response has been separated by reasoning_content and content.
232
+ # 'thought_in_content': True,
233
+ # },
234
+ }
235
+
236
+ # Define Tools
237
+ tools = [
238
+ {'mcpServers': { # You can specify the MCP configuration file
239
+ 'time': {
240
+ 'command': 'uvx',
241
+ 'args': ['mcp-server-time', '--local-timezone=Asia/Shanghai']
242
+ },
243
+ "fetch": {
244
+ "command": "uvx",
245
+ "args": ["mcp-server-fetch"]
246
+ }
247
+ }
248
+ },
249
+ 'code_interpreter', # Built-in tools
250
+ ]
251
+
252
+ # Define Agent
253
+ bot = Assistant(llm=llm_cfg, function_list=tools)
254
+
255
+ # Streaming generation
256
+ messages = [{'role': 'user', 'content': 'https://qwenlm.github.io/blog/ Introduce the latest developments of Qwen'}]
257
+ for responses in bot.run(messages=messages):
258
+ pass
259
+ print(responses)
260
+ ```
261
+
262
+ ## Processing Long Texts
263
+
264
+ 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.
265
+
266
+ 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:
267
+
268
+ - Modifying the model files:
269
+ In the `config.json` file, add the `rope_scaling` fields:
270
+ ```json
271
+ {
272
+ ...,
273
+ "rope_scaling": {
274
+ "type": "yarn",
275
+ "factor": 4.0,
276
+ "original_max_position_embeddings": 32768
277
+ }
278
+ }
279
+ ```
280
+ For `llama.cpp`, you need to regenerate the GGUF file after the modification.
281
+
282
+ - Passing command line arguments:
283
+
284
+ For `vllm`, you can use
285
+ ```shell
286
+ vllm serve ... --rope-scaling '{"type":"yarn","factor":4.0,"original_max_position_embeddings":32768}' --max-model-len 131072
287
+ ```
288
+
289
+ For `sglang`, you can use
290
+ ```shell
291
+ python -m sglang.launch_server ... --json-model-override-args '{"rope_scaling":{"type":"yarn","factor":4.0,"original_max_position_embeddings":32768}}'
292
+ ```
293
+
294
+ For `llama-server` from `llama.cpp`, you can use
295
+ ```shell
296
+ llama-server ... --rope-scaling yarn --rope-scale 4 --yarn-orig-ctx 32768
297
+ ```
298
+
299
+ > [!IMPORTANT]
300
+ > If you encounter the following warning
301
+ > ```
302
+ > Unrecognized keys in `rope_scaling` for 'rope_type'='yarn': {'original_max_position_embeddings'}
303
+ > ```
304
+ > please upgrade `transformers>=4.51.0`.
305
+
306
+ > [!NOTE]
307
+ > 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.**
308
+ > We advise adding the `rope_scaling` configuration only when processing long contexts is required.
309
+ > 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.
310
+
311
+ > [!NOTE]
312
+ > 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.
313
+
314
+ > [!TIP]
315
+ > The endpoint provided by Alibaba Model Studio supports dynamic YaRN by default and no extra configuration is needed.
316
+
317
+ ## Best Practices
318
+
319
+ To achieve optimal performance, we recommend the following settings:
320
+
321
+ 1. **Sampling Parameters**:
322
+ - 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.
323
+ - For non-thinking mode (`enable_thinking=False`), we suggest using `Temperature=0.7`, `TopP=0.8`, `TopK=20`, and `MinP=0`.
324
+ - 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.
325
+
326
+ 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.
327
+
328
+ 3. **Standardize Output Format**: We recommend using prompts to standardize model outputs when benchmarking.
329
+ - **Math Problems**: Include "Please reason step by step, and put your final answer within \boxed{}." in the prompt.
330
+ - **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"`."
331
+
332
+ 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.
333
+
334
+ ### Citation
335
+
336
+ If you find our work helpful, feel free to give us a cite.
337
+
338
+ ```
339
+ @misc{qwen3,
340
+ title = {Qwen3},
341
+ url = {https://qwenlm.github.io/blog/qwen3/},
342
+ author = {Qwen Team},
343
+ month = {April},
344
+ year = {2025}
345
+ }
346
+ ```
added_tokens.json ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "</think>": 151668,
3
+ "</tool_call>": 151658,
4
+ "</tool_response>": 151666,
5
+ "<think>": 151667,
6
+ "<tool_call>": 151657,
7
+ "<tool_response>": 151665,
8
+ "<|box_end|>": 151649,
9
+ "<|box_start|>": 151648,
10
+ "<|endoftext|>": 151643,
11
+ "<|file_sep|>": 151664,
12
+ "<|fim_middle|>": 151660,
13
+ "<|fim_pad|>": 151662,
14
+ "<|fim_prefix|>": 151659,
15
+ "<|fim_suffix|>": 151661,
16
+ "<|im_end|>": 151645,
17
+ "<|im_start|>": 151644,
18
+ "<|image_pad|>": 151655,
19
+ "<|object_ref_end|>": 151647,
20
+ "<|object_ref_start|>": 151646,
21
+ "<|quad_end|>": 151651,
22
+ "<|quad_start|>": 151650,
23
+ "<|repo_name|>": 151663,
24
+ "<|video_pad|>": 151656,
25
+ "<|vision_end|>": 151653,
26
+ "<|vision_pad|>": 151654,
27
+ "<|vision_start|>": 151652
28
+ }
config.json ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "Qwen3MoeForCausalLM"
4
+ ],
5
+ "attention_bias": false,
6
+ "attention_dropout": 0.0,
7
+ "bos_token_id": 151643,
8
+ "decoder_sparse_step": 1,
9
+ "eos_token_id": 151645,
10
+ "head_dim": 128,
11
+ "hidden_act": "silu",
12
+ "hidden_size": 4096,
13
+ "initializer_range": 0.02,
14
+ "intermediate_size": 8192,
15
+ "max_position_embeddings": 40960,
16
+ "max_window_layers": 94,
17
+ "mlp_only_layers": [],
18
+ "model_type": "qwen3_moe",
19
+ "moe_intermediate_size": 1536,
20
+ "norm_topk_prob": true,
21
+ "num_attention_heads": 64,
22
+ "num_experts": 128,
23
+ "num_experts_per_tok": 8,
24
+ "num_hidden_layers": 94,
25
+ "num_key_value_heads": 4,
26
+ "output_router_logits": false,
27
+ "rms_norm_eps": 1e-06,
28
+ "rope_scaling": null,
29
+ "rope_theta": 1000000.0,
30
+ "router_aux_loss_coef": 0.001,
31
+ "sliding_window": null,
32
+ "tie_word_embeddings": false,
33
+ "torch_dtype": "bfloat16",
34
+ "transformers_version": "4.51.0",
35
+ "use_cache": true,
36
+ "use_sliding_window": false,
37
+ "vocab_size": 151936
38
+ }
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-00118.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:75eae88411054e9ee9118e041d96d0304531e45a62694414bc4416e438096ace
3
+ size 3993004560
model-00002-of-00118.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b89fad4bb1e64f13e4ae03fd22718f2f3ee0a456b8ee88d39b0211a9a8636822
3
+ size 3994081856
model-00003-of-00118.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e1aace4cbd700af14716112edb4d2707e1a7b91bd6798eb788d898093e7c2506
3
+ size 3994081856
model-00004-of-00118.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ce80ea5ce5eed1f00b2943883730171e902330245837345c1c2f24bfe7b34316
3
+ size 3988822448
model-00005-of-00118.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d580693e4c7034b5145c6910c0b51953806f0d95547a170704d538a5130f3772
3
+ size 3994081784
model-00006-of-00118.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:fae446c060012bf9890af22194f4b933b2383dd7468f305cb4068544a6ec724c
3
+ size 3994081856
model-00007-of-00118.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:97f8306de346feb0ac0b084a0334c4db98b8ae5812fb24f6c4212d397093a941
3
+ size 3994081856
model-00008-of-00118.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a12aa81dd86b4e999047923595013ffa03103c9c53b8428e0c89573d3406bc0b
3
+ size 3994081856
model-00009-of-00118.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0d98a06270a8154bd02a5801c2a99ec40b15651f5db6a20b6399444b9017a93a
3
+ size 3988822456
model-00010-of-00118.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:798124993d5266992176a907e76f4b9c3e6fc2f3ee17a0b3dc6cc6e01fbc6cde
3
+ size 3994081784
model-00011-of-00118.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:cc5a8f81f5564d0ce28fdcbdbccc9acbda4f473d955529b8f2c06191b0547b0a
3
+ size 3994081856
model-00012-of-00118.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:57efa06c74ebb9d463674b3b8905fada9fb51eb08b6b2b98079dcfcdea610e8d
3
+ size 3994081856
model-00013-of-00118.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ea074b3e4e4764a8aa88617ada94f70faa11b2902242a072b28454098b03b6ee
3
+ size 3994081944
model-00014-of-00118.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3f0d64859756404e66b3ee63696b6ac1e3d1bd12d3d0b13f56e2658eb002da4b
3
+ size 3988822776
model-00015-of-00118.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1f8e20fb8f2991ff632895da7052e1a2fc1d3dfb4b08cbb4f8f19e212892555d
3
+ size 3994082088
model-00016-of-00118.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5e77ed028c0043b52569019edd6f48b75ce8711a2e9e116f4dc14bdc13a7b7c5
3
+ size 3994082176
model-00017-of-00118.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3222dad8984fa4186b6ad532e33c724620493669e6edbc1842c606972cc56638
3
+ size 3994082176
model-00018-of-00118.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:12f2401d9f984192f01d9c6065fae4857f28d47e3aa83cbc3aa765cd044863fc
3
+ size 3994082176
model-00019-of-00118.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:89ac32832cdaa0f2661bb67bcf9dc7a189bed2890c831ffacc8d0b7bceb2d04f
3
+ size 3988822776
model-00020-of-00118.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:66d149559efc49d3c59398acdf6e379ed9f917a3f766067203c15d7a3423ded1
3
+ size 3994082088
model-00021-of-00118.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c19ad22879679d4fdb19632ea3c397a05f2ee963c60e48ad69082b88e18d18d7
3
+ size 3994082168
model-00022-of-00118.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1e8e67642cc6f4fc9dc32e70b0a6452fd375fe83cf95639c177933c3e4290e9d
3
+ size 3994082176
model-00023-of-00118.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7892270496fec53cbd2c17929aa04bcbb6b8ab657d4ee27f1783ad1de367f14a
3
+ size 3994082176
model-00024-of-00118.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:062b04307995990987c9cf2073859af1a6169be1185b0c769d3ee5dc902f46d5
3
+ size 3938507240
model-00025-of-00118.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e8bfc33a5f0bd9542434a6205258f3a2cd22cdabfdfd6d39e262e41252104efd
3
+ size 3994065488
model-00026-of-00118.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a565c263aa17f8d4af389ef2d093e734710e9dcc238a43d7a4aee213bd5900aa
3
+ size 3994082168
model-00027-of-00118.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6bcd52f15b6d48951eacef7334ed350d539b7480e89502bbcbaa9289d948aedb
3
+ size 3994082176
model-00028-of-00118.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:18633671294c9ea5555cef3c96a44bf12c37c088f456b7ed39a2bba620d0ea0e
3
+ size 3994082176
model-00029-of-00118.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:72751de14395df1524421ebd9f6d13eef5a110b29a0dd4c05877a05fb6e7b05e
3
+ size 3997227600
model-00030-of-00118.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:239e308345e8005af5e98a09a3420c746fad2f64951612687ab7dccd0924bc30
3
+ size 3998260320
model-00031-of-00118.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1aa2aef0063200ce05ac1830c2df6e069ff077953b063fd189ec61975a5e82e8
3
+ size 3994082160
model-00032-of-00118.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f4ebd2c7d14a450a2b4a97345940a4e1a92d31f3b3b21b3467e423f46315d30c
3
+ size 3994082176
model-00033-of-00118.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:073bf0891cfa2b53b7e9de6897b258e2f969081ae739e816223b9dcf4537e239
3
+ size 3994082176
model-00034-of-00118.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:be12b5da1c226e158d304fcfb525bb9a41f8f23cf135aaa365c8e932a948d4ac
3
+ size 3994082200
model-00035-of-00118.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3122332b5c25225c21d76bd437f01f914ca9050aceb76e56abaf3622a6f781c9
3
+ size 3988822680
model-00036-of-00118.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1cd377ce5dda245b0692363661b4d8860e37763c3d1975161edd36b2ac230abd
3
+ size 3994082152
model-00037-of-00118.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3ac7d27eaddbc322d9a74e3f02a9f1078a76be645f9b9f00bc7f09e6f461d0e4
3
+ size 3994082176
model-00038-of-00118.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1db1b70762854943b6ce3d625fffa4fae0feef49b1b2a6fefa14f8999b6fed76
3
+ size 3994082176
model-00039-of-00118.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e79f4b3527e28a6111da88b81941220aac8f36e07565066e64597385220c4fd2
3
+ size 3994082200
model-00040-of-00118.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9acbd0cfe5f2795121199493ed0ef8d8b46de697d80741ae2d5536c51287879b
3
+ size 3988822696
model-00041-of-00118.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ac152650f79f6cec82d5206ac1c4463de0ff542b573667b977914be1a3eaf556
3
+ size 3994082152
model-00042-of-00118.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4ebd01dd884d58f2032850b61e26876822009c190d818051414f22a8d0116bec
3
+ size 3994082176
model-00043-of-00118.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9680cf81b058b657ca5183cd9dcee77a4c10296375b959f59ca3f17240d2ba16
3
+ size 3994082176
model-00044-of-00118.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1e7c6b7286ab753ca112e415e5bca14cc00c92717702d3fa7a395d47bf7b0209
3
+ size 3994082192