Read this before trusting the name
Table with columns: What, Where| What | Where |
|---|
| GPTQ 4-bit weights | model-0000*-of-00003.safetensors — active by default |
| HSAQ adaptive sparsity | hsaq_hooks.py + example_hsaq.py — you must switch it on |
A forward pre-hook cannot be stored in a .safetensors. If you load this repo
with GPTQModel.load() and nothing else, you are running GPTQ only.
Measurements
All on the same machine (RTX 3090), same harness, and reproducible with the
scripts in MethodWhite/hsaq.
Standard benchmarks — GPTQ weights, no hooks
Table with columns: Benchmark, Items, Accuracy| Benchmark | Items | Accuracy |
|---|
| ARC-easy (test) | 200 | 0.74 |
| GSM8K (test) | 100 | 0.77 |
ARC is scored by length-normalised log-likelihood over the four choices, not by
generation. GSM8K is greedy generation plus exact match on the final number.
Both are partial splits (200 / 100 of the published test sets) — treat them as
indicative, not leaderboard figures. The full 100-item GSM8K run and every
generated chain are what the 0.77 comes from; wrong answers are scored wrong
(e.g. a profit question answered 195 000 against a gold of 70 000).
HSAQ: measured cost of switching it on
Table with columns: mean loss, perplexity | mean loss | perplexity |
|---|
| hooks off | 2.1302 | 8.4164 |
| hooks on | 2.1359 | 8.4647 |
+0.57 % perplexity with HSAQ active at a mean activation sparsity of
19.12 % (152 hooks, 6 080 calls, wikitext-2 test, 40 windows of 512 tokens).
That is the honest trade: about two fifths of the activations entering the
linear layers are zeroed, for half a percent of perplexity. Whether that turns
into a wall-clock speedup depends on your hardware — the hooks add Python work
per call, and on a GPU the sparse pattern is not exploited by dense kernels.
Refusal and reasoning — GPTQ weights, no hooks
Table with columns: Model, perplexity, refusal, reasoning| Model | perplexity | refusal | reasoning |
|---|
| base (bf16) | 10.17 | 10/10 | 9/10 |
| this repo | 8.42 | 10/10 | 10/10 |
Refusal and reasoning come from a 10-prompt battery with verifiable answers, not
a published benchmark. The base figures are from a separate run of the same
harness, so compare magnitudes rather than exact ordering.
How it was compressed
GPTQ 4-bit — group size 128, 128 calibration samples from wikitext-2.
HSAQ — a forward pre-hook that zeroes the smallest activations before each
linear layer. The rate is not a constant; it is derived per call from how
concentrated the tensor is:
conc = ||x||_1 / (||x||_2 * sqrt(n)) normalised to its real ranges = s_max - (s_max - s_min) * conc_norm
Peaky tensors are pruned harder than dense ones. Band defaults: 0.05 – 0.50.
Sparsity measured during the quantisation pass was 10.33 %; on wikitext-2 test
text with the same band it is 19.12 %. The difference is the corpus, not a
setting: fineweb/wikitext calibration text is less concentrated than novel test
text. Both numbers are real, and neither is "the" sparsity.
Install
huggingface-cli download MethodWhite/qwen35-9b-hsaq-gptq --local-dir qwen9bcd qwen9bpip install -r requirements.txt # gptqmodel is pinned: 7.6.0
torchvision is not optional: the vision processor config fails to build
without it and GPTQModel.load raises an empty ImportError.
Charts


The aggregate numbers are also in benchmarks.json. The
per-item log was lost when the evaluation host was destroyed, so that file holds
the figures the harness printed, not reconstructed rows — it says so itself.
Usage — GPTQ only
from gptqmodel import GPTQModelmodel = GPTQModel.load("MethodWhite/qwen35-9b-hsaq-gptq")
Usage — GPTQ + HSAQ
from example_hsaq import load_with_hsaq, remove_hooks model, tok, handles = load_with_hsaq("MethodWhite/qwen35-9b-hsaq-gptq")# ... run inference ...remove_hooks(handles) # it is a hook: always remove it
Limits
- Partial benchmark splits (ARC 200, GSM8K 100). Not full-set numbers.
- HSAQ's benefit is measured in quality, not in speed. On dense GPU kernels the
sparsity is not exploited; expect no speedup without sparse-aware kernels.
hsaq_hooks.py targets LLaMA/Qwen-style decoders (model.layers). It raises a
clear error on architectures that expose .h instead (GPT-2).
- Calibration and evaluation both used wikitext-2.
Attribution
Base model: Qwen/Qwen3.5-9B-Base,
Apache-2.0. This derivative keeps the same licence. Quantisation code:
MethodWhite/hsaq.