ubergarm commited on
Commit
64bf613
·
0 Parent(s):

initial commit

Browse files
Files changed (2) hide show
  1. .gitattributes +38 -0
  2. README.md +153 -0
.gitattributes ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ imatrix-*.dat filter=lfs diff=lfs merge=lfs -text
37
+ *.gguf filter=lfs diff=lfs merge=lfs -text
38
+ *.png filter=lfs diff=lfs merge=lfs -text
README.md ADDED
@@ -0,0 +1,153 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ quantized_by: ubergarm
3
+ pipeline_tag: text-generation
4
+ base_model: Qwen/Qwen3.6-27B
5
+ base_model_relation: quantized
6
+ license: apache-2.0
7
+ license_link: https://huggingface.co/Qwen/Qwen3.6-27B/blob/main/LICENSE
8
+ tags:
9
+ - imatrix
10
+ - conversational
11
+ - qwen3_5
12
+ - ik_llama.cpp
13
+ ---
14
+
15
+ ## `ik_llama.cpp` imatrix Quantizations of Qwen/Qwen3.6-27B
16
+ *NOTE* `ik_llama.cpp` can also run your existing GGUFs from bartowski, unsloth, mradermacher, etc if you want to try it out before downloading my quants. Only a couple quants in this collection are compatible with mainline llamma.cpp/LMStudio/KoboldCPP/etc as mentioned in the specific description, all others require ik_llama.cpp.
17
+
18
+ Some of ik's new quants are supported with [Nexesenex/croco.cpp](https://github.com/Nexesenex/croco.cpp) fork of KoboldCPP with Windows builds. Also check for [ik_llama.cpp windows builds by Thireus here.](https://github.com/Thireus/ik_llama.cpp/releases).
19
+
20
+ These quants provide best in class perplexity for the given memory footprint.
21
+
22
+ ## Big Thanks
23
+ Shout out to Wendell and the **Level1Techs** crew, the community [Forums](https://forum.level1techs.com/t/deepseek-deep-dive-r1-at-home/225826), [YouTube Channel](https://www.youtube.com/@Level1Techs)! **BIG thanks** for providing **BIG hardware** expertise and access to run these experiments and make these great quants available to the community!!!
24
+
25
+ Also thanks to all the folks in the quantizing and inferencing community on [BeaverAI Club Discord](https://huggingface.co/BeaverAI) and on [r/LocalLLaMA](https://www.reddit.com/r/LocalLLaMA/) for tips and tricks helping each other run, test, and benchmark all the fun new models! Thanks to huggingface for hosting all these big quants!
26
+
27
+ Finally, I *really* appreciate the support from [aifoundry.org](https://aifoundry.org) so check out their open source RISC-V based solutions!
28
+
29
+ ## Quant Collection
30
+ Perplexity computed against *wiki.test.raw*. (lower is "better")
31
+
32
+ These two are just test quants for baseline perplexity comparison and not available for download here:
33
+ * `BF16` 50.103 GiB (16.002 BPW)
34
+ - TODO
35
+ * `Q8_0` 26.622 GiB (8.502 BPW)
36
+ - TODO
37
+
38
+ *NOTE*: If the models are split, the first file is much smaller and only contains metadata, that is on purpose, its fine!
39
+
40
+ ## IQ5_KS 18.532 GiB (5.919 BPW)
41
+ TODO
42
+
43
+ This ik_llama.cpp exclusive quant is likely among the best quality available for 24GB full offload.
44
+
45
+ <details>
46
+
47
+ <summary>👈 Secret Recipe</summary>
48
+
49
+ ```bash
50
+ #!/usr/bin/env bash
51
+
52
+ custom="
53
+ # 64 Repeating Layers [0-63]
54
+
55
+ ## Gated Attention/Delta Net [Blended 0-63]
56
+ blk\..*\.attn_gate\.weight=q6_0
57
+ blk\..*\.attn_qkv\.weight=q6_0
58
+ blk\..*\.attn_output\.weight=q6_0
59
+ blk\..*\.attn_q\.weight=q6_0
60
+ blk\..*\.attn_k\.weight=q6_0
61
+ blk\..*\.attn_v\.weight=q6_0
62
+ blk\..*\.ssm_alpha\.weight=q8_0
63
+ blk\..*\.ssm_beta\.weight=q8_0
64
+ blk\..*\.ssm_out\.weight=q8_0
65
+
66
+ # Dense Layers [0-63]
67
+ blk\.[0-4]\.ffn_down_exps\.weight=q6_0
68
+ blk\..*\.ffn_down\.weight=iq5_ks
69
+ blk\..*\.ffn_(gate|up)\.weight=iq5_ks
70
+
71
+ # Non-Repeating Layers
72
+ token_embd\.weight=q6_0
73
+ output\.weight=q8_0
74
+ "
75
+
76
+ custom=$(
77
+ echo "$custom" | grep -v '^#' | \
78
+ sed -Ez 's:\n+:,:g;s:,$::;s:^,::'
79
+ )
80
+
81
+ #--dry-run \
82
+ numactl -N ${SOCKET} -m ${SOCKET} \
83
+ ./build/bin/llama-quantize \
84
+ --custom-q "$custom" \
85
+ --imatrix /mnt/data/models/ubergarm/Qwen3.6-27B-GGUF/imatrix-Qwen3.6-27B-BF16.dat \
86
+ /mnt/data/models/ubergarm/Qwen3.6-27B-GGUF/Qwen3.6-27B-BF16-00001-of-00002.gguf \
87
+ /mnt/data/models/ubergarm/Qwen3.6-27B-GGUF/Qwen3.6-27B-IQ5_KS.gguf \
88
+ IQ5_KS \
89
+ 128
90
+ ```
91
+
92
+ </details>
93
+
94
+ ## smol-IQ4_NL 15.405 GiB (4.920 BPW)
95
+ TODO
96
+
97
+ This mainline compatible custom mix using quantization types hopefully optimized for Vulkan/ROCm (and possibly Mac)?
98
+
99
+ <details>
100
+
101
+ <summary>👈 Secret Recipe</summary>
102
+
103
+ ```bash
104
+ #!/usr/bin/env bash
105
+
106
+ custom="
107
+ # 64 Repeating Layers [0-63]
108
+
109
+ ## Gated Attention/Delta Net [Blended 0-63]
110
+ blk\..*\.attn_gate\.weight=iq4_nl
111
+ blk\..*\.attn_qkv\.weight=iq4_nl
112
+ blk\..*\.attn_output\.weight=iq4_nl
113
+ blk\..*\.attn_q\.weight=iq4_nl
114
+ blk\..*\.attn_k\.weight=iq4_nl
115
+ blk\..*\.attn_v\.weight=iq4_nl
116
+ blk\..*\.ssm_alpha\.weight=q8_0
117
+ blk\..*\.ssm_beta\.weight=q8_0
118
+ blk\..*\.ssm_out\.weight=q8_0
119
+
120
+ # Dense Layers [0-63]
121
+ blk\..*\.ffn_down\.weight=iq4_nl
122
+ blk\..*\.ffn_(gate|up)\.weight=iq4_nl
123
+
124
+ # Non-Repeating Layers
125
+ token_embd\.weight=iq4_nl
126
+ output\.weight=q8_0
127
+ "
128
+
129
+ custom=$(
130
+ echo "$custom" | grep -v '^#' | \
131
+ sed -Ez 's:\n+:,:g;s:,$::;s:^,::'
132
+ )
133
+
134
+ #--dry-run \
135
+ numactl -N ${SOCKET} -m ${SOCKET} \
136
+ ./build/bin/llama-quantize \
137
+ --custom-q "$custom" \
138
+ --imatrix /mnt/data/models/ubergarm/Qwen3.6-27B-GGUF/imatrix-Qwen3.6-27B-BF16.dat \
139
+ /mnt/data/models/ubergarm/Qwen3.6-27B-GGUF/Qwen3.6-27B-BF16-00001-of-00002.gguf \
140
+ /mnt/data/models/ubergarm/Qwen3.6-27B-GGUF/Qwen3.6-27B-smol-IQ4_NL.gguf \
141
+ IQ4_NL \
142
+ 128
143
+ ```
144
+
145
+ </details>
146
+
147
+ ## References
148
+ * [ik_llama.cpp](https://github.com/ikawrakow/ik_llama.cpp)
149
+ * [ubergarm on quantizing LLMs and tuning GPUs with aifoundry.org](https://blog.aifoundry.org/p/adventures-in-model-quantization)
150
+ * [ubergarm-imatrix-calibration-corpus-v02.txt](https://gist.github.com/ubergarm/edfeb3ff9c6ec8b49e88cdf627b0711a?permalink_comment_id=5682584#gistcomment-5682584)
151
+ * [Getting Started Guide (out of date)](https://github.com/ikawrakow/ik_llama.cpp/discussions/258)
152
+ * [Quant Cookers Guide (out of date)](https://github.com/ikawrakow/ik_llama.cpp/discussions/434)
153
+ * [high quality imatrix MoE optimized mainline llama.cpp quants AesSedai](https://huggingface.co/AesSedai/)