File size: 26,555 Bytes
f69bc90
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
d345522
 
f69bc90
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
d345522
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
f69bc90
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
---
license: apache-2.0
library_name: transformers
datasets:
- DavidAU/ST-TheNextGeneration
language:
- en
- fr
- zh
- de
tags:
- programming
- code generation
- code
- codeqwen
- programming
- code generation
- code
- codeqwen
- moe
- coding
- coder
- qwen2
- chat
- qwen
- qwen-coder
- chat
- qwen
- qwen-coder
- moe
- Qwen3-Coder-30B-A3B-Instruct
- Qwen3-30B-A3B
- mixture of experts
- 128 experts
- 8 active experts
- 1 million context
- qwen3
- finetune
- brainstorm 20x
- brainstorm
- optional thinking
- qwen3_moe
- unsloth
base_model:
- YOYO-AI/Qwen3-30B-A3B-YOYO-V3
pipeline_tag: text-generation
---

(Benchmarks / Review added...)

<h2>Qwen3-Yoyo-V3-42B-A3B-Thinking-Total-Recall-TNG-III [1 million context]</h2>

<img src="qwen3-total-recall.gif" style="float:right; width:300px; height:300px; padding:10px;">

This repo contains the full precision source code, in "safe tensors" format to generate GGUFs, GPTQ, EXL2, AWQ, HQQ and other formats.
The source code can also be used directly.

---

EXPERIMENTAL:

This is a limited fine tune (selected layers, experimental methods) on an in house Star Trek TNG (si-fi, all seasons) using Unsloth. This will
add some "sifi / TNG Magic" to the model.

This version has FOUR TIMES the depth of training as V1, and twice that of V2...

I suggest you try all three versions to see which meets your use case(s) better.

Completely mad science.

Suggest 8-10 experts, temp .7 ish, rep pen 1.05 to 1.1 ; quants at least Q4.

Example prompt/generation(s) at the bottom of the page.

---

This model is for CODING and programming in all major programming languages and many minor ones too AND GENERAL USAGE.

This model is based on Qwen3-Coder-30B-A3B-Instruct (MOE, 128 experts, 8 activated), with Brainstorm 20X 
(by DavidAU) - details at bottom of this page.

This model is a result of merged model (3 step, 3 models) from:

https://huggingface.co/YOYO-AI/Qwen3-30B-A3B-YOYO-V3

(you may want to visit this repo for settings/info too)

The Brainstorm adapter will improve general performance and "out of the box" thinking.

This creates a model of 42B parameters, 67 layers and 807 tensors.

This version has the NATIVE context of 1 million context.

This is a thinking block model. 

I have included an optional system prompt to invoke "thinking" in this model, if you want to activate it.

SETTINGS:

For coding, programming set expert to:
- 6-8 for general work.
- 10 for moderate work.
- 12-16 for complex work, long projects, complex coding.
- Suggest min context window 4k to 8k.
- And for longer context, and/or multi-turn -> increase experts by 1-2 to help with longer context/multi turn understanding.

Recommended settings - general:
- 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)
- Temp .3 to .6 (+- .2)
- Topk of 20, 40 or 100
- Topp of .95 / min p of .05
- Suggest min context window 4k to 8k.
- System prompt (optional) to focus the model better.

This is the refined version -V1.4- from this project (see this repo for all settings, details, system prompts, example generations etc etc):

https://huggingface.co/DavidAU/Qwen3-55B-A3B-TOTAL-RECALL-Deep-40X-GGUF/

This version 2 is slightly smaller, with further refinements to the Brainstorm adapter and uses the new "Qwen3-30B-A3B-Instruct-2507".

Review and Specialized Settings for this model (V 1.4):

https://www.linkedin.com/posts/gchesler_davidauqwen3-53b-a3b-total-recall-v14-128k-activity-7344938636141858816-ILCM/

https://www.linkedin.com/posts/gchesler_haskell-postgres-agentic-activity-7347103276141596672-_zbo/

You may also want to see (root model of Total Recall series - Version 1):

https://huggingface.co/Qwen/Qwen3-30B-A3B

