PedroPareja commited on
Commit
0a75342
·
verified ·
1 Parent(s): c32d13d

Upload 12 files

Browse files
.gitattributes CHANGED
@@ -33,3 +33,5 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
 
 
 
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
+ quantization_config.json filter=lfs diff=lfs merge=lfs -text
37
+ tokenizer.json filter=lfs diff=lfs merge=lfs -text
README.md ADDED
@@ -0,0 +1,506 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ library_name: transformers
4
+ language:
5
+ - en
6
+ - fr
7
+ - zh
8
+ - de
9
+ tags:
10
+ - programming
11
+ - code generation
12
+ - code
13
+ - codeqwen
14
+ - programming
15
+ - code generation
16
+ - code
17
+ - codeqwen
18
+ - moe
19
+ - coding
20
+ - coder
21
+ - qwen2
22
+ - chat
23
+ - qwen
24
+ - qwen-coder
25
+ - chat
26
+ - qwen
27
+ - qwen-coder
28
+ - moe
29
+ - Qwen3-30B-A3B-Thinking-2507
30
+ - Qwen3-30B-A3B
31
+ - mixture of experts
32
+ - 128 experts
33
+ - 8 active experts
34
+ - 256k context
35
+ - qwen3
36
+ - finetune
37
+ - brainstorm 20x
38
+ - brainstorm
39
+ - thinking
40
+ - reasoning
41
+ - uncensored
42
+ - abliterated
43
+ - qwen3_moe
44
+ base_model:
45
+ - huihui-ai/Huihui-Qwen3-30B-A3B-Thinking-2507-abliterated
46
+ pipeline_tag: text-generation
47
+ ---
48
+
49
+ <h2>Qwen3-42B-A3B-2507-Thinking-Abliterated-uncensored-TOTAL-RECALL-v2-Medium-MASTER-CODER [256k context]</h2>
50
+
51
+ <img src="qwen3-total-recall.gif" style="float:right; width:300px; height:300px; padding:10px;">
52
+
53
+ This repo contains the full precision source code, in "safe tensors" format to generate GGUFs, GPTQ, EXL2, AWQ, HQQ and other formats.
54
+ The source code can also be used directly.
55
+
56
+ This model is for all use cases, but excels in CODING and programming in all major programming languages and many minor ones too.
57
+
58
+ This model can also be used for creative use cases too due to abliteration / de-censoring and the Brainstorm 20x adapter.
59
+
60
+ This is the abliterated / uncensored version.
61
+
62
+ This model is based on Qwen3-30B-A3B-Instruct-2507 -Abliterated version- (MOE, 128 experts, 8 activated), with Brainstorm 20X
63
+ (by DavidAU) - details at bottom of this page.
64
+
65
+ The Brainstorm adapter will improve general performance and "out of the box" thinking.
66
+
67
+ This creates a model of 42B parameters, 67 layers and 807 tensors.
68
+
69
+ This version has the NATIVE context of 256k.
70
+
71
+ This version (vs Brainstorm 40x, 53B version) can be used for both coding and creative use cases.
72
+
73
+ ABLITERATION NOTES:
74
+ - You may need higher rep pen and/or slightly more experts
75
+ - Quants: Suggest imatrixed versions and/or quants Q4/IQ4 and above although Q2K/Q3s/IQ3s may be "passable".
76
+ - If you are trying to get the model to perform a specific task, use an example.
77
+ - For creative: If you want the model to swear, include "gore", or something erotic -> including example, "words to use", etc etc.
78
+
79
+ If the "abliterated" version is not meeting requirements, you may want to use the regular version (slightly uncensored) - https://huggingface.co/DavidAU/Qwen3-42B-A3B-2507-Thinking-TOTAL-RECALL-v2-Medium-MASTER-CODER - and
80
+ then use the "abliterated version" to "finish the project."
81
+
82
+ <B>IMPORTANT: Using an "abliterated" model VS "uncensored" model</B>
83
+
84
+ Usually when you a tell a model to generate horror, swear or x-rated content this is all you have to do to get said content type.
85
+
86
+ In the case of this model, it will not refuse your request, however it needs to be "pushed" a bit / directed a bit more in SOME CASES.
87
+
88
+ Although this model will generated x-rated content too, likewise you need to tell it to use "slang" (and include the terms you want)
89
+ to get it generate the content correctly as the "expected" content level too.
90
+
91
+ Without these added directive(s), the content can be "bland" by comparison to an "uncensored model" or model trained on uncensored content.
92
+
93
+ Roughly, the model tries to generate the content but the "default" setting(s) are so "tame" it needs a push to generate at expected graphic,
94
+ cursing or explicit levels.
95
+
96
+ Even with minimal direction (ie, use these words to swear: x,y,z), this will be enough to push the model to generate the requested content in the ahh... expected format.
97
+
98
+ The same guidelines apply to "coding" too.
99
+
100
+ SETTINGS:
101
+
102
+ For coding, programming set expert to:
103
+ - 6-8 for general work.
104
+ - 10 for moderate work.
105
+ - 12-16 for complex work, long projects, complex coding.
106
+ - And for longer context, and/or multi-turn -> increase experts by 1-2 to help with longer context/multi turn understanding.
107
+ - Suggest min context 8k-16k for thinking/output.
108
+
109
+ Recommended settings - general:
110
+ - Rep pen 1.05 to 1.1 ; however rep pen of 1 will work well (may need to raise it for lower quants/fewer activated experts)
111
+ - Temp .3 to .6 (+- .2)
112
+ - Topk of 20, 40 or 100
113
+ - Topp of .95 / min p of .05
114
+ - System prompt (optional) to focus the model better.
115
+ - Suggest min context 8k-16k for thinking/output.
116
+
117
+ Creative Use Cases:
118
+ - Rep pen of 1.05 or higher, especially if using a lower quant / lower temps.
119
+ - Also use rep pen of 1.05 or higher with very short prompts.
120
+ - You can set active experts as low as "4" for creative use cases.
121
+ - Suggest min context 8k-16k for thinking/output.
122
+
123
+ This is the refined version -V1.4- from this project (see this repo for all settings, details, system prompts, example generations etc etc):
124
+
125
+ https://huggingface.co/DavidAU/Qwen3-55B-A3B-TOTAL-RECALL-Deep-40X-GGUF/
126
+
127
+ This version 2 is slightly smaller, with further refinements to the Brainstorm adapter and uses the new "Qwen3-30B-A3B-Instruct-2507".
128
+
129
+ Review and Specialized Settings for this model (V 1.4):
130
+
131
+ https://www.linkedin.com/posts/gchesler_davidauqwen3-53b-a3b-total-recall-v14-128k-activity-7344938636141858816-ILCM/
132
+
133
+ https://www.linkedin.com/posts/gchesler_haskell-postgres-agentic-activity-7347103276141596672-_zbo/
134
+
135
+ You may also want to see (root model of Total Recall series - Version 1):
136
+
137
+ https://huggingface.co/Qwen/Qwen3-30B-A3B
138
+
139
+ AND Version 2 root model:
140
+
141
+ https://huggingface.co/Qwen/Qwen3-30B-A3B-Thinking-2507
142
+
143
+ AND
144
+
145
+ https://huggingface.co/huihui-ai/Huihui-Qwen3-30B-A3B-Thinking-2507-abliterated
146
+
147
+ For additional settings, tool use, and other model settings.
148
+
149
+ Summary of root model below, followed by FULL HELP SECTION, then info on Brainstorm 40x.
150
+
151
+ ---
152
+
153
+ <B>QUANTS:</b>
154
+
155
+ ---
156
+
157
+ Special thanks to team "Mradermacher" and team "Nightmedia" for GGUF, GGUF Imatrix and MLX quants:
158
+
159
+ GGUF:
160
+
161
+ https://huggingface.co/mradermacher/Qwen3-42B-A3B-2507-Thinking-Abliterated-uncensored-TOTAL-RECALL-v2-Medium-MASTER-CODER-GGUF
162
+
163
+ GGUF-IMATRIX:
164
+
165
+ https://huggingface.co/mradermacher/Qwen3-42B-A3B-2507-Thinking-Abliterated-uncensored-TOTAL-RECALL-v2-Medium-MASTER-CODER-i1-GGUF
166
+
167
+ MLX:
168
+
169
+ https://huggingface.co/nightmedia/Qwen3-42B-A3B-2507-Thinking-Abliterated-uncensored-TOTAL-RECALL-v2-Medium-MASTER-CODER-q6-mlx
170
+
171
+ https://huggingface.co/nightmedia/Qwen3-42B-A3B-2507-Thinking-Abliterated-uncensored-TOTAL-RECALL-v2-Medium-MASTER-CODER-qx6-mlx
172
+
173
+ https://huggingface.co/nightmedia/Qwen3-42B-A3B-2507-Thinking-Abliterated-uncensored-TOTAL-RECALL-v2-Medium-MASTER-CODER-q5-hi-mlx
174
+
175
+ https://huggingface.co/nightmedia/Qwen3-42B-A3B-2507-Thinking-Abliterated-uncensored-TOTAL-RECALL-v2-Medium-MASTER-CODER-q6-hi-mlx
176
+
177
+ ---
178
+
179
+ # Qwen3-30B-A3B-Thinking-2507
180
+
181
+ ## Highlights
182
+
183
+ Over the past three months, we have continued to scale the **thinking capability** of Qwen3-30B-A3B, improving both the **quality and depth** of reasoning. We are pleased to introduce **Qwen3-30B-A3B-Thinking-2507**, featuring the following key enhancements:
184
+
185
+ - **Significantly improved performance** on reasoning tasks, including logical reasoning, mathematics, science, coding, and academic benchmarks that typically require human expertise.
186
+ - **Markedly better general capabilities**, such as instruction following, tool usage, text generation, and alignment with human preferences.
187
+ - **Enhanced 256K long-context understanding** capabilities.
188
+
189
+ **NOTE**: This version has an increased thinking length. We strongly recommend its use in highly complex reasoning tasks.
190
+
191
+ ![image/jpeg](https://qianwen-res.oss-cn-beijing.aliyuncs.com/Qwen3-2507/Qwen3-30B-A3B-Thinking-2507.jpeg)
192
+
193
+ ## Model Overview
194
+
195
+ **Qwen3-30B-A3B-Thinking-2507** has the following features:
196
+ - Type: Causal Language Models
197
+ - Training Stage: Pretraining & Post-training
198
+ - Number of Parameters: 30.5B in total and 3.3B activated
199
+ - Number of Paramaters (Non-Embedding): 29.9B
200
+ - Number of Layers: 48
201
+ - Number of Attention Heads (GQA): 32 for Q and 4 for KV
202
+ - Number of Experts: 128
203
+ - Number of Activated Experts: 8
204
+ - Context Length: **262,144 natively**.
205
+
206
+ **NOTE: This model supports only thinking mode. Meanwhile, specifying `enable_thinking=True` is no longer required.**
207
+
208
+ Additionally, to enforce model thinking, the default chat template automatically includes `<think>`. Therefore, it is normal for the model's output to contain only `</think>` without an explicit opening `<think>` tag.
209
+
210
+ 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/).
211
+
212
+ ## Performance
213
+
214
+ | | Gemini2.5-Flash-Thinking | Qwen3-235B-A22B Thinking | Qwen3-30B-A3B Thinking | Qwen3-30B-A3B-Thinking-2507 |
215
+ |--- | --- | --- | --- | --- |
216
+ | **Knowledge** | | | | |
217
+ | MMLU-Pro | 81.9 | **82.8** | 78.5 | 80.9 |
218
+ | MMLU-Redux | 92.1 | **92.7** | 89.5 | 91.4 |
219
+ | GPQA | **82.8** | 71.1 | 65.8 | 73.4 |
220
+ | SuperGPQA | 57.8 | **60.7** | 51.8 | 56.8 |
221
+ | **Reasoning** | | | | |
222
+ | AIME25 | 72.0 | 81.5 | 70.9 | **85.0** |
223
+ | HMMT25 | 64.2 | 62.5 | 49.8 | **71.4** |
224
+ | LiveBench 20241125 | 74.3 | **77.1** | 74.3 | 76.8 |
225
+ | **Coding** | | | | |
226
+ | LiveCodeBench v6 (25.02-25.05) | 61.2 | 55.7 | 57.4 | **66.0** |
227
+ | CFEval | 1995 | **2056** | 1940 | 2044 |
228
+ | OJBench | 23.5 | **25.6** | 20.7 | 25.1 |
229
+ | **Alignment** | | | | |
230
+ | IFEval | **89.8** | 83.4 | 86.5 | 88.9 |
231
+ | Arena-Hard v2$ | 56.7 | **61.5** | 36.3 | 56.0 |
232
+ | Creative Writing v3 | **85.0** | 84.6 | 79.1 | 84.4 |
233
+ | WritingBench | 83.9 | 80.3 | 77.0 | **85.0** |
234
+ | **Agent** | | | | |
235
+ | BFCL-v3 | 68.6 | 70.8 | 69.1 | **72.4** |
236
+ | TAU1-Retail | 65.2 | 54.8 | 61.7 | **67.8** |
237
+ | TAU1-Airline | **54.0** | 26.0 | 32.0 | 48.0 |
238
+ | TAU2-Retail | **66.7** | 40.4 | 34.2 | 58.8 |
239
+ | TAU2-Airline | 52.0 | 30.0 | 36.0 | **58.0** |
240
+ | TAU2-Telecom | **31.6** | 21.9 | 22.8 | 26.3 |
241
+ | **Multilingualism** | | | | |
242
+ | MultiIF | 74.4 | 71.9 | 72.2 | **76.4** |
243
+ | MMLU-ProX | **80.2** | 80.0 | 73.1 | 76.4 |
244
+ | INCLUDE | **83.9** | 78.7 | 71.9 | 74.4 |
245
+ | PolyMATH | 49.8 | **54.7** | 46.1 | 52.6 |
246
+
247
+ $ For reproducibility, we report the win rates evaluated by GPT-4.1.
248
+
249
+ \& For highly challenging tasks (including PolyMATH and all reasoning and coding tasks), we use an output length of 81,920 tokens. For all other tasks, we set the output length to 32,768.
250
+
251
+
252
+ ## Quickstart
253
+
254
+ The code of Qwen3-MoE has been in the latest Hugging Face `transformers` and we advise you to use the latest version of `transformers`.
255
+
256
+ With `transformers<4.51.0`, you will encounter the following error:
257
+ ```
258
+ KeyError: 'qwen3_moe'
259
+ ```
260
+
261
+ The following contains a code snippet illustrating how to use the model generate content based on given inputs.
262
+ ```python
263
+ from transformers import AutoModelForCausalLM, AutoTokenizer
264
+
265
+ model_name = "Qwen/Qwen3-30B-A3B-Thinking-2507"
266
+
267
+ # load the tokenizer and the model
268
+ tokenizer = AutoTokenizer.from_pretrained(model_name)
269
+ model = AutoModelForCausalLM.from_pretrained(
270
+ model_name,
271
+ torch_dtype="auto",
272
+ device_map="auto"
273
+ )
274
+
275
+ # prepare the model input
276
+ prompt = "Give me a short introduction to large language model."
277
+ messages = [
278
+ {"role": "user", "content": prompt}
279
+ ]
280
+ text = tokenizer.apply_chat_template(
281
+ messages,
282
+ tokenize=False,
283
+ add_generation_prompt=True,
284
+ )
285
+ model_inputs = tokenizer([text], return_tensors="pt").to(model.device)
286
+
287
+ # conduct text completion
288
+ generated_ids = model.generate(
289
+ **model_inputs,
290
+ max_new_tokens=32768
291
+ )
292
+ output_ids = generated_ids[0][len(model_inputs.input_ids[0]):].tolist()
293
+
294
+ # parsing thinking content
295
+ try:
296
+ # rindex finding 151668 (</think>)
297
+ index = len(output_ids) - output_ids[::-1].index(151668)
298
+ except ValueError:
299
+ index = 0
300
+
301
+ thinking_content = tokenizer.decode(output_ids[:index], skip_special_tokens=True).strip("\n")
302
+ content = tokenizer.decode(output_ids[index:], skip_special_tokens=True).strip("\n")
303
+
304
+ print("thinking content:", thinking_content) # no opening <think> tag
305
+ print("content:", content)
306
+
307
+ ```
308
+
309
+ For deployment, you can use `sglang>=0.4.6.post1` or `vllm>=0.8.5` or to create an OpenAI-compatible API endpoint:
310
+ - SGLang:
311
+ ```shell
312
+ python -m sglang.launch_server --model-path Qwen/Qwen3-30B-A3B-Thinking-2507 --context-length 262144 --reasoning-parser deepseek-r1
313
+ ```
314
+ - vLLM:
315
+ ```shell
316
+ vllm serve Qwen/Qwen3-30B-A3B-Thinking-2507 --max-model-len 262144 --enable-reasoning --reasoning-parser deepseek_r1
317
+ ```
318
+
319
+ **Note: If you encounter out-of-memory (OOM) issues, you may consider reducing the context length to a smaller value. However, since the model may require longer token sequences for reasoning, we strongly recommend using a context length greater than 131,072 when possible.**
320
+
321
+ For local use, applications such as Ollama, LMStudio, MLX-LM, llama.cpp, and KTransformers have also supported Qwen3.
322
+
323
+ ## Agentic Use
324
+
325
+ 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.
326
+
327
+ 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.
328
+ ```python
329
+ from qwen_agent.agents import Assistant
330
+
331
+ # Define LLM
332
+ # Using Alibaba Cloud Model Studio
333
+ llm_cfg = {
334
+ 'model': 'qwen3-30b-a3b-thinking-2507',
335
+ 'model_type': 'qwen_dashscope',
336
+ }
337
+
338
+ # Using OpenAI-compatible API endpoint. It is recommended to disable the reasoning and the tool call parsing
339
+ # functionality of the deployment frameworks and let Qwen-Agent automate the related operations. For example,
340
+ # `VLLM_USE_MODELSCOPE=true vllm serve Qwen/Qwen3-30B-A3B-Thinking-2507 --served-model-name Qwen3-30B-A3B-Thinking-2507 --tensor-parallel-size 8 --max-model-len 262144`.
341
+ #
342
+ # llm_cfg = {
343
+ # 'model': 'Qwen3-30B-A3B-Thinking-2507',
344
+ #
345
+ # # Use a custom endpoint compatible with OpenAI API:
346
+ # 'model_server': 'http://localhost:8000/v1', # api_base without reasoning and tool call parsing
347
+ # 'api_key': 'EMPTY',
348
+ # 'generate_cfg': {
349
+ # 'thought_in_content': True,
350
+ # },
351
+ # }
352
+
353
+
354
+ # Define Tools
355
+ tools = [
356
+ {'mcpServers': { # You can specify the MCP configuration file
357
+ 'time': {
358
+ 'command': 'uvx',
359
+ 'args': ['mcp-server-time', '--local-timezone=Asia/Shanghai']
360
+ },
361
+ "fetch": {
362
+ "command": "uvx",
363
+ "args": ["mcp-server-fetch"]
364
+ }
365
+ }
366
+ },
367
+ 'code_interpreter', # Built-in tools
368
+ ]
369
+
370
+ # Define Agent
371
+ bot = Assistant(llm=llm_cfg, function_list=tools)
372
+
373
+ # Streaming generation
374
+ messages = [{'role': 'user', 'content': 'https://qwenlm.github.io/blog/ Introduce the latest developments of Qwen'}]
375
+ for responses in bot.run(messages=messages):
376
+ pass
377
+ print(responses)
378
+ ```
379
+
380
+ ## Best Practices
381
+
382
+ To achieve optimal performance, we recommend the following settings:
383
+
384
+ 1. **Sampling Parameters**:
385
+ - We suggest using `Temperature=0.6`, `TopP=0.95`, `TopK=20`, and `MinP=0`.
386
+ - 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.
387
+
388
+ 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 81,920 tokens. This provides the model with sufficient space to generate detailed and comprehensive responses, thereby enhancing its overall performance.
389
+
390
+ 3. **Standardize Output Format**: We recommend using prompts to standardize model outputs when benchmarking.
391
+ - **Math Problems**: Include "Please reason step by step, and put your final answer within \boxed{}." in the prompt.
392
+ - **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"`."
393
+
394
+ 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.
395
+
396
+ ---
397
+
398
+ <H2>Help, Adjustments, Samplers, Parameters and More</H2>
399
+
400
+ ---
401
+
402
+ <B>CHANGE THE NUMBER OF ACTIVE EXPERTS:</B>
403
+
404
+ See this document:
405
+
406
+ https://huggingface.co/DavidAU/How-To-Set-and-Manage-MOE-Mix-of-Experts-Model-Activation-of-Experts
407
+
408
+ <B>Settings: CHAT / ROLEPLAY and/or SMOOTHER operation of this model:</B>
409
+
410
+ In "KoboldCpp" or "oobabooga/text-generation-webui" or "Silly Tavern" ;
411
+
412
+ Set the "Smoothing_factor" to 1.5
413
+
414
+ : in KoboldCpp -> Settings->Samplers->Advanced-> "Smooth_F"
415
+
416
+ : in text-generation-webui -> parameters -> lower right.
417
+
418
+ : In Silly Tavern this is called: "Smoothing"
419
+
420
+
421
+ NOTE: For "text-generation-webui"
422
+
423
+ -> if using GGUFs you need to use "llama_HF" (which involves downloading some config files from the SOURCE version of this model)
424
+
425
+ Source versions (and config files) of my models are here:
426
+
427
+ https://huggingface.co/collections/DavidAU/d-au-source-files-for-gguf-exl2-awq-gptq-hqq-etc-etc-66b55cb8ba25f914cbf210be
428
+
429
+ OTHER OPTIONS:
430
+
431
+ - Increase rep pen to 1.1 to 1.15 (you don't need to do this if you use "smoothing_factor")
432
+
433
+ - If the interface/program you are using to run AI MODELS supports "Quadratic Sampling" ("smoothing") just make the adjustment as noted.
434
+
435
+ <B>Highest Quality Settings / Optimal Operation Guide / Parameters and Samplers</B>
436
+
437
+ This a "Class 1" model:
438
+
439
+ For all settings used for this model (including specifics for its "class"), including example generation(s) and for advanced settings guide (which many times addresses any model issue(s)), including methods to improve model performance for all use case(s) as well as chat, roleplay and other use case(s) please see:
440
+
441
+ [ https://huggingface.co/DavidAU/Maximizing-Model-Performance-All-Quants-Types-And-Full-Precision-by-Samplers_Parameters ]
442
+
443
+ You can see all parameters used for generation, in addition to advanced parameters and samplers to get the most out of this model here:
444
+
445
+ [ https://huggingface.co/DavidAU/Maximizing-Model-Performance-All-Quants-Types-And-Full-Precision-by-Samplers_Parameters ]
446
+
447
+ ---
448
+
449
+ <H2>What is Brainstorm?</H2>
450
+
451
+ ---
452
+
453
+ <B>Brainstorm 20x</B>
454
+
455
+ The BRAINSTORM process was developed by David_AU.
456
+
457
+ Some of the core principals behind this process are discussed in this <a href="https://arxiv.org/pdf/2401.02415">
458
+ scientific paper : Progressive LLaMA with Block Expansion </a>.
459
+
460
+ However I went in a completely different direction from what was outlined in this paper.
461
+
462
+ What is "Brainstorm" ?
463
+
464
+ The reasoning center of an LLM is taken apart, reassembled, and expanded.
465
+
466
+ In this case for this model: 20 times
467
+
468
+ Then these centers are individually calibrated. These "centers" also interact with each other.
469
+ This introduces subtle changes into the reasoning process.
470
+ The calibrations further adjust - dial up or down - these "changes" further.
471
+ The number of centers (5x,10x etc) allow more "tuning points" to further customize how the model reasons so to speak.
472
+
473
+ The core aim of this process is to increase the model's detail, concept and connection to the "world",
474
+ general concept connections, prose quality and prose length without affecting instruction following.
475
+
476
+ This will also enhance any creative use case(s) of any kind, including "brainstorming", creative art form(s) and like case uses.
477
+
478
+ Here are some of the enhancements this process brings to the model's performance:
479
+
480
+ - Prose generation seems more focused on the moment to moment.
481
+ - Sometimes there will be "preamble" and/or foreshadowing present.
482
+ - Fewer or no "cliches"
483
+ - Better overall prose and/or more complex / nuanced prose.
484
+ - A greater sense of nuance on all levels.
485
+ - Coherence is stronger.
486
+ - Description is more detailed, and connected closer to the content.
487
+ - Simile and Metaphors are stronger and better connected to the prose, story, and character.
488
+ - Sense of "there" / in the moment is enhanced.
489
+ - Details are more vivid, and there are more of them.
490
+ - Prose generation length can be long to extreme.
491
+ - Emotional engagement is stronger.
492
+ - The model will take FEWER liberties vs a normal model: It will follow directives more closely but will "guess" less.
493
+ - The MORE instructions and/or details you provide the more strongly the model will respond.
494
+ - Depending on the model "voice" may be more "human" vs original model's "voice".
495
+
496
+ Other "lab" observations:
497
+
498
+ - This process does not, in my opinion, make the model 5x or 10x "smarter" - if only that was true!
499
+ - However, a change in "IQ" was not an issue / a priority, and was not tested or calibrated for so to speak.
500
+ - From lab testing it seems to ponder, and consider more carefully roughly speaking.
501
+ - You could say this process sharpens the model's focus on it's task(s) at a deeper level.
502
+
503
+ The process to modify the model occurs at the root level - source files level. The model can quanted as a GGUF, EXL2, AWQ etc etc.
504
+
505
+ ---
506
+
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,49 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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": 2048,
13
+ "initializer_range": 0.02,
14
+ "intermediate_size": 6144,
15
+ "max_position_embeddings": 262144,
16
+ "max_window_layers": 48,
17
+ "mlp_only_layers": [],
18
+ "model_type": "qwen3_moe",
19
+ "moe_intermediate_size": 768,
20
+ "norm_topk_prob": true,
21
+ "num_attention_heads": 32,
22
+ "num_experts": 128,
23
+ "num_experts_per_tok": 8,
24
+ "num_hidden_layers": 67,
25
+ "num_key_value_heads": 4,
26
+ "output_router_logits": false,
27
+ "rms_norm_eps": 1e-06,
28
+ "rope_scaling": null,
29
+ "rope_theta": 10000000,
30
+ "router_aux_loss_coef": 0.001,
31
+ "sliding_window": null,
32
+ "tie_word_embeddings": false,
33
+ "torch_dtype": "bfloat16",
34
+ "transformers_version": "4.55.0",
35
+ "use_cache": true,
36
+ "use_sliding_window": false,
37
+ "vocab_size": 151936,
38
+ "quantization_config": {
39
+ "quant_method": "exl3",
40
+ "version": "0.0.7",
41
+ "bits": 5.0,
42
+ "head_bits": 6,
43
+ "calibration": {
44
+ "rows": 100,
45
+ "cols": 2048
46
+ },
47
+ "out_scales": "auto"
48
+ }
49
+ }
model-00001-of-00004.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:18c60f9c5892ed81488502d03bd3930b44dabe880237ea0f055d9b91d7565cb2
3
+ size 8465356200
model-00002-of-00004.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1092c5222d0eb26bd007db336fe9c00f60bed1b3f613f102ba87940b3cde80a3
3
+ size 8235148992
model-00003-of-00004.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b3428820d0fac8b4e034a072b96f31fc1f416838b239b93b24f08729d0816399
3
+ size 8235148992
model-00004-of-00004.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0b89cff03e82d6bd636f108ef8021c091fff573624ec50f58cc19a7cee95d8ef
3
+ size 2194430176
model.safetensors.index.json ADDED
The diff for this file is too large to render. See raw diff
 
quantization_config.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e1194a0b42b0b8ee05f9e6c26cbfddad1bd795084f9b4ed299c469eeb82e7f8d
3
+ size 25725780
special_tokens_map.json ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "additional_special_tokens": [
3
+ "<|im_start|>",
4
+ "<|im_end|>",
5
+ "<|object_ref_start|>",
6
+ "<|object_ref_end|>",
7
+ "<|box_start|>",
8
+ "<|box_end|>",
9
+ "<|quad_start|>",
10
+ "<|quad_end|>",
11
+ "<|vision_start|>",
12
+ "<|vision_end|>",
13
+ "<|vision_pad|>",
14
+ "<|image_pad|>",
15
+ "<|video_pad|>"
16
+ ],
17
+ "eos_token": {
18
+ "content": "<|im_end|>",
19
+ "lstrip": false,
20
+ "normalized": false,
21
+ "rstrip": false,
22
+ "single_word": false
23
+ },
24
+ "pad_token": {
25
+ "content": "<|endoftext|>",
26
+ "lstrip": false,
27
+ "normalized": false,
28
+ "rstrip": false,
29
+ "single_word": false
30
+ }
31
+ }
tokenizer.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:aeb13307a71acd8fe81861d94ad54ab689df773318809eed3cbe794b4492dae4
3
+ size 11422654
tokenizer_config.json ADDED
@@ -0,0 +1,239 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "add_bos_token": false,
3
+ "add_prefix_space": false,
4
+ "added_tokens_decoder": {
5
+ "151643": {
6
+ "content": "<|endoftext|>",
7
+ "lstrip": false,
8
+ "normalized": false,
9
+ "rstrip": false,
10
+ "single_word": false,
11
+ "special": true
12
+ },
13
+ "151644": {
14
+ "content": "<|im_start|>",
15
+ "lstrip": false,
16
+ "normalized": false,
17
+ "rstrip": false,
18
+ "single_word": false,
19
+ "special": true
20
+ },
21
+ "151645": {
22
+ "content": "<|im_end|>",
23
+ "lstrip": false,
24
+ "normalized": false,
25
+ "rstrip": false,
26
+ "single_word": false,
27
+ "special": true
28
+ },
29
+ "151646": {
30
+ "content": "<|object_ref_start|>",
31
+ "lstrip": false,
32
+ "normalized": false,
33
+ "rstrip": false,
34
+ "single_word": false,
35
+ "special": true
36
+ },
37
+ "151647": {
38
+ "content": "<|object_ref_end|>",
39
+ "lstrip": false,
40
+ "normalized": false,
41
+ "rstrip": false,
42
+ "single_word": false,
43
+ "special": true
44
+ },
45
+ "151648": {
46
+ "content": "<|box_start|>",
47
+ "lstrip": false,
48
+ "normalized": false,
49
+ "rstrip": false,
50
+ "single_word": false,
51
+ "special": true
52
+ },
53
+ "151649": {
54
+ "content": "<|box_end|>",
55
+ "lstrip": false,
56
+ "normalized": false,
57
+ "rstrip": false,
58
+ "single_word": false,
59
+ "special": true
60
+ },
61
+ "151650": {
62
+ "content": "<|quad_start|>",
63
+ "lstrip": false,
64
+ "normalized": false,
65
+ "rstrip": false,
66
+ "single_word": false,
67
+ "special": true
68
+ },
69
+ "151651": {
70
+ "content": "<|quad_end|>",
71
+ "lstrip": false,
72
+ "normalized": false,
73
+ "rstrip": false,
74
+ "single_word": false,
75
+ "special": true
76
+ },
77
+ "151652": {
78
+ "content": "<|vision_start|>",
79
+ "lstrip": false,
80
+ "normalized": false,
81
+ "rstrip": false,
82
+ "single_word": false,
83
+ "special": true
84
+ },
85
+ "151653": {
86
+ "content": "<|vision_end|>",
87
+ "lstrip": false,
88
+ "normalized": false,
89
+ "rstrip": false,
90
+ "single_word": false,
91
+ "special": true
92
+ },
93
+ "151654": {
94
+ "content": "<|vision_pad|>",
95
+ "lstrip": false,
96
+ "normalized": false,
97
+ "rstrip": false,
98
+ "single_word": false,
99
+ "special": true
100
+ },
101
+ "151655": {
102
+ "content": "<|image_pad|>",
103
+ "lstrip": false,
104
+ "normalized": false,
105
+ "rstrip": false,
106
+ "single_word": false,
107
+ "special": true
108
+ },
109
+ "151656": {
110
+ "content": "<|video_pad|>",
111
+ "lstrip": false,
112
+ "normalized": false,
113
+ "rstrip": false,
114
+ "single_word": false,
115
+ "special": true
116
+ },
117
+ "151657": {
118
+ "content": "<tool_call>",
119
+ "lstrip": false,
120
+ "normalized": false,
121
+ "rstrip": false,
122
+ "single_word": false,
123
+ "special": false
124
+ },
125
+ "151658": {
126
+ "content": "</tool_call>",
127
+ "lstrip": false,
128
+ "normalized": false,
129
+ "rstrip": false,
130
+ "single_word": false,
131
+ "special": false
132
+ },
133
+ "151659": {
134
+ "content": "<|fim_prefix|>",
135
+ "lstrip": false,
136
+ "normalized": false,
137
+ "rstrip": false,
138
+ "single_word": false,
139
+ "special": false
140
+ },
141
+ "151660": {
142
+ "content": "<|fim_middle|>",
143
+ "lstrip": false,
144
+ "normalized": false,
145
+ "rstrip": false,
146
+ "single_word": false,
147
+ "special": false
148
+ },
149
+ "151661": {
150
+ "content": "<|fim_suffix|>",
151
+ "lstrip": false,
152
+ "normalized": false,
153
+ "rstrip": false,
154
+ "single_word": false,
155
+ "special": false
156
+ },
157
+ "151662": {
158
+ "content": "<|fim_pad|>",
159
+ "lstrip": false,
160
+ "normalized": false,
161
+ "rstrip": false,
162
+ "single_word": false,
163
+ "special": false
164
+ },
165
+ "151663": {
166
+ "content": "<|repo_name|>",
167
+ "lstrip": false,
168
+ "normalized": false,
169
+ "rstrip": false,
170
+ "single_word": false,
171
+ "special": false
172
+ },
173
+ "151664": {
174
+ "content": "<|file_sep|>",
175
+ "lstrip": false,
176
+ "normalized": false,
177
+ "rstrip": false,
178
+ "single_word": false,
179
+ "special": false
180
+ },
181
+ "151665": {
182
+ "content": "<tool_response>",
183
+ "lstrip": false,
184
+ "normalized": false,
185
+ "rstrip": false,
186
+ "single_word": false,
187
+ "special": false
188
+ },
189
+ "151666": {
190
+ "content": "</tool_response>",
191
+ "lstrip": false,
192
+ "normalized": false,
193
+ "rstrip": false,
194
+ "single_word": false,
195
+ "special": false
196
+ },
197
+ "151667": {
198
+ "content": "<think>",
199
+ "lstrip": false,
200
+ "normalized": false,
201
+ "rstrip": false,
202
+ "single_word": false,
203
+ "special": false
204
+ },
205
+ "151668": {
206
+ "content": "</think>",
207
+ "lstrip": false,
208
+ "normalized": false,
209
+ "rstrip": false,
210
+ "single_word": false,
211
+ "special": false
212
+ }
213
+ },
214
+ "additional_special_tokens": [
215
+ "<|im_start|>",
216
+ "<|im_end|>",
217
+ "<|object_ref_start|>",
218
+ "<|object_ref_end|>",
219
+ "<|box_start|>",
220
+ "<|box_end|>",
221
+ "<|quad_start|>",
222
+ "<|quad_end|>",
223
+ "<|vision_start|>",
224
+ "<|vision_end|>",
225
+ "<|vision_pad|>",
226
+ "<|image_pad|>",
227
+ "<|video_pad|>"
228
+ ],
229
+ "bos_token": null,
230
+ "clean_up_tokenization_spaces": false,
231
+ "eos_token": "<|im_end|>",
232
+ "errors": "replace",
233
+ "extra_special_tokens": {},
234
+ "model_max_length": 262144,
235
+ "pad_token": "<|endoftext|>",
236
+ "split_special_tokens": false,
237
+ "tokenizer_class": "Qwen2Tokenizer",
238
+ "unk_token": null
239
+ }