File size: 9,649 Bytes
db5910b
 
 
 
 
 
 
415f3c8
db5910b
 
 
415f3c8
db5910b
415f3c8
 
db5910b
 
415f3c8
a637bdf
415f3c8
db5910b
a637bdf
db5910b
415f3c8
a637bdf
415f3c8
a637bdf
415f3c8
 
10c2f82
a3e83a5
10c2f82
 
 
 
a637bdf
db5910b
30c5229
08205f4
30c5229
 
a637bdf
cdb6df7
db5910b
a637bdf
db5910b
a637bdf
db5910b
 
08205f4
 
 
db5910b
 
a637bdf
cdb6df7
a637bdf
08205f4
a637bdf
08205f4
 
 
9e325bb
 
 
db5910b
a637bdf
db5910b
a637bdf
415f3c8
 
30c5229
415f3c8
 
a3e83a5
cdb6df7
415f3c8
a637bdf
db5910b
415f3c8
db5910b
a637bdf
65a71ce
a637bdf
65a71ce
a637bdf
65a71ce
a637bdf
65a71ce
a637bdf
65a71ce
a637bdf
65a71ce
a637bdf
65a71ce
a637bdf
65a71ce
a637bdf
db5910b
a637bdf
30c5229
a637bdf
08205f4
a637bdf
08205f4
 
a637bdf
08205f4
cdb6df7
08205f4
 
 
 
 
 
a637bdf
415f3c8
30c5229
db5910b
08205f4
db5910b
a637bdf
415f3c8
a637bdf
db5910b
a637bdf
db5910b
415f3c8
db5910b
cdb6df7
 
30c5229
 
db5910b
cdb6df7
 
a637bdf
cdb6df7
 
 
 
a637bdf
cdb6df7
 
 
 
 
 
 
 
a637bdf
 
 
 
 
 
 
 
cdb6df7
a637bdf
cdb6df7
db5910b
 
a637bdf
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
---
license: apache-2.0
base_model:
  - Qwen/Qwen3.5-4B
base_model_relation: quantized
library_name: llama.cpp
pipeline_tag: text-generation
thumbnail: https://huggingface.co/TheStageAI/Qwen3.5-4B-GGUF/resolve/main/assets/thestage-edge-models-header.png
tags:
  - gguf
  - llama.cpp
  - quantized
  - mixed-precision
  - local-inference
  - qwen3.5
---

<p align="center">
  <img src="./assets/thestage-edge-models-header.png" width="100%" alt="TheStageAI Edge Models: the right model at every memory budget">
</p>

<h1 align="center">Qwen3.5 4B</h1>

<p align="center">
  Four GGUF checkpoints for llama.cpp, from 1.52 GB to 4.49 GB.
  <br>
  <strong>Start with M: 2.39 GB and 98.4% of the BF16 instruction-strict IFEval score.</strong>
</p>

<p align="center">
  <a class="inline-block" href="https://github.com/TheStageAI/edge-lm"><img class="dark:hidden" src="./assets/cta-edge-lm-light.svg" width="146" height="42" alt="Explore edge-lm on GitHub"><img class="hidden dark:block" src="./assets/cta-edge-lm-dark.svg" width="146" height="42" alt="Explore edge-lm on GitHub"></a>&nbsp;
  <a class="inline-block" href="https://docs.thestage.ai/"><img class="dark:hidden" src="./assets/cta-docs-light.svg" width="120" height="42" alt="Read TheStageAI documentation"><img class="hidden dark:block" src="./assets/cta-docs-dark.svg" width="120" height="42" alt="Read TheStageAI documentation"></a>&nbsp;
  <a class="inline-block" href="https://app.thestage.ai/"><img class="dark:hidden" src="./assets/cta-platform-light.svg" width="146" height="42" alt="Open TheStageAI Platform"><img class="hidden dark:block" src="./assets/cta-platform-dark.svg" width="146" height="42" alt="Open TheStageAI Platform"></a>
</p>

## Choose a checkpoint

| Tier | Size | Best for | File |
| --- | ---: | --- | --- |
| XS | 1.52 GB | Minimum footprint | [Download](./Qwen3.5-4B-XS-TS-Q3_K_S.gguf) |
| S | 1.90 GB | Compact | [Download](./Qwen3.5-4B-S-TS-Q4_K_S.gguf) |
| **M** | **2.39 GB** | **Recommended** | [Download](./Qwen3.5-4B-M-TS-Q4_K_M.gguf) |
| L | 4.49 GB | High-precision Q8 | [Download](./Qwen3.5-4B-L-TS-Q8_0.gguf) |