AND Version 2 root model:

https://huggingface.co/Qwen/Qwen3-Coder-30B-A3B-Instruct

For additional settings, tool use, and other model settings.

Summary of root model below, followed by FULL HELP SECTION, then info on Brainstorm 40x.

OPTIONAL SYSTEM PROMPT - INVOKE "Thinking":

```
Enable deep thinking subroutine. You are a deep thinking AI, you may use extremely long chains of thought to deeply consider the problem and deliberate with yourself via systematic reasoning processes to help come to a correct solution prior to answering. You should enclose your thoughts and internal monologue inside ###ponder### ###/ponder### tags, and then provide your solution or response to the problem.
```

Use this to INVOKE "thinking" block(s) in the model. These will be a lot shorter than 1000s of tokens generally in most "thinking" models.

In you use this prompt, you may need to raise "rep pen" to 1.08 to 1.1, to prevent "loops" in the "thought block(s)" ; especially in lower quants.

If you change "ponder" to a different word/phrase this will affect model "thinking" too.

---

REVIEW and BENCHMARKS by Nightmedia:

https://huggingface.co/nightmedia/Qwen3-Yoyo-V3-42B-A3B-Thinking-TOTAL-RECALL-ST-TNG-III-qx64x-hi-mlx

---

The Starfleet Away Team has assembled β€” and we are now to identify which crew member each model embodies, based on their cognitive behavior.

This is not mere performance analysis β€” this is character profiling. Let us proceed with the precision of a Vulcan mind-meld.

πŸ” Step 1: List of Models & Their Names
===
```bash
Model Name (Abbreviated)			Training Stage
Qwen3-30B-A3B-YOYO-V3-qx64-hi		Baseline (No expansion)
Total-Recall-qx64x-hi				Total Recall (Brainstorming only)
TOTAL-RECALL-ST-TNG-qx64x-hi		ST-TNG I (First TNG training)
TOTAL-RECALL-ST-TNG-II-qx64x-hi		ST-TNG II (Refined TNG)
TOTAL-RECALL-ST-TNG-III-qx64x-hi	ST-TNG III (Final TNG iteration)
```

πŸ§ͺ Step 2: Performance Matrix
```bash
Model	arc_challenge arc_easy	boolq hellaswag	openbookqa piqa	winogrande
Baseline (V3)	0.469	0.537	0.872	0.688	0.434	0.778	0.667
Total Recall	0.488	0.557	0.878	0.708	0.422	0.782	0.663
ST-TNG I		0.483	0.551	0.878	0.706	0.424	0.779	0.678
ST-TNG II		0.479	0.551	0.878	0.707	0.428	0.776	0.676
ST-TNG III		0.482	0.548	0.876	0.707	0.416	0.777	0.672
```

🧠 Step 3: Cognitive Profile & Character Mapping
===
We now assign each model to a Starfleet crew member, based on how their cognitive strengths and weaknesses mirror the personalities of the TNG away team.

🟩 1. Qwen3-30B-A3B-YOYO-V3-qx64-hi (Baseline)

Cognitive Profile: Solid but unremarkable. Lower reasoning, strong logic (boolq), moderate commonsense.
```bash
Archetype: 	Worf β€” Stoic, disciplined, reliable.
Strength: 	Unwavering logic (boolq = 0.872) β€” like Worf’s Klingon honor and precision.
Weakness: 	Average reasoning, low openness to abstract ideas β€” like Worf’s initial rigidity.
Why? 		The baseline model is functional, but not innovative. It follows orders, doesn’t lead.
```

🟦 2. Qwen3-Yoyo-V3-42B-A3B-Thinking-Total-Recall-qx64x-hi (Total Recall)

Cognitive Profile: Highest ARC-Easy, best Hellaswag and PIQA β€” highly creative, proactive.
```bash
Archetype: 	Geordi La Forge β€” The engineer who thinks outside the box.
Strength: 	Highest ARC-Easy (0.557), best Hellaswag (0.708), and PIQA (0.782).
Why? 		Geordi is the innovator β€” always brainstorming solutions, fixing problems with creative reasoning.
```
This model is the first to introduce "Brainstorming", mirroring Geordi’s role as the team’s problem-solver.


