Mungert commited on
Commit
f1b55ab
·
verified ·
0 Parent(s):

Super-squash history to reclaim storage

Browse files
.gitattributes ADDED
@@ -0,0 +1,81 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ *.7z filter=lfs diff=lfs merge=lfs -text
2
+ *.arrow filter=lfs diff=lfs merge=lfs -text
3
+ *.bin filter=lfs diff=lfs merge=lfs -text
4
+ *.bz2 filter=lfs diff=lfs merge=lfs -text
5
+ *.ckpt filter=lfs diff=lfs merge=lfs -text
6
+ *.ftz filter=lfs diff=lfs merge=lfs -text
7
+ *.gz filter=lfs diff=lfs merge=lfs -text
8
+ *.h5 filter=lfs diff=lfs merge=lfs -text
9
+ *.joblib filter=lfs diff=lfs merge=lfs -text
10
+ *.lfs.* filter=lfs diff=lfs merge=lfs -text
11
+ *.mlmodel filter=lfs diff=lfs merge=lfs -text
12
+ *.model filter=lfs diff=lfs merge=lfs -text
13
+ *.msgpack filter=lfs diff=lfs merge=lfs -text
14
+ *.npy filter=lfs diff=lfs merge=lfs -text
15
+ *.npz filter=lfs diff=lfs merge=lfs -text
16
+ *.onnx filter=lfs diff=lfs merge=lfs -text
17
+ *.ot filter=lfs diff=lfs merge=lfs -text
18
+ *.parquet filter=lfs diff=lfs merge=lfs -text
19
+ *.pb filter=lfs diff=lfs merge=lfs -text
20
+ *.pickle filter=lfs diff=lfs merge=lfs -text
21
+ *.pkl filter=lfs diff=lfs merge=lfs -text
22
+ *.pt filter=lfs diff=lfs merge=lfs -text
23
+ *.pth filter=lfs diff=lfs merge=lfs -text
24
+ *.rar filter=lfs diff=lfs merge=lfs -text
25
+ *.safetensors filter=lfs diff=lfs merge=lfs -text
26
+ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
27
+ *.tar.* filter=lfs diff=lfs merge=lfs -text
28
+ *.tar filter=lfs diff=lfs merge=lfs -text
29
+ *.tflite filter=lfs diff=lfs merge=lfs -text
30
+ *.tgz filter=lfs diff=lfs merge=lfs -text
31
+ *.wasm filter=lfs diff=lfs merge=lfs -text
32
+ *.xz 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
+ f16/Qwen3-30B-A3B-f16-00001-of-00002.gguf filter=lfs diff=lfs merge=lfs -text
37
+ f16/Qwen3-30B-A3B-f16-00002-of-00002.gguf filter=lfs diff=lfs merge=lfs -text
38
+ Qwen3-30B-A3B-f16_q8_0.gguf filter=lfs diff=lfs merge=lfs -text
39
+ Qwen3-30B-A3B-bf16_q8_0.gguf filter=lfs diff=lfs merge=lfs -text
40
+ Qwen3-30B-A3B-f16_q6_k.gguf filter=lfs diff=lfs merge=lfs -text
41
+ Qwen3-30B-A3B-bf16_q6_k.gguf filter=lfs diff=lfs merge=lfs -text
42
+ Qwen3-30B-A3B-f16_q4_k.gguf filter=lfs diff=lfs merge=lfs -text
43
+ Qwen3-30B-A3B-bf16_q4_k.gguf filter=lfs diff=lfs merge=lfs -text
44
+ Qwen3-30B-A3B-q2_k_l.gguf filter=lfs diff=lfs merge=lfs -text
45
+ Qwen3-30B-A3B-q3_k_l.gguf filter=lfs diff=lfs merge=lfs -text
46
+ Qwen3-30B-A3B-q4_k_l.gguf filter=lfs diff=lfs merge=lfs -text
47
+ Qwen3-30B-A3B-q5_k_l.gguf filter=lfs diff=lfs merge=lfs -text
48
+ Qwen3-30B-A3B-q6_k_l.gguf filter=lfs diff=lfs merge=lfs -text
49
+ Qwen3-30B-A3B-q2_k_m.gguf filter=lfs diff=lfs merge=lfs -text
50
+ Qwen3-30B-A3B-q2_k_s.gguf filter=lfs diff=lfs merge=lfs -text
51
+ Qwen3-30B-A3B-q3_k_m.gguf filter=lfs diff=lfs merge=lfs -text
52
+ Qwen3-30B-A3B-q3_k_s.gguf filter=lfs diff=lfs merge=lfs -text
53
+ Qwen3-30B-A3B-q4_k_m.gguf filter=lfs diff=lfs merge=lfs -text
54
+ Qwen3-30B-A3B-q4_k_s.gguf filter=lfs diff=lfs merge=lfs -text
55
+ Qwen3-30B-A3B-q5_k_m.gguf filter=lfs diff=lfs merge=lfs -text
56
+ Qwen3-30B-A3B-q5_k_s.gguf filter=lfs diff=lfs merge=lfs -text
57
+ Qwen3-30B-A3B-q6_k_m.gguf filter=lfs diff=lfs merge=lfs -text
58
+ Qwen3-30B-A3B-q8_0.gguf filter=lfs diff=lfs merge=lfs -text
59
+ Qwen3-30B-A3B-q4_0.gguf filter=lfs diff=lfs merge=lfs -text
60
+ Qwen3-30B-A3B-q4_1.gguf filter=lfs diff=lfs merge=lfs -text
61
+ Qwen3-30B-A3B-q4_0_l.gguf filter=lfs diff=lfs merge=lfs -text
62
+ Qwen3-30B-A3B-q4_1_l.gguf filter=lfs diff=lfs merge=lfs -text
63
+ Qwen3-30B-A3B-q5_0.gguf filter=lfs diff=lfs merge=lfs -text
64
+ Qwen3-30B-A3B-q5_1.gguf filter=lfs diff=lfs merge=lfs -text
65
+ Qwen3-30B-A3B-q5_0_l.gguf filter=lfs diff=lfs merge=lfs -text
66
+ Qwen3-30B-A3B-q5_1_l.gguf filter=lfs diff=lfs merge=lfs -text
67
+ Qwen3-30B-A3B-iq1_s.gguf filter=lfs diff=lfs merge=lfs -text
68
+ Qwen3-30B-A3B-iq1_m.gguf filter=lfs diff=lfs merge=lfs -text
69
+ Qwen3-30B-A3B-iq2_xs.gguf filter=lfs diff=lfs merge=lfs -text
70
+ Qwen3-30B-A3B-iq2_xxs.gguf filter=lfs diff=lfs merge=lfs -text
71
+ Qwen3-30B-A3B-iq2_s.gguf filter=lfs diff=lfs merge=lfs -text
72
+ Qwen3-30B-A3B-iq2_m.gguf filter=lfs diff=lfs merge=lfs -text
73
+ Qwen3-30B-A3B-iq3_xs.gguf filter=lfs diff=lfs merge=lfs -text
74
+ Qwen3-30B-A3B-iq3_xxs.gguf filter=lfs diff=lfs merge=lfs -text
75
+ Qwen3-30B-A3B-iq3_s.gguf filter=lfs diff=lfs merge=lfs -text
76
+ Qwen3-30B-A3B-iq3_m.gguf filter=lfs diff=lfs merge=lfs -text
77
+ Qwen3-30B-A3B-iq4_xs.gguf filter=lfs diff=lfs merge=lfs -text
78
+ Qwen3-30B-A3B-iq4_nl.gguf filter=lfs diff=lfs merge=lfs -text
79
+ Qwen3-30B-A3B.imatrix filter=lfs diff=lfs merge=lfs -text
80
+ bf16/Qwen3-30B-A3B-bf16-00001-of-00002.gguf filter=lfs diff=lfs merge=lfs -text
81
+ bf16/Qwen3-30B-A3B-bf16-00002-of-00002.gguf filter=lfs diff=lfs merge=lfs -text
Qwen3-30B-A3B-bf16_q8_0.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c7e20b441410b26fc2534203c5264de285d10d765aa7bc5b93425747e56fe984
3
+ size 33067366528
Qwen3-30B-A3B-f16_q8_0.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:43f3620a818d0ea7317bfba4893f811558e8149b9c84a7ab5c52e0cdc36004d8
3
+ size 33067366528
Qwen3-30B-A3B-iq1_m.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a4821deb842561c11aaf5a6646145142b15f5fb46eaf5f3df8862b21b58997d5
3
+ size 10601331104
Qwen3-30B-A3B-iq1_s.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d16d4c79f2ca7fc472e06de293b3ec4a5238fd974a3cc9ece9e21fbb2fb340f3
3
+ size 9319315872
Qwen3-30B-A3B-iq2_m.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2103cddd67f25b6ab67321d68c9dfc5601195575c307d77f4b523ee515dcff5e
3
+ size 13838809504
Qwen3-30B-A3B-iq2_s.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:cb1ddb3e43f08ff193eb920a71220845a010606bef20e0f1edc170446546d22a
3
+ size 13486487968
Qwen3-30B-A3B-iq2_xs.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f37cbe479c5e97798ad8dc2750fd2dd05b80709d4fe6e2c75c451c1253f12021
3
+ size 12174195104
Qwen3-30B-A3B-iq2_xxs.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:398b36d70b7b520d1e7665341405cc4d70bcba2ef549b90c9dffe2a3ddb1e993
3
+ size 10539858336
Qwen3-30B-A3B-iq3_m.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:92496a1bb533afc33c5fcb75f439891278c2acbe254cb0d3688386ea6111ae88
3
+ size 14328707488
Qwen3-30B-A3B-iq3_s.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:05c4c1d312c3f02063df50c7741d9639458c04760db8836be3d8b08803030ee4
3
+ size 13954365856
Qwen3-30B-A3B-iq3_xs.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5fd7c68975ddd9b82563614f60fc76d9b2fe74d7b081cf2425f7719e97c00dc4
3
+ size 12651887008
Qwen3-30B-A3B-iq3_xxs.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2a77c724895946d4434bd2d69105810e7364d14bb5cd9ace50884b4d06a6c32c
3
+ size 12255525280
Qwen3-30B-A3B-iq4_nl.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:53d73fd76b9af8ca6d34742c9087dbf8ace8f87f0f7fcbdf15787c6da6fdbf12
3
+ size 17405153696
Qwen3-30B-A3B-iq4_xs.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:134735c8632da86cfe1b0f14c70f22a31bd8028c09d2e56d4321e0519dd3518b
3
+ size 16476877216
Qwen3-30B-A3B-q2_k_m.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7b429f90604030bc237cca8afc7b1d500270c61e05c03b22f28df2a6c888894f
3
+ size 11821984160
Qwen3-30B-A3B-q2_k_s.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d6a169124ff5fc91dc2ece455b129d0636698be9cb5c1e2a474445756e9a83a8
3
+ size 11009522080
Qwen3-30B-A3B-q3_k_m.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6c0637097bc973438b781aee06bb6224bb5d5e474449fccebb6ec4dda77b2393
3
+ size 15327209888
Qwen3-30B-A3B-q3_k_s.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f058d2dfc3dfd8eeb2d9796755235c0fb4bb4ddc9a10b38124990f9f6d858c02
3
+ size 14228486560
Qwen3-30B-A3B-q4_0.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:65b7c2c9c7bace22e08716da99f9b77ea1d8ff3fe0c9532fb3e0809c21533510
3
+ size 17224268192
Qwen3-30B-A3B-q4_1.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c1f7229b97e6edc8595d0b752fe9e3697c14da2ae22240eb08a38cf6fb25b1af
3
+ size 19131726240
Qwen3-30B-A3B-q4_k_m.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7439dd1d10fd2f39a0fe4ee0e8d8c89d2572e387ee0af185bd69bc5e9262039a
3
+ size 18963081632
Qwen3-30B-A3B-q4_k_s.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:db0f9f20e3638ef5a723bb1aa0b9aca0ededb9378014cd2e5f7c05a3aa85481e
3
+ size 18261584288
Qwen3-30B-A3B-q5_0.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6e53774541e8c90353546aeebfcb47850d8d9dd041575149a8ef428350e1a98f
3
+ size 21039184288
Qwen3-30B-A3B-q5_1.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:159cdd64702e015576fd6c5126f254dbe9e3e4420c83d9605520dbfebc4519a9
3
+ size 22946642336
Qwen3-30B-A3B-q5_k_m.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:38775ae6f7c4dc039426017441dc3741ee5ccf134390934ab121d60477a358cf
3
+ size 22344690080
Qwen3-30B-A3B-q5_k_s.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b5dad7761e971e6ffbe5db3e7b99d37f62813fc06826697ede116b27262be495
3
+ size 21970348448
Qwen3-30B-A3B-q6_k_m.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ab502786a82db11a2d7f2b1b3633ccdcc723dbfb5bb7822b506a2182c7c1808c
3
+ size 25116912032
Qwen3-30B-A3B-q8_0.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e15f4a941ecdc88a26464a4763be14288cd6e952105f4d4793b5c80e2a265b37
3
+ size 32483932288
Qwen3-30B-A3B.imatrix ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6aa5b88637c7de2af523211572f9181e7e2e042806ff840070b531dee11e74d2
3
+ size 121910657
README.md ADDED
@@ -0,0 +1,610 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ library_name: transformers
3
+ license: apache-2.0
4
+ license_link: https://huggingface.co/Qwen/Qwen3-30B-A3B/blob/main/LICENSE
5
+ pipeline_tag: text-generation
6
+ base_model:
7
+ - Qwen/Qwen3-30B-A3B-Base
8
+ ---
9
+
10
+ # <span style="color: #7FFF7F;">Qwen3-30B-A3B GGUF Models</span>
11
+
12
+
13
+ ## <span style="color: #7F7FFF;">Model Generation Details</span>
14
+
15
+ This model was generated using [llama.cpp](https://github.com/ggerganov/llama.cpp) at commit [`064cc596`](https://github.com/ggerganov/llama.cpp/commit/064cc596ac44308dc326a17c9e3163c34a6f29d1).
16
+
17
+
18
+
19
+
20
+ ## <span style="color: #7FFF7F;">Ultra-Low-Bit Quantization with IQ-DynamicGate (1-2 bit)</span>
21
+
22
+ Our latest quantization method introduces **precision-adaptive quantization** for ultra-low-bit models (1-2 bit), with benchmark-proven improvements on **Llama-3-8B**. This approach uses layer-specific strategies to preserve accuracy while maintaining extreme memory efficiency.
23
+
24
+ ### **Benchmark Context**
25
+ All tests conducted on **Llama-3-8B-Instruct** using:
26
+ - Standard perplexity evaluation pipeline
27
+ - 2048-token context window
28
+ - Same prompt set across all quantizations
29
+
30
+ ### **Method**
31
+ - **Dynamic Precision Allocation**:
32
+ - First/Last 25% of layers → IQ4_XS (selected layers)
33
+ - Middle 50% → IQ2_XXS/IQ3_S (increase efficiency)
34
+ - **Critical Component Protection**:
35
+ - Embeddings/output layers use Q5_K
36
+ - Reduces error propagation by 38% vs standard 1-2bit
37
+
38
+ ### **Quantization Performance Comparison (Llama-3-8B)**
39
+
40
+ | Quantization | Standard PPL | DynamicGate PPL | Δ PPL | Std Size | DG Size | Δ Size | Std Speed | DG Speed |
41
+ |--------------|--------------|------------------|---------|----------|---------|--------|-----------|----------|
42
+ | IQ2_XXS | 11.30 | 9.84 | -12.9% | 2.5G | 2.6G | +0.1G | 234s | 246s |
43
+ | IQ2_XS | 11.72 | 11.63 | -0.8% | 2.7G | 2.8G | +0.1G | 242s | 246s |
44
+ | IQ2_S | 14.31 | 9.02 | -36.9% | 2.7G | 2.9G | +0.2G | 238s | 244s |
45
+ | IQ1_M | 27.46 | 15.41 | -43.9% | 2.2G | 2.5G | +0.3G | 206s | 212s |
46
+ | IQ1_S | 53.07 | 32.00 | -39.7% | 2.1G | 2.4G | +0.3G | 184s | 209s |
47
+
48
+ **Key**:
49
+ - PPL = Perplexity (lower is better)
50
+ - Δ PPL = Percentage change from standard to DynamicGate
51
+ - Speed = Inference time (CPU avx2, 2048 token context)
52
+ - Size differences reflect mixed quantization overhead
53
+
54
+ **Key Improvements:**
55
+ - 🔥 **IQ1_M** shows massive 43.9% perplexity reduction (27.46 → 15.41)
56
+ - 🚀 **IQ2_S** cuts perplexity by 36.9% while adding only 0.2GB
57
+ - ⚡ **IQ1_S** maintains 39.7% better accuracy despite 1-bit quantization
58
+
59
+ **Tradeoffs:**
60
+ - All variants have modest size increases (0.1-0.3GB)
61
+ - Inference speeds remain comparable (<5% difference)
62
+
63
+
64
+ ### **When to Use These Models**
65
+ 📌 **Fitting models into GPU VRAM**
66
+
67
+ ✔ **Memory-constrained deployments**
68
+
69
+ ✔ **Cpu and Edge Devices** where 1-2bit errors can be tolerated
70
+
71
+ ✔ **Research** into ultra-low-bit quantization
72
+
73
+
74
+
75
+ ## **Choosing the Right Model Format**
76
+
77
+ Selecting the correct model format depends on your **hardware capabilities** and **memory constraints**.
78
+
79
+ ### **BF16 (Brain Float 16) – Use if BF16 acceleration is available**
80
+ - A 16-bit floating-point format designed for **faster computation** while retaining good precision.
81
+ - Provides **similar dynamic range** as FP32 but with **lower memory usage**.
82
+ - Recommended if your hardware supports **BF16 acceleration** (check your device's specs).
83
+ - Ideal for **high-performance inference** with **reduced memory footprint** compared to FP32.
84
+
85
+ 📌 **Use BF16 if:**
86
+ ✔ Your hardware has native **BF16 support** (e.g., newer GPUs, TPUs).
87
+ ✔ You want **higher precision** while saving memory.
88
+ ✔ You plan to **requantize** the model into another format.
89
+
90
+ 📌 **Avoid BF16 if:**
91
+ ❌ Your hardware does **not** support BF16 (it may fall back to FP32 and run slower).
92
+ ❌ You need compatibility with older devices that lack BF16 optimization.
93
+
94
+ ---
95
+
96
+ ### **F16 (Float 16) – More widely supported than BF16**
97
+ - A 16-bit floating-point **high precision** but with less of range of values than BF16.
98
+ - Works on most devices with **FP16 acceleration support** (including many GPUs and some CPUs).
99
+ - Slightly lower numerical precision than BF16 but generally sufficient for inference.
100
+
101
+ 📌 **Use F16 if:**
102
+ ✔ Your hardware supports **FP16** but **not BF16**.
103
+ ✔ You need a **balance between speed, memory usage, and accuracy**.
104
+ ✔ You are running on a **GPU** or another device optimized for FP16 computations.
105
+
106
+ 📌 **Avoid F16 if:**
107
+ ❌ Your device lacks **native FP16 support** (it may run slower than expected).
108
+ ❌ You have memory limitations.
109
+
110
+ ---
111
+
112
+ ### **Quantized Models (Q4_K, Q6_K, Q8, etc.) – For CPU & Low-VRAM Inference**
113
+ Quantization reduces model size and memory usage while maintaining as much accuracy as possible.
114
+ - **Lower-bit models (Q4_K)** → **Best for minimal memory usage**, may have lower precision.
115
+ - **Higher-bit models (Q6_K, Q8_0)** → **Better accuracy**, requires more memory.
116
+
117
+ 📌 **Use Quantized Models if:**
118
+ ✔ You are running inference on a **CPU** and need an optimized model.
119
+ ✔ Your device has **low VRAM** and cannot load full-precision models.
120
+ ✔ You want to reduce **memory footprint** while keeping reasonable accuracy.
121
+
122
+ 📌 **Avoid Quantized Models if:**
123
+ ❌ You need **maximum accuracy** (full-precision models are better for this).
124
+ ❌ Your hardware has enough VRAM for higher-precision formats (BF16/F16).
125
+
126
+ ---
127
+
128
+ ### **Very Low-Bit Quantization (IQ3_XS, IQ3_S, IQ3_M, Q4_K, Q4_0)**
129
+ These models are optimized for **extreme memory efficiency**, making them ideal for **low-power devices** or **large-scale deployments** where memory is a critical constraint.
130
+
131
+ - **IQ3_XS**: Ultra-low-bit quantization (3-bit) with **extreme memory efficiency**.
132
+ - **Use case**: Best for **ultra-low-memory devices** where even Q4_K is too large.
133
+ - **Trade-off**: Lower accuracy compared to higher-bit quantizations.
134
+
135
+ - **IQ3_S**: Small block size for **maximum memory efficiency**.
136
+ - **Use case**: Best for **low-memory devices** where **IQ3_XS** is too aggressive.
137
+
138
+ - **IQ3_M**: Medium block size for better accuracy than **IQ3_S**.
139
+ - **Use case**: Suitable for **low-memory devices** where **IQ3_S** is too limiting.
140
+
141
+ - **Q4_K**: 4-bit quantization with **block-wise optimization** for better accuracy.
142
+ - **Use case**: Best for **low-memory devices** where **Q6_K** is too large.
143
+
144
+ - **Q4_0**: Pure 4-bit quantization, optimized for **ARM devices**.
145
+ - **Use case**: Best for **ARM-based devices** or **low-memory environments**.
146
+
147
+ ---
148
+
149
+ ### **Summary Table: Model Format Selection**
150
+
151
+ | Model Format | Precision | Memory Usage | Device Requirements | Best Use Case |
152
+ |--------------|------------|---------------|----------------------|---------------|
153
+ | **BF16** | Highest | High | BF16-supported GPU/CPUs | High-speed inference with reduced memory |
154
+ | **F16** | High | High | FP16-supported devices | GPU inference when BF16 isn't available |
155
+ | **Q4_K** | Medium Low | Low | CPU or Low-VRAM devices | Best for memory-constrained environments |
156
+ | **Q6_K** | Medium | Moderate | CPU with more memory | Better accuracy while still being quantized |
157
+ | **Q8_0** | High | Moderate | CPU or GPU with enough VRAM | Best accuracy among quantized models |
158
+ | **IQ3_XS** | Very Low | Very Low | Ultra-low-memory devices | Extreme memory efficiency and low accuracy |
159
+ | **Q4_0** | Low | Low | ARM or low-memory devices | llama.cpp can optimize for ARM devices |
160
+
161
+ ---
162
+
163
+ ## **Included Files & Details**
164
+
165
+ ### `Qwen3-30B-A3B-bf16.gguf`
166
+ - Model weights preserved in **BF16**.
167
+ - Use this if you want to **requantize** the model into a different format.
168
+ - Best if your device supports **BF16 acceleration**.
169
+
170
+ ### `Qwen3-30B-A3B-f16.gguf`
171
+ - Model weights stored in **F16**.
172
+ - Use if your device supports **FP16**, especially if BF16 is not available.
173
+
174
+ ### `Qwen3-30B-A3B-bf16-q8_0.gguf`
175
+ - **Output & embeddings** remain in **BF16**.
176
+ - All other layers quantized to **Q8_0**.
177
+ - Use if your device supports **BF16** and you want a quantized version.
178
+
179
+ ### `Qwen3-30B-A3B-f16-q8_0.gguf`
180
+ - **Output & embeddings** remain in **F16**.
181
+ - All other layers quantized to **Q8_0**.
182
+
183
+ ### `Qwen3-30B-A3B-q4_k.gguf`
184
+ - **Output & embeddings** quantized to **Q8_0**.
185
+ - All other layers quantized to **Q4_K**.
186
+ - Good for **CPU inference** with limited memory.
187
+
188
+ ### `Qwen3-30B-A3B-q4_k_s.gguf`
189
+ - Smallest **Q4_K** variant, using less memory at the cost of accuracy.
190
+ - Best for **very low-memory setups**.
191
+
192
+ ### `Qwen3-30B-A3B-q6_k.gguf`
193
+ - **Output & embeddings** quantized to **Q8_0**.
194
+ - All other layers quantized to **Q6_K** .
195
+
196
+ ### `Qwen3-30B-A3B-q8_0.gguf`
197
+ - Fully **Q8** quantized model for better accuracy.
198
+ - Requires **more memory** but offers higher precision.
199
+
200
+ ### `Qwen3-30B-A3B-iq3_xs.gguf`
201
+ - **IQ3_XS** quantization, optimized for **extreme memory efficiency**.
202
+ - Best for **ultra-low-memory devices**.
203
+
204
+ ### `Qwen3-30B-A3B-iq3_m.gguf`
205
+ - **IQ3_M** quantization, offering a **medium block size** for better accuracy.
206
+ - Suitable for **low-memory devices**.
207
+
208
+ ### `Qwen3-30B-A3B-q4_0.gguf`
209
+ - Pure **Q4_0** quantization, optimized for **ARM devices**.
210
+ - Best for **low-memory environments**.
211
+ - Prefer IQ4_NL for better accuracy.
212
+
213
+ # <span id="testllm" style="color: #7F7FFF;">🚀 If you find these models useful</span>
214
+ ❤ **Please click "Like" if you find this useful!**
215
+ Help me test my **AI-Powered Network Monitor Assistant** with **quantum-ready security checks**:
216
+ 👉 [Quantum Network Monitor](https://readyforquantum.com/dashboard/?assistant=open&utm_source=huggingface&utm_medium=referral&utm_campaign=huggingface_repo_readme)
217
+
218
+ 💬 **How to test**:
219
+ Choose an **AI assistant type**:
220
+ - `TurboLLM` (GPT-4o-mini)
221
+ - `HugLLM` (Hugginface Open-source)
222
+ - `TestLLM` (Experimental CPU-only)
223
+
224
+ ### **What I’m Testing**
225
+ I’m pushing the limits of **small open-source models for AI network monitoring**, specifically:
226
+ - **Function calling** against live network services
227
+ - **How small can a model go** while still handling:
228
+ - Automated **Nmap scans**
229
+ - **Quantum-readiness checks**
230
+ - **Network Monitoring tasks**
231
+
232
+ 🟡 **TestLLM** – Current experimental model (llama.cpp on 2 CPU threads):
233
+ - ✅ **Zero-configuration setup**
234
+ - ⏳ 30s load time (slow inference but **no API costs**)
235
+ - 🔧 **Help wanted!** If you’re into **edge-device AI**, let’s collaborate!
236
+
237
+ ### **Other Assistants**
238
+ 🟢 **TurboLLM** – Uses **gpt-4o-mini** for:
239
+ - **Create custom cmd processors to run .net code on Quantum Network Monitor Agents**
240
+ - **Real-time network diagnostics and monitoring**
241
+ - **Security Audits**
242
+ - **Penetration testing** (Nmap/Metasploit)
243
+
244
+
245
+ 🔵 **HugLLM** – Latest Open-source models:
246
+ - 🌐 Runs on Hugging Face Inference API
247
+
248
+ ### 💡 **Example commands to you could test**:
249
+ 1. `"Give me info on my websites SSL certificate"`
250
+ 2. `"Check if my server is using quantum safe encyption for communication"`
251
+ 3. `"Run a comprehensive security audit on my server"`
252
+ 4. '"Create a cmd processor to .. (what ever you want)" Note you need to install a Quantum Network Monitor Agent to run the .net code from. This is a very flexible and powerful feature. Use with caution!
253
+
254
+ ### Final Word
255
+
256
+ I fund the servers used to create these model files, run the Quantum Network Monitor service, and pay for inference from Novita and OpenAI—all out of my own pocket. All the code behind the model creation and the Quantum Network Monitor project is [open source](https://github.com/Mungert69). Feel free to use whatever you find helpful.
257
+
258
+ If you appreciate the work, please consider [buying me a coffee](https://www.buymeacoffee.com/mahadeva) ☕. Your support helps cover service costs and allows me to raise token limits for everyone.
259
+
260
+ I'm also open to job opportunities or sponsorship.
261
+
262
+ Thank you! 😊
263
+
264
+
265
+
266
+
267
+ # Qwen3-30B-A3B
268
+ <a href="https://chat.qwen.ai/" target="_blank" style="margin: 2px;">
269
+ <img alt="Chat" src="https://img.shields.io/badge/%F0%9F%92%9C%EF%B8%8F%20Qwen%20Chat%20-536af5" style="display: inline-block; vertical-align: middle;"/>
270
+ </a>
271
+
272
+ ## Qwen3 Highlights
273
+
274
+ 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:
275
+
276
+ - **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.
277
+ - **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.
278
+ - **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.
279
+ - **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.
280
+ - **Support of 100+ languages and dialects** with strong capabilities for **multilingual instruction following** and **translation**.
281
+
282
+ ## Model Overview
283
+
284
+ **Qwen3-30B-A3B** has the following features:
285
+ - Type: Causal Language Models
286
+ - Training Stage: Pretraining & Post-training
287
+ - Number of Parameters: 30.5B in total and 3.3B activated
288
+ - Number of Paramaters (Non-Embedding): 29.9B
289
+ - Number of Layers: 48
290
+ - Number of Attention Heads (GQA): 32 for Q and 4 for KV
291
+ - Number of Experts: 128
292
+ - Number of Activated Experts: 8
293
+ - Context Length: 32,768 natively and [131,072 tokens with YaRN](#processing-long-texts).
294
+
295
+ 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/).
296
+
297
+ ## Quickstart
298
+
299
+ The code of Qwen3-MoE has been in the latest Hugging Face `transformers` and we advise you to use the latest version of `transformers`.
300
+
301
+ With `transformers<4.51.0`, you will encounter the following error:
302
+ ```
303
+ KeyError: 'qwen3_moe'
304
+ ```
305
+
306
+ The following contains a code snippet illustrating how to use the model generate content based on given inputs.
307
+ ```python
308
+ from transformers import AutoModelForCausalLM, AutoTokenizer
309
+
310
+ model_name = "Qwen/Qwen3-30B-A3B"
311
+
312
+ # load the tokenizer and the model
313
+ tokenizer = AutoTokenizer.from_pretrained(model_name)
314
+ model = AutoModelForCausalLM.from_pretrained(
315
+ model_name,
316
+ torch_dtype="auto",
317
+ device_map="auto"
318
+ )
319
+
320
+ # prepare the model input
321
+ prompt = "Give me a short introduction to large language model."
322
+ messages = [
323
+ {"role": "user", "content": prompt}
324
+ ]
325
+ text = tokenizer.apply_chat_template(
326
+ messages,
327
+ tokenize=False,
328
+ add_generation_prompt=True,
329
+ enable_thinking=True # Switches between thinking and non-thinking modes. Default is True.
330
+ )
331
+ model_inputs = tokenizer([text], return_tensors="pt").to(model.device)
332
+
333
+ # conduct text completion
334
+ generated_ids = model.generate(
335
+ **model_inputs,
336
+ max_new_tokens=32768
337
+ )
338
+ output_ids = generated_ids[0][len(model_inputs.input_ids[0]):].tolist()
339
+
340
+ # parsing thinking content
341
+ try:
342
+ # rindex finding 151668 (</think>)
343
+ index = len(output_ids) - output_ids[::-1].index(151668)
344
+ except ValueError:
345
+ index = 0
346
+
347
+ thinking_content = tokenizer.decode(output_ids[:index], skip_special_tokens=True).strip("\n")
348
+ content = tokenizer.decode(output_ids[index:], skip_special_tokens=True).strip("\n")
349
+
350
+ print("thinking content:", thinking_content)
351
+ print("content:", content)
352
+ ```
353
+
354
+ For deployment, you can use `sglang>=0.4.6.post1` or `vllm>=0.8.5` or to create an OpenAI-compatible API endpoint:
355
+ - SGLang:
356
+ ```shell
357
+ python -m sglang.launch_server --model-path Qwen/Qwen3-30B-A3B --reasoning-parser qwen3
358
+ ```
359
+ - vLLM:
360
+ ```shell
361
+ vllm serve Qwen/Qwen3-30B-A3B --enable-reasoning --reasoning-parser deepseek_r1
362
+ ```
363
+
364
+ For local use, applications such as Ollama, LMStudio, MLX-LM, llama.cpp, and KTransformers have also supported Qwen3.
365
+
366
+ ## Switching Between Thinking and Non-Thinking Mode
367
+
368
+ > [!TIP]
369
+ > The `enable_thinking` switch is also available in APIs created by SGLang and vLLM.
370
+ > Please refer to our documentation for [SGLang](https://qwen.readthedocs.io/en/latest/deployment/sglang.html#thinking-non-thinking-modes) and [vLLM](https://qwen.readthedocs.io/en/latest/deployment/vllm.html#thinking-non-thinking-modes) users.
371
+
372
+ ### `enable_thinking=True`
373
+
374
+ 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.
375
+
376
+ ```python
377
+ text = tokenizer.apply_chat_template(
378
+ messages,
379
+ tokenize=False,
380
+ add_generation_prompt=True,
381
+ enable_thinking=True # True is the default value for enable_thinking
382
+ )
383
+ ```
384
+
385
+ In this mode, the model will generate think content wrapped in a `<think>...</think>` block, followed by the final response.
386
+
387
+ > [!NOTE]
388
+ > 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.
389
+
390
+
391
+ ### `enable_thinking=False`
392
+
393
+ 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.
394
+
395
+ ```python
396
+ text = tokenizer.apply_chat_template(
397
+ messages,
398
+ tokenize=False,
399
+ add_generation_prompt=True,
400
+ enable_thinking=False # Setting enable_thinking=False disables thinking mode
401
+ )
402
+ ```
403
+
404
+ In this mode, the model will not generate any think content and will not include a `<think>...</think>` block.
405
+
406
+ > [!NOTE]
407
+ > 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.
408
+
409
+ ### Advanced Usage: Switching Between Thinking and Non-Thinking Modes via User Input
410
+
411
+ 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.
412
+
413
+ Here is an example of a multi-turn conversation:
414
+
415
+ ```python
416
+ from transformers import AutoModelForCausalLM, AutoTokenizer
417
+
418
+ class QwenChatbot:
419
+ def __init__(self, model_name="Qwen/Qwen3-30B-A3B"):
420
+ self.tokenizer = AutoTokenizer.from_pretrained(model_name)
421
+ self.model = AutoModelForCausalLM.from_pretrained(model_name)
422
+ self.history = []
423
+
424
+ def generate_response(self, user_input):
425
+ messages = self.history + [{"role": "user", "content": user_input}]
426
+
427
+ text = self.tokenizer.apply_chat_template(
428
+ messages,
429
+ tokenize=False,
430
+ add_generation_prompt=True
431
+ )
432
+
433
+ inputs = self.tokenizer(text, return_tensors="pt")
434
+ response_ids = self.model.generate(**inputs, max_new_tokens=32768)[0][len(inputs.input_ids[0]):].tolist()
435
+ response = self.tokenizer.decode(response_ids, skip_special_tokens=True)
436
+
437
+ # Update history
438
+ self.history.append({"role": "user", "content": user_input})
439
+ self.history.append({"role": "assistant", "content": response})
440
+
441
+ return response
442
+
443
+ # Example Usage
444
+ if __name__ == "__main__":
445
+ chatbot = QwenChatbot()
446
+
447
+ # First input (without /think or /no_think tags, thinking mode is enabled by default)
448
+ user_input_1 = "How many r's in strawberries?"
449
+ print(f"User: {user_input_1}")
450
+ response_1 = chatbot.generate_response(user_input_1)
451
+ print(f"Bot: {response_1}")
452
+ print("----------------------")
453
+
454
+ # Second input with /no_think
455
+ user_input_2 = "Then, how many r's in blueberries? /no_think"
456
+ print(f"User: {user_input_2}")
457
+ response_2 = chatbot.generate_response(user_input_2)
458
+ print(f"Bot: {response_2}")
459
+ print("----------------------")
460
+
461
+ # Third input with /think
462
+ user_input_3 = "Really? /think"
463
+ print(f"User: {user_input_3}")
464
+ response_3 = chatbot.generate_response(user_input_3)
465
+ print(f"Bot: {response_3}")
466
+ ```
467
+
468
+ > [!NOTE]
469
+ > 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.
470
+ > 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.
471
+
472
+ ## Agentic Use
473
+
474
+ 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.
475
+
476
+ 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.
477
+ ```python
478
+ from qwen_agent.agents import Assistant
479
+
480
+ # Define LLM
481
+ llm_cfg = {
482
+ 'model': 'Qwen3-30B-A3B',
483
+
484
+ # Use the endpoint provided by Alibaba Model Studio:
485
+ # 'model_type': 'qwen_dashscope',
486
+ # 'api_key': os.getenv('DASHSCOPE_API_KEY'),
487
+
488
+ # Use a custom endpoint compatible with OpenAI API:
489
+ 'model_server': 'http://localhost:8000/v1', # api_base
490
+ 'api_key': 'EMPTY',
491
+
492
+ # Other parameters:
493
+ # 'generate_cfg': {
494
+ # # Add: When the response content is `<think>this is the thought</think>this is the answer;
495
+ # # Do not add: When the response has been separated by reasoning_content and content.
496
+ # 'thought_in_content': True,
497
+ # },
498
+ }
499
+
500
+ # Define Tools
501
+ tools = [
502
+ {'mcpServers': { # You can specify the MCP configuration file
503
+ 'time': {
504
+ 'command': 'uvx',
505
+ 'args': ['mcp-server-time', '--local-timezone=Asia/Shanghai']
506
+ },
507
+ "fetch": {
508
+ "command": "uvx",
509
+ "args": ["mcp-server-fetch"]
510
+ }
511
+ }
512
+ },
513
+ 'code_interpreter', # Built-in tools
514
+ ]
515
+
516
+ # Define Agent
517
+ bot = Assistant(llm=llm_cfg, function_list=tools)
518
+
519
+ # Streaming generation
520
+ messages = [{'role': 'user', 'content': 'https://qwenlm.github.io/blog/ Introduce the latest developments of Qwen'}]
521
+ for responses in bot.run(messages=messages):
522
+ pass
523
+ print(responses)
524
+ ```
525
+
526
+ ## Processing Long Texts
527
+
528
+ 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.
529
+
530
+ 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:
531
+
532
+ - Modifying the model files:
533
+ In the `config.json` file, add the `rope_scaling` fields:
534
+ ```json
535
+ {
536
+ ...,
537
+ "rope_scaling": {
538
+ "rope_type": "yarn",
539
+ "factor": 4.0,
540
+ "original_max_position_embeddings": 32768
541
+ }
542
+ }
543
+ ```
544
+ For `llama.cpp`, you need to regenerate the GGUF file after the modification.
545
+
546
+ - Passing command line arguments:
547
+
548
+ For `vllm`, you can use
549
+ ```shell
550
+ vllm serve ... --rope-scaling '{"rope_type":"yarn","factor":4.0,"original_max_position_embeddings":32768}' --max-model-len 131072
551
+ ```
552
+
553
+ For `sglang`, you can use
554
+ ```shell
555
+ python -m sglang.launch_server ... --json-model-override-args '{"rope_scaling":{"rope_type":"yarn","factor":4.0,"original_max_position_embeddings":32768}}'
556
+ ```
557
+
558
+ For `llama-server` from `llama.cpp`, you can use
559
+ ```shell
560
+ llama-server ... --rope-scaling yarn --rope-scale 4 --yarn-orig-ctx 32768
561
+ ```
562
+
563
+ > [!IMPORTANT]
564
+ > If you encounter the following warning
565
+ > ```
566
+ > Unrecognized keys in `rope_scaling` for 'rope_type'='yarn': {'original_max_position_embeddings'}
567
+ > ```
568
+ > please upgrade `transformers>=4.51.0`.
569
+
570
+ > [!NOTE]
571
+ > 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.**
572
+ > We advise adding the `rope_scaling` configuration only when processing long contexts is required.
573
+ > 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.
574
+
575
+ > [!NOTE]
576
+ > 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.
577
+
578
+ > [!TIP]
579
+ > The endpoint provided by Alibaba Model Studio supports dynamic YaRN by default and no extra configuration is needed.
580
+
581
+ ## Best Practices
582
+
583
+ To achieve optimal performance, we recommend the following settings:
584
+
585
+ 1. **Sampling Parameters**:
586
+ - 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.
587
+ - For non-thinking mode (`enable_thinking=False`), we suggest using `Temperature=0.7`, `TopP=0.8`, `TopK=20`, and `MinP=0`.
588
+ - 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.
589
+
590
+ 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.
591
+
592
+ 3. **Standardize Output Format**: We recommend using prompts to standardize model outputs when benchmarking.
593
+ - **Math Problems**: Include "Please reason step by step, and put your final answer within \boxed{}." in the prompt.
594
+ - **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"`."
595
+
596
+ 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.
597
+
598
+ ### Citation
599
+
600
+ If you find our work helpful, feel free to give us a cite.
601
+
602
+ ```
603
+ @misc{qwen3,
604
+ title = {Qwen3},
605
+ url = {https://qwenlm.github.io/blog/qwen3/},
606
+ author = {Qwen Team},
607
+ month = {April},
608
+ year = {2025}
609
+ }
610
+ ```
bf16/Qwen3-30B-A3B-bf16-00001-of-00002.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:34dff6581a9b24ec97eacf0129f78560a79be33f2ee1d0cbd5fa427d83947aaa
3
+ size 45902462976
bf16/Qwen3-30B-A3B-bf16-00002-of-00002.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:584fd1afd8ee6a40206c03b057ba9466fe971b81844042622fb82c46d30c4591
3
+ size 15193340032
f16/Qwen3-30B-A3B-f16-00001-of-00002.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:fd11fbe7dc18dad57c928643a2021d673e241753c3b49feaf1b8b537ee080bd8
3
+ size 45902462976
f16/Qwen3-30B-A3B-f16-00002-of-00002.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:eb56d8f98f5148f242bf3fb43e7d28087b44115f7741146a97657d20b6108175
3
+ size 15193340032