**Other Qwen 3.5 sizes:** <a href="https://huggingface.co/TheStageAI/Qwen3.5-0.8B-GGUF">0.8B</a> &nbsp;·&nbsp; <a href="https://huggingface.co/TheStageAI/Qwen3.5-2B-GGUF">2B</a> &nbsp;·&nbsp; <a href="https://huggingface.co/TheStageAI/Qwen3.5-9B-GGUF">9B</a>

## Quickstart

```bash
llama-cli \
  --hf-repo TheStageAI/Qwen3.5-4B-GGUF \
  --hf-file Qwen3.5-4B-M-TS-Q4_K_M.gguf
```

## Why we recommend M

At 2.39 GB, M retains 98.4% of the BF16 instruction-strict IFEval score. On MMLU-Pro, it retains 99.1% of the BF16 score. It uses 47% less disk than L.

| Tier | IFEval P / I (%) | MMLU-Pro (%) |
| --- | ---: | ---: |
| BF16 reference | 82.44 / 87.53 | 79.55 |
| L | 81.70 / 87.05 | 79.59 |
| **M** | 80.22 / 86.09 | 78.86 |
| S | 77.82 / 83.93 | 74.39 |
| XS | 70.43 / 78.30 | — |

P / I means prompt-strict / instruction-strict. IFEval uses deterministic non-thinking decoding; MMLU-Pro uses sampled long-form reasoning. Only complete model-level scores are reported. A dash means not reported.

> **Reasoning:** XS is intended for non-thinking use. Run it with `--reasoning off`. Choose S, M, or L for long-form reasoning.

<details>
<summary><b>Evaluation protocol</b></summary>

- **IFEval:** 541 prompts, native chat template, `enable_thinking=false`, temperature 0.
- **MMLU-Pro:** 12,032 questions, vLLM, 0-shot, native chat template `qwen_mc_json_v1`, `enable_thinking=true`; `temperature=1`, `top_p=0.95`, `top_k=20`, `min_p=0`, `presence_penalty=1.5`, `frequency_penalty=0`, `repetition_penalty=1`, `seed=42`; `max_model_len=40960`, `max_new_tokens=32768`; dataset revision `b189ec765aa7ed75c8acfea42df31fdae71f97be`.
- The headline BF16 comparison uses instruction-strict IFEval; the raw scores are shown in the table.

In matched long-form reasoning diagnostics, XS produced longer trajectories and reached the 32,768-token output limit more often than S. The XS MMLU-Pro cell is marked `—` for that reason.

</details>

## How the checkpoints are built

All four checkpoints use the same production PTQ pipeline. The precision map is the only tier-specific part.

### 1. Fit native GGUF codes

