edwinbrowwn commited on
Commit
04a4172
·
verified ·
1 Parent(s): 4c5c362

Upload Qwen3.8-27B Q4_0 AutoRound Code GGUF

Browse files

Includes the llama.cpp model GGUF, vision projector, and model card.

.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
+ mmproj-model.gguf filter=lfs diff=lfs merge=lfs -text
37
+ Qwen3.8-27B-Q4_0-AutoRound-Code.gguf filter=lfs diff=lfs merge=lfs -text
Qwen3.8-27B-Q4_0-AutoRound-Code.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6f02e53c762a4a29a795a2346704c07f35c8a8ae7b74967aa1c0fda6bf047100
3
+ size 15715853632
README.md ADDED
@@ -0,0 +1,176 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ license_link: https://huggingface.co/Qwen/Qwen3.8-27B/blob/main/LICENSE
4
+ base_model: Qwen/Qwen3.8-27B
5
+ base_model_relation: quantized
6
+ pipeline_tag: image-text-to-text
7
+ library_name: llama.cpp
8
+ tags:
9
+ - qwen3_8
10
+ - autoround
11
+ - gguf
12
+ - q4_0
13
+ - quantization
14
+ - llama.cpp
15
+ - multimodal
16
+ - vision
17
+ - mtp
18
+ ---
19
+ # Qwen3.8-27B Q4_0 AutoRound Code GGUF
20
+
21
+ A **mixed GGUF Q4_0 quantization** of [`Qwen/Qwen3.8-27B`](https://huggingface.co/Qwen/Qwen3.8-27B), produced with [Intel's AutoRound](https://github.com/intel/auto-round). The main linear weights use GGUF `Q4_0`; `output.weight` is retained as `Q6_K`, while normalization and selected state-space auxiliary tensors remain `F32`.
22
+
23
+ > **Key difference from a Transformers-format AutoRound checkpoint:** This release is packaged for direct use with **[llama.cpp](https://github.com/ggml-org/llama.cpp)**. It includes the language-model GGUF and the separate `mmproj-model.gguf` vision projector. The quantization used the `auto-round-best` recipe with 512 calibration samples from a code-heavy, mixed code/math/science calibration set. No benchmark results are reported for this release.
24
+
25
+ ## TL;DR
26
+
27
+ - **Base**: Qwen3.8-27B (27B dense vision-language model)
28
+ - **Quant**: GGUF `Q4_0` mixed; symmetric 32-value blocks for the primary quantized tensors
29
+ - **Tool**: `auto-round-best` from Intel AutoRound 0.14.2 (1000 iterations, 512 samples)
30
+ - **Size**: 15.72 GB language-model GGUF plus 1.84 GB `mmproj` projector
31
+ - **Context**: 262,144 tokens natively
32
+ - **MTP**: One Multi-Token Prediction layer is retained in the language-model GGUF
33
+ - **Vision**: Image input is supported through the included `mmproj-model.gguf`; video input depends on the llama.cpp build's video support
34
+ - **Calibration**: 50% Open-SWE code traces, 25% OpenMathReasoning, and 25% OpenThoughts3 science examples
35
+
36
+ ## Quick inference with llama.cpp
37
+
38
+ Use a recent llama.cpp build with Qwen3.8 support. The GGUF already contains the tokenizer and chat template, so no separate tokenizer files are required.
39
+
40
+ ### Text and code
41
+
42
+ ```bash
43
+ llama-cli \
44
+ -m Qwen3.8-27B-Q4_0-AutoRound-Code.gguf \
45
+ -ngl 999 \
46
+ -c 262144 \
47
+ -n -1 \
48
+ --temp 1.0 \
49
+ --top-p 0.95 \
50
+ --top-k 20 \
51
+ -cnv
52
+ ```
53
+
54
+ The model's chat template enables thinking by default. Use llama.cpp's chat-template options when you need to change reasoning behavior, for example:
55
+
56
+ ```bash
57
+ llama-cli \
58
+ -m Qwen3.8-27B-Q4_0-AutoRound-Code.gguf \
59
+ --chat-template-kwargs '{"enable_thinking":false}' \
60
+ -p "Write a quicksort in Python."
61
+ ```
62
+
63
+ ### Image input
64
+
65
+ Download both GGUF files from this repository and pass the projector with `--mmproj`:
66
+
67
+ ```bash
68
+ llama-cli \
69
+ -m Qwen3.8-27B-Q4_0-AutoRound-Code.gguf \
70
+ --mmproj mmproj-model.gguf \
71
+ --image path/to/image.jpg \
72
+ -p "Describe this image."
73
+ ```
74
+
75
+ For video input, use `--video` instead of `--image` with a llama.cpp build compiled with video support.
76
+
77
+ ## Quantization details
78
+
79
+ | Field | Value |
80
+ |---|---|
81
+ | Base | `Qwen/Qwen3.8-27B` |
82
+ | Method | AutoRound (`intel/auto-round`), **best recipe** |
83
+ | AutoRound version | 0.14.2 |
84
+ | Scheme | `GGUF:Q4_0` |
85
+ | Primary tensor type | `Q4_0` |
86
+ | Q4_0 block size | 32 values per block |
87
+ | Symmetric | yes, for Q4_0 tensors |
88
+ | Other tensor types | `output.weight`: `Q6_K`; selected tensors: `F32` |
89
+ | Language-model GGUF | 866 tensors; 15,715,853,632 bytes |
90
+ | Vision projector | 334 `F32` tensors; 1,842,940,160 bytes |
91
+ | Context length | 262,144 tokens |
92
+ | MTP | 1 prediction layer |
93
+ | Calibration samples | 512 |
94
+ | Calibration sequence length | 2,048 tokens |
95
+ | Calibration batch size | 1 |
96
+ | Gradient accumulation | 8 steps |
97
+ | Low GPU memory mode | enabled |
98
+ | torch.compile | not enabled in the quantization command |
99
+
100
+ ### Tensor precision breakdown
101
+
102
+ The language-model GGUF contains:
103
+
104
+ - 505 `Q4_0` tensors: 26,046,627,840 parameters
105
+ - 1 `Q6_K` tensor (`output.weight`): 1,271,398,400 parameters
106
+ - 360 `F32` tensors: 2,671,616 parameters
107
+
108
+ The `F32` tensors include normalization weights and state-space auxiliary tensors such as `ssm_dt`, `ssm_a`, `ssm_conv1d`, and `ssm_norm`. The separate vision projector is fully stored as `F32`.
109
+
110
+ ## Calibration data
111
+
112
+ The calibration file used for this quantization was `mixed-code-math-science-512.jsonl`, generated with seed 42 and pre-packed to approximately 2,304 tokens per row. AutoRound consumed it with `seqlen=2048` and `num=512`; the pre-packed data was used without concatenating rows.
113
+
114
+ | Source | Share | Rows | Details |
115
+ |---|---:|---:|---|
116
+ | [`nvidia/Open-SWE-Traces`](https://huggingface.co/datasets/nvidia/Open-SWE-Traces) | 50% | 256 | `openhands` config, `qwen35_122b` split; Python, TypeScript, Rust, JavaScript, Go, Java, and PHP |
117
+ | [`nvidia/OpenMathReasoning`](https://huggingface.co/datasets/nvidia/OpenMathReasoning) | 25% | 128 | Mathematical reasoning examples |
118
+ | [`open-thoughts/OpenThoughts3-1.2M`](https://huggingface.co/datasets/open-thoughts/OpenThoughts3-1.2M) | 25% | 128 | Science-domain examples, including organic chemistry and physics |
119
+
120
+ The SHA-256 of the exact calibration JSONL used was:
121
+
122
+ ```text
123
+ 022cbb61e5c599a98c92f11304368f6352a2e1a575cffb47149e7f5ef15c5258
124
+ ```
125
+
126
+ ## Reproduction
127
+
128
+ The quantization was run from the project workspace with the following command:
129
+
130
+ ```bash
131
+ auto-round-best \
132
+ --model ./models/Qwen3.8-27B \
133
+ --scheme "GGUF:Q4_0" \
134
+ --format "gguf:q4_0" \
135
+ --dataset "./calib/mixed-code-math-science-512.jsonl:num=512" \
136
+ --output_dir ./quants/Qwen3.8-27B-AutoRound-Best-Q4_0-Mixed \
137
+ --seqlen 2048 \
138
+ --nsamples 512 \
139
+ --bs 1 \
140
+ --gradient_accumulate_steps 8 \
141
+ --low_gpu_mem_usage
142
+ ```
143
+
144
+ The source model is [`Qwen/Qwen3.8-27B`](https://huggingface.co/Qwen/Qwen3.8-27B). The `mmproj-model.gguf` projector was exported from the same source model for llama.cpp multimodal inference.
145
+
146
+ ## Acknowledgements
147
+
148
+ - [Alibaba / Qwen team](https://huggingface.co/Qwen) for the base [Qwen3.8-27B](https://huggingface.co/Qwen/Qwen3.8-27B) model
149
+ - [Intel AutoRound](https://github.com/intel/auto-round) for the quantization framework
150
+ - [llama.cpp](https://github.com/ggml-org/llama.cpp) for GGUF inference and multimodal support
151
+ - The maintainers of [Open-SWE-Traces](https://huggingface.co/datasets/nvidia/Open-SWE-Traces), [OpenMathReasoning](https://huggingface.co/datasets/nvidia/OpenMathReasoning), and [OpenThoughts3-1.2M](https://huggingface.co/datasets/open-thoughts/OpenThoughts3-1.2M) for the public calibration sources
152
+
153
+ ## License
154
+
155
+ Apache 2.0 - same as the [Qwen3.8-27B base model](https://huggingface.co/Qwen/Qwen3.8-27B).
156
+
157
+ ## Citation
158
+
159
+ If you use this quant, please cite the original Qwen3.8 release (see the [base model card](https://huggingface.co/Qwen/Qwen3.8-27B)) and the AutoRound paper:
160
+
161
+ ```bibtex
162
+ @misc{qwen38,
163
+ title = {{Qwen3.8-Max}: A New Bar for Coding and Cowork},
164
+ url = {https://qwen.ai/blog?id=qwen3.8},
165
+ author = {{Qwen Team}},
166
+ month = {August},
167
+ year = {2026}
168
+ }
169
+
170
+ @article{cheng2023autoround,
171
+ title = {Optimize Weight Rounding via Signed Gradient Descent for the Quantization of LLMs},
172
+ author = {Cheng, Wenhua and Zhang, Weiwei and Shen, Haihao and Cai, Yiyang and He, Xin and Lv, Kaokao and Liu, Yi},
173
+ journal = {arXiv preprint arXiv:2309.05516},
174
+ year = {2023}
175
+ }
176
+ ```
mmproj-model.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9da757136cb044abdf552334c56f2dcb63839799ea54c705ba4bcee807abdad2
3
+ size 1842940160