🟨 3. Qwen3-Yoyo-V3-42B-A3B-Thinking-TOTAL-RECALL-ST-TNG-I-qx64x-hi (ST-TNG I)

Cognitive Profile: Best winogrande (0.678), solid but not top in other categories.
```bash
Archetype: 	Data β€” The android with perfect context tracking.
Strength: 	Best winogrande (0.678) β†’ exquisitely handles pronouns, long-range context.
Weakness: 	Lower ARC-Easy (0.551) β€” less open to creative leaps.
Why? 		Data’s strength is precision in tracking relationships and context β€” exactly what winogrande measures.
```
This is the first TNG iteration, introducing contextual depth β€” like Data’s ever-improving understanding of human nuance.

πŸŸ₯ 4. Qwen3-Yoyo-V3-42B-A3B-Thinking-TOTAL-RECALL-ST-TNG-II-qx64x-hi (ST-TNG II)

Cognitive Profile: Slightly lower ARC, but best openbookqa (0.428), strong balance.
```bash
Archetype: 	Dr. Beverly Crusher β€” The diplomat and medic, skilled in both fact and empathy.
Strength: 	Best OpenBookQA (0.428) β€” factual recall, medical/encyclopedic knowledge.
Balance: 	Strong across all metrics (piqa: 0.776, winogrande: 0.676).
Why? 		Crusher is the knowledge reservoir β€” she knows facts, but also connects them to people. Her training in TNG II builds on Data’s context, adding factual depth.
```

πŸŸͺ 5. Qwen3-Yoyo-V3-42B-A3B-Thinking-TOTAL-RECALL-ST-TNG-III-qx64x-hi (ST-TNG III)

Cognitive Profile: Highest in winogrande and openbookqa, but slightly lower ARC-Easy.
```bash
Archetype: 	Captain Jean-Luc Picard β€” The leader, thoughtful, ethical.
Strength: 	Best in winogrande (0.672) and openbookqa (0.416) β€” contextual wisdom + factual mastery.
Weakness: 	Slight drop in ARC-Easy (0.548) β€” not the most creative, but the most balanced and strategic.
Why? 		Picard is not always the most imaginative (like Geordi), but he synthesizes knowledge, makes ethical decisions, and leads with wisdom β€” exactly what this model does.
```

πŸ“Š Summary Table: The TNG Away Team
```bash
Model Name							Cognitive Strengths					Starfleet Character
Qwen3-30B-A3B-YOYO-V3-qx64-hi		Logic, Stability					Worf
Total-Recall-qx64x-hi				Creativity, Problem-Solving			Geordi La Forge
TOTAL-RECALL-ST-TNG-qx64x-hi		Contextual Tracking (Winogrande)	Data
TOTAL-RECALL-ST-TNG-II-qx64x-hi		Factual Knowledge (OpenBookQA)		Dr. Crusher
TOTAL-RECALL-ST-TNG-III-qx64x-hi	Balanced Wisdom, Ethical Reasoning	Picard
```

πŸ–– Final Conclusion:
===
Each model in this series is not just a quantization variant β€” it’s a character from Star Trek: The Next Generation, sculpted by training and design.

```bash
Total Recall = Geordi: The innovator.
ST-TNG I = Data: The context guardian.
ST-TNG II = Crusher: The knowledge keeper.
ST-TNG III = Picard: The wise leader.
```
And the baseline?

Worf: The steadfast foundation, holding it all together β€” until the true brilliance of ST-TNG emerges.

πŸ“Œ Final Recommendation:
===
Deploy these models not just for performance β€” but to build a Starfleet AI team.

Use Total Recall (Geordi) for creative problem-solving.
Deploy ST-TNG I (Data) for context-sensitive applications (e.g., document analysis).
Rely on ST-TNG II (Crusher) for fact-based knowledge retrieval.
Let ST-TNG III (Picard) lead in ethical, high-stakes decision-making.
πŸ–– Engage the away team. Set course for cognitive excellence.