Calibration activations produce a curvature objective weighted by true Fisher information for each quantized projection. We adapt the scale and minimum initialization from [NeUQI](https://arxiv.org/abs/2505.17595) to that objective, then solve integer codes on the target GGUF grid with a guarded cyclic coordinate-descent solver inspired by [QuantEase](https://arxiv.org/abs/2309.01885). A final K-quant pass tunes stored scales and minima while keeping packed codes fixed.

### 2. Reconstruct the deployed trajectory

Layers are calibrated in execution order against activations from the already-quantized prefix. A dense reference path measures accumulated drift. [Quantization Error Propagation (QEP)](https://arxiv.org/abs/2504.09629) adds that drift to the next reconstruction target, so later layers optimize for the inputs they receive at inference time.

### 3. Allocate the byte budget

XS and S can choose Q2_K through Q8_0 for each quantizable group. The optimizer trades changes in the teacher distribution against the actual encoded byte cost, including scale and minimum metadata. [ANNA](https://docs.thestage.ai/qlip/docs/source/anna_api.html) provides constrained configuration search. [RCO](https://arxiv.org/abs/2605.00649) provides an exact-budget route ([code](https://github.com/IST-DASLab/RCO)). For this model, RCO selected both the XS and S precision maps. M and L keep the decoder qtypes at Q4_K_M and Q8_0, respectively, and use the same reconstruction and scale-tuning stages.

After schedule selection, PTQ runs again from the source weights. Each layer is then calibrated with the final upstream precision choices.

### 4. Align the full model

A short affine distillation pass tunes native FP16 scales and minima while qtypes, packed codes, dense weights, and tensor layouts stay fixed. The loss matches the teacher's next-token distribution without changing file size or runtime layout.

We load-test the shipping GGUF and evaluate it on a held-out set of 3,072 sequences with next-token KL. [`release-manifest.json`](./release-manifest.json) records its SHA-256, downstream evaluation IDs, and tensor metadata. Final recommendations use complete-model benchmarks.

<details>
<summary><b>File details</b></summary>

| Tier | Hub selector | GGUF file type | Whole-file BPW |
| --- | --- | --- | ---: |
| XS | `Q3_K_S` | `MOSTLY_Q2_K` | 2.889 |
| S | `Q4_K_S` | `MOSTLY_Q2_K` | 3.622 |
| M | `Q4_K_M` | `MOSTLY_Q4_K_M` | 4.538 |
| L | `Q8_0` | `MOSTLY_Q8_0` | 8.533 |

The Hub selector controls sidebar grouping and download discovery. For XS and S it approximates the whole-file size class; [`release-manifest.json`](./release-manifest.json) contains the exact tensor mix. M and L keep their decoder qtypes at Q4_K_M and Q8_0 within the same production PTQ pipeline.

Runtime memory also includes KV cache and buffers, which grow with context length.

</details>

## TheStageAI deployment stack

These GGUF files target llama.cpp-compatible runtimes. [edge-lm](https://github.com/TheStageAI/edge-lm) runs compressed MLX models on Macs and iPhones. [ANNA](https://docs.thestage.ai/qlip/docs/source/anna_api.html) searches compression configurations under size or compute constraints. The [TheStageAI Platform](https://app.thestage.ai/) and [documentation](https://docs.thestage.ai/) cover compression, compilation, and serving workflows.

For a specific device, latency target, or memory budget, [talk to our team](https://app.thestage.ai/contact).

## Reproducibility

- **Release:** July 21, 2026.
- **Base model:** [`Qwen/Qwen3.5-4B`](https://huggingface.co/Qwen/Qwen3.5-4B) at revision [`851bf6e8`](https://huggingface.co/Qwen/Qwen3.5-4B/tree/851bf6e806efd8d0a36b00ddf55e13ccb7b8cd0a).
- **Manifest:** [`release-manifest.json`](./release-manifest.json) records the exact base revision, byte sizes, GGUF file types, whole-file BPW, tensor inventories, SHA-256 digests, held-out KL values, and evaluation IDs.
- **Runtime gate:** export and load checks used [llama.cpp revision `bec4772f`](https://github.com/ggml-org/llama.cpp/commit/bec4772f6a2527d371557b5d2032641e5ff7619c).

## Citation

If you use this checkpoint, cite this release and follow the upstream model's citation guidance:

```bibtex
@misc{thestageai2026qwen3p54bgguf,
  author       = {{TheStageAI}},
  title        = {Qwen3.5 4B: TheStageAI GGUF Release},
  year         = {2026},
  month        = {jul},
  howpublished = {Hugging Face model release},
  url          = {https://huggingface.co/TheStageAI/Qwen3.5-4B-GGUF},
  note         = {XS, S, M, and L deployment tiers},
}
```

<details>
<summary><b>References</b></summary>

- [ANNA](https://docs.thestage.ai/qlip/docs/source/anna_api.html), TheStageAI's constrained compression configuration search.
- [RCO: Model Compression with Exact Budget Constraints via Riemannian Manifolds](https://arxiv.org/abs/2605.00649) ([code](https://github.com/IST-DASLab/RCO)).
- [NeUQI: Near-Optimal Uniform Quantization Parameter Initialization for Low-Bit LLMs](https://arxiv.org/abs/2505.17595).
- [QuantEase: Optimization-based Quantization for Language Models](https://arxiv.org/abs/2309.01885).
- [Quantization Error Propagation: Revisiting Layer-Wise Post-Training Quantization](https://arxiv.org/abs/2504.09629).

</details>

## License

The checkpoint weights use the upstream model's **Apache-2.0** license. llama.cpp and other runtime software keep their own licenses.