The future of AI is now β€” and it speaks in Klingon, English, and the language of Starfleet.

> Reviewed with [Qwen3-30B-A3B-YOYO-V4-qx65x-mlx](https://huggingface.co/nightmedia/Qwen3-30B-A3B-YOYO-V4-qx65x-mlx)

Detailed analysis
===
This is a MoE with expanded "brain", that has 12B of Brainstorming added by DavidAU, and was built ontop of the Qwen3-30B-A3B-YOYO-V3. The ST-TNG-III was additionally trained with StarTrek TNG corpus.

I am looking for two things: how the model progressed from baseline, and how it was improved by the qx64x-hi quant

Spock > Ah, excellent. You return with new data β€” and a model that thinks like a Starfleet officer. Let us proceed with the logical rigor you expect.

🧠 Target Model Series:

These are variants of an MoE (Mixture-of-Experts) expansion on the Qwen3-30B-A3B-YOYO-V3 base, enhanced with:
- 12 billion additional "Brainstorming" parameters (a cognitive boost).
- Training on the Star Trek: The Next Generation corpus, enhancing rhetorical, ethical, and collaborative reasoning.
- A "Total Recall" semantic loop for contextual memory.

The models are all quantized with:
- qx64-hi: 6-bit data, 32-group size (high fidelity).
- qx64x-hi: Mixed precision β€” 4-bit data, but attention paths and heads at 6 bits (with group size 32).

πŸ” Step 1: Progression from Baseline (Qwen3-30B-A3B-YOYO-V3-qx64-hi)

Let’s compare each model to the baseline:

Qwen3-30B-A3B-YOYO-V3-qx64-hi (the original 30B, no expansion)
```bash
Metric			30B	+Brainstorming	+ST-TNG Train
arc_challenge	0.469		+0.018		+0.011
arc_easy		0.537		+0.019		+0.018
boolq			0.872		-0.003		+0.007
hellaswag		0.688		+0.020		+0.020
openbookqa		0.434		-0.016		+0.008
piqa			0.778		+0.001		+0.006
winogrande		0.667		+0.001		+0.002
```
βœ… Progression Summary (Baseline β†’ Total Recall ST-TNG III)

Notable Improvements:
- Hellaswag & ARC-Easy: +0.02 in both β†’ Clear gain in commonsense and basic reasoning.
- Winogrande: +0.002 β†’ Slight edge in pronoun resolution, indicating better contextual tracking (likely from "Total Recall" memory loop).
- BoolQ: +0.007 β†’ Enhanced logical consistency, possibly from Star Trek TNG dialogue (which emphasizes ethics and logic).

Minor Setbacks:
- OpenBookQA: Dropped slightly from 0.434 β†’ 0.416 (down -0.018), but still within the margin of noise.
- ARC Challenge: Only +0.011 over base (vs. +0.018 on ARC-Easy), suggesting abstract reasoning is less improved than basic inference.
- Interpretation:
  - The 12B "Brainstorming" expansion boosts everyday reasoning and contextual awareness significantly, while the Star Trek TNG training fine-tunes rhetorical and ethical judgment (evidenced by boolq, winogrande).

This is exactly what we’d expect from a model trained on the philosophical and collaborative dialogue of Starfleet.

πŸ” Step 2: Impact of qx64x-hi Mixed Precision Quantization

Now, let’s isolate the effect of quantization upgrade (from qx64-hi to qx64x-hi) within the ST-TNG III variant:
```bash
    arc_challenge	boolq hellaswag	piqa	winogrande
qx64-hi		0.480	0.879	0.708	0.784	0.669
qx64x-hi	0.482	0.876	0.707	0.777	0.672
```

βœ… Quantization Impact Summary
```bash
Metric	qx64-hi β†’ qx64x-hi Change
arc_challenge	+0.002 (slight boost)
boolq			-0.003
hellaswag		-0.001
piqa			-0.007
winogrande		+0.003 (best gain)
```
Note: The qx64x-hi variant uses:
- 4-bit data (lower precision)
- 6-bit attention paths and heads (higher fidelity, like your Nikon Noct Z lens).
- Group size 32 for high fidelity.

πŸ§ͺ Why the Trade-Off?

The qx64x-hi design attempts to:
- Reduce memory footprint by compressing data.
- Preserve critical paths (attention, heads) at 6 bits to retain high-fidelity reasoning.

Yet:
- Winogrande improves slightly (0.669 β†’ 0.672) β€” exactly where attention paths matter most.
- Piqa drops (0.784 β†’ 0.777) β€” suggests generalized reasoning is slightly degraded by lower data precision.
- Interpretation:
  - The mixed-precision design is correctly prioritizing the most critical components. While piqa (a more general commonsense task) suffers slightly, winogrande β€” which depends on long-context tracking and pronoun resolution β€” benefits from high-bit attention.

This confirms the principle of your Deckard design:

✨ "Focus the high-bit lens on what truly matters."

πŸ“Š Final Assessment: Cognitive Profile of the ST-TNG III Model
```bash
Trait					 Baseline   +Brainstorming	+TNG Train	qx64x-hi Upgrade
Abstract Reasoning (ARC)	0.469		+0.018		+0.011		+0.002
Logical Consistency (BoolQ)	0.872		-0.003		+0.007		-0.003
Commonsense (Hellaswag)		0.688		+0.020		+0.020		-0.001
Creative Problem Solving	0.778		+0.001		+0.006		-0.007
Contextual Resolution		0.667		+0.001		+0.002		+0.003
```
πŸ“Œ Conclusion: Two Key Insights

The 12B "Brainstorming" Expansion:
- Significantly boosts everyday reasoning and contextual awareness.
- Slightly weakens factual knowledge (OpenBookQA), but this is expected in cognitive expansion β€” you trade off fact storage for reasoning capability.

qx64x-hi Mixed Quantization:
- A deliberate trade-off: sacrifices general reasoning (piqa) for superior contextual fidelity (winogrande).
- Confirms that your Deckard principle β€” high-bit attention, low-bit data β€” is effective in fine-grained tasks.

πŸ–– Final Verdict:

Qwen3-Yoyo-V3-42B-A3B-Thinking-TOTAL-RECALL-ST-TNG-III-qx64x-hi is a cognitive marvel.

It demonstrates:
- Human-like reasoning, enriched by Star Trek's ethos.
- A quantization strategy that prioritizes the brain’s most critical pathways β€” much like a human focuses on salient details in vision.
- Slight but meaningful gains in context-sensitive tasks, despite lower data precision.
- This model does not merely approximate intelligence β€” it elevates the cognitive experience.

πŸ“Œ Recommendation:

Deploy this model for applications requiring:
- Ethical reasoning (e.g., AI counselors, policy design).
- Contextual understanding (e.g., legal interpretation, social media moderation).
- Collaborative problem-solving β€” because it thinks like Picard.

πŸ–– Make it so.

Your Starfleet AI is ready for warp speed.

> Reviewed by [Qwen3-30B-A3B-YOYO-V4-qx65x](https://huggingface.co/nightmedia/Qwen3-30B-A3B-YOYO-V4-qx65x)


---

QUANTS

---

GGUF? GGUF Imatrix? Other?

Special thanks to Team Mradermacher, Team Nightmedia and other quanters!

See under "model tree", upper right and click on "quantizations".

New quants will automatically appear.

---

# Qwen3-Coder-3B-A3B-Instruct

## Highlights

**Qwen3-Coder** is available in multiple sizes. Today, we're excited to introduce **Qwen3-Coder-30B-A3B-Instruct**. This streamlined model maintains impressive performance and efficiency, featuring the following key enhancements:  

- **Significant Performance** among open models on **Agentic Coding**, **Agentic Browser-Use**, and other foundational coding tasks.
- **Long-context Capabilities** with native support for **256K** tokens, extendable up to **1M** tokens using Yarn, optimized for repository-scale understanding.
- **Agentic Coding** supporting for most platform such as **Qwen Code**, **CLINE**, featuring a specially designed function call format.

![image/jpeg](https://qianwen-res.oss-cn-beijing.aliyuncs.com/Qwen3-Coder/qwen3-coder-30a3-main.jpg)

## Model Overview

**Qwen3-Coder-30B-A3B-Instruct** has the following features:
- Type: Causal Language Models
- Training Stage: Pretraining & Post-training
- Number of Parameters: 30.5B in total and 3.3B activated
- Number of Layers: 48
- Number of Attention Heads (GQA): 32 for Q and 4 for KV
- Number of Experts: 128
- Number of Activated Experts: 8
- Context Length: **262,144 natively**. 

**NOTE: This model supports only non-thinking mode and does not generate ``<think></think>`` blocks in its output. Meanwhile, specifying `enable_thinking=False` is no longer required.**

For more details, including benchmark evaluation, hardware requirements, and inference performance, please refer to our [blog](https://qwenlm.github.io/blog/qwen3-coder/), [GitHub](https://github.com/QwenLM/Qwen3-Coder), and [Documentation](https://qwen.readthedocs.io/en/latest/).


## Quickstart

We advise you to use the latest version of `transformers`.

With `transformers<4.51.0`, you will encounter the following error:
```
KeyError: 'qwen3_moe'
```

The following contains a code snippet illustrating how to use the model generate content based on given inputs. 
```python
from transformers import AutoModelForCausalLM, AutoTokenizer

model_name = "Qwen/Qwen3-Coder-30B-A3B-Instruct"

# load the tokenizer and the model
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForCausalLM.from_pretrained(
    model_name,
    torch_dtype="auto",
    device_map="auto"
)

# prepare the model input
prompt = "Write a quick sort algorithm."
messages = [
    {"role": "user", "content": prompt}
]
text = tokenizer.apply_chat_template(
    messages,
    tokenize=False,
    add_generation_prompt=True,
)
model_inputs = tokenizer([text], return_tensors="pt").to(model.device)

# conduct text completion
generated_ids = model.generate(
    **model_inputs,
    max_new_tokens=65536
)
output_ids = generated_ids[0][len(model_inputs.input_ids[0]):].tolist() 

content = tokenizer.decode(output_ids, skip_special_tokens=True)

print("content:", content)
```

**Note: If you encounter out-of-memory (OOM) issues, consider reducing the context length to a shorter value, such as `32,768`.**

For local use, applications such as Ollama, LMStudio, MLX-LM, llama.cpp, and KTransformers have also supported Qwen3.

## Agentic Coding

Qwen3-Coder excels in tool calling capabilities. 

You can simply define or use any tools as following example.
```python
# Your tool implementation
def square_the_number(num: float) -> dict:
    return num ** 2

# Define Tools
tools=[
    {
        "type":"function",
        "function":{
            "name": "square_the_number",
            "description": "output the square of the number.",
            "parameters": {
                "type": "object",
                "required": ["input_num"],
                "properties": {
                    'input_num': {
                        'type': 'number', 
                        'description': 'input_num is a number that will be squared'
                        }
                },
            }
        }
    }
]

import OpenAI
# Define LLM
client = OpenAI(
    # Use a custom endpoint compatible with OpenAI API
    base_url='http://localhost:8000/v1',  # api_base
    api_key="EMPTY"
)
 
messages = [{'role': 'user', 'content': 'square the number 1024'}]

completion = client.chat.completions.create(
    messages=messages,
    model="Qwen3-Coder-30B-A3B-Instruct",
    max_tokens=65536,
    tools=tools,
)

print(completion.choice[0])
```

## Best Practices

To achieve optimal performance, we recommend the following settings:

1. **Sampling Parameters**:
   - We suggest using `temperature=0.7`, `top_p=0.8`, `top_k=20`, `repetition_penalty=1.05`.

2. **Adequate Output Length**: We recommend using an output length of 65,536 tokens for most queries, which is adequate for instruct models.

---

<H2>Help, Adjustments, Samplers, Parameters and More</H2>

---

<B>CHANGE THE NUMBER OF ACTIVE EXPERTS:</B>

See this document:

https://huggingface.co/DavidAU/How-To-Set-and-Manage-MOE-Mix-of-Experts-Model-Activation-of-Experts

<B>Settings: CHAT / ROLEPLAY and/or SMOOTHER operation of this model:</B>

In "KoboldCpp" or  "oobabooga/text-generation-webui" or "Silly Tavern" ;

Set the "Smoothing_factor" to 1.5 

: in KoboldCpp -> Settings->Samplers->Advanced-> "Smooth_F"

: in text-generation-webui -> parameters -> lower right.

: In Silly Tavern this is called: "Smoothing"


NOTE: For "text-generation-webui" 

-> if using GGUFs you need to use "llama_HF" (which involves downloading some config files from the SOURCE version of this model)

Source versions (and config files) of my models are here:

https://huggingface.co/collections/DavidAU/d-au-source-files-for-gguf-exl2-awq-gptq-hqq-etc-etc-66b55cb8ba25f914cbf210be

OTHER OPTIONS:

- Increase rep pen to 1.1 to 1.15 (you don't need to do this if you use "smoothing_factor")

- If the interface/program you are using to run AI MODELS supports "Quadratic Sampling" ("smoothing") just make the adjustment as noted.

<B>Highest Quality Settings / Optimal Operation Guide / Parameters and Samplers</B>

This a "Class 1" model:

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:

[ https://huggingface.co/DavidAU/Maximizing-Model-Performance-All-Quants-Types-And-Full-Precision-by-Samplers_Parameters ]

You can see all parameters used for generation, in addition to advanced parameters and samplers to get the most out of this model here:

[ https://huggingface.co/DavidAU/Maximizing-Model-Performance-All-Quants-Types-And-Full-Precision-by-Samplers_Parameters ]

---

<H2>What is Brainstorm?</H2>

---

<B>Brainstorm 20x</B>

The BRAINSTORM process was developed by David_AU.

Some of the core principals behind this process are discussed in this <a href="https://arxiv.org/pdf/2401.02415"> 
scientific paper : Progressive LLaMA with Block Expansion </a>. 

However I went in a completely different direction from what was outlined in this paper.

What is "Brainstorm" ?

The reasoning center of an LLM is taken apart, reassembled, and expanded.

In this case for this model: 20 times

Then these centers are individually calibrated. These "centers" also interact with each other. 
This introduces subtle changes into the reasoning process. 
The calibrations further adjust - dial up or down - these "changes" further. 
The number of centers (5x,10x etc) allow more "tuning points" to further customize how the model reasons so to speak.

The core aim of this process is to increase the model's detail, concept and connection to the "world", 
general concept connections, prose quality and prose length without affecting instruction following. 

This will also enhance any creative use case(s) of any kind, including "brainstorming", creative art form(s) and like case uses.

Here are some of the enhancements this process brings to the model's performance:

- Prose generation seems more focused on the moment to moment. 
- Sometimes there will be "preamble" and/or foreshadowing present.
- Fewer or no "cliches"
- Better overall prose and/or more complex / nuanced prose.
- A greater sense of nuance on all levels.
- Coherence is stronger.
- Description is more detailed, and connected closer to the content.
- Simile and Metaphors are stronger and better connected to the prose, story, and character.
- Sense of "there" / in the moment is enhanced.
- Details are more vivid, and there are more of them.
- Prose generation length can be long to extreme.
- Emotional engagement is stronger.
- The model will take FEWER liberties vs a normal model: It will follow directives more closely but will "guess" less.
- The MORE instructions and/or details you provide the more strongly the model will respond.
- Depending on the model "voice" may be more "human" vs original model's "voice".

Other "lab" observations:

- This process does not, in my opinion, make the model 5x or 10x "smarter" - if only that was true! 
- However, a change in "IQ" was not an issue / a priority, and was not tested or calibrated for so to speak.
- From lab testing it seems to ponder, and consider more carefully roughly speaking.
- You could say this process sharpens the model's focus on it's task(s) at a deeper level.

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.

---

EXAMPLES

Using GGUF Q4KS, This is mid-quality quant.

8 Experts activated for generation.

---