license: apache-2.0
base_model:
- SC117/Qwen4-35B-A3B-abliterated-UD-GGUF
language: - en
library_name: gguf
pipeline_tag: text-generation
tags: - gguf
- llama.cpp
- abliterated
- uncensored
- moe
- qwen
- 4-bit
- low-vram

Qwen4-35B-A3B abliterated — 26.28 GB
An uncensored Qwen4-35B-A3B that fits a 32 GB machine.
Every other abliterated Qwen4 GGUF is 32 GB or more. On a 32 GB box that does not fit in page cache,
so the model thrashes its own disk: I measured 4 MB/s at 700 ms read latency while it faulted its own
weights in, and the first prompt after an idle period took 4 minutes.
This one is 26.28 GB at the same quant level. The 20-billion-parameter n-gram table is stored at
Q2_0 instead of IQ4_NL; every other tensor is byte-identical to upstream.
| size | fits 32 GB RAM | 32k context | |
|---|---|---|---|
| SC117's UD-IQ4_XS | 32.04 GB | no | yes |
| this file | 26.28 GB (3.73 bpw) | yes | yes |
Run it
Needs llama.cpp built after Nov 2026 — the qwen4
pre-tokenizer landed upstream; older builds fail with unknown pre-tokenizer type: 'qwen4'.
export GGML_CUDA_NO_SM60_LUT_Q4K=1 # MANDATORY: without it decode is 5.9x slower
llama-server -m qwen4-35b-a3b-abliterated-engram-q2_0.gguf \
--alias qwen4-abl \
-c 32768 -b 2048 -ub 1024 -np 1 -ngl 99 \
--n-cpu-moe 12 \
-ot per_layer_token_embd=CPU \
--jinja --reasoning off
Then curl http://127.0.0.1:8080/v1/chat/completions as usual.
Those flags are not decoration. They are what makes a 26 GB model run on a 16 GB card:
GGML_CUDA_NO_SM60_LUT_Q4K=1is mandatory. The build this was measured on has a sm_60 Q4_K LUT
kernel whose dense path is 5.9× slower than the fallback: 33.15 tok/s with it disabled versus
5.65 with it enabled, on this exact weight set. Without the variable you will measure ~6 tok/s and
conclude the model is unusable. Details inqwen4-p100docs/FINDINGS.md§18.-ot per_layer_token_embd=CPUkeeps the 5.5 GB table in host RAM. It is read sparsely, so it costs
almost nothing per token.--n-cpu-moe 12puts 12 of 41 layers' expert weights on the CPU. Fewer than 12 overflows VRAM at
32k context; more than 12 only loses speed.
If you have 24 GB of VRAM or more, lower --n-cpu-moe until it just fits.
Requirements
| minimum | notes | |
|---|---|---|
| RAM | 31 GB | 26.28 GB of weights + KV + OS. 32 GB is comfortable; 64 GB is better. |
| VRAM | 16 GB | with the flags above. Less VRAM works with a higher --n-cpu-moe. |
| disk | 27 GB free | |
| llama.cpp | post-Nov-2026 | for qwen4 tokenizer support |
Speed on one 2016 Tesla P100 (16 GB, no tensor cores, sm_60), 32k context: ~34 tok/s decode,
~450 tok/s prefill once the weights are resident.
What actually changed
Exactly one tensor.
per_layer_token_embd.weight [128 × 160,003,584] IQ4_NL → Q2_0
That is a 20-billion-parameter n-gram / engram lookup table — 11.5 GB of the file, more than a third
of it, read sparsely per token. Everything else (transformer, attention, SSM layers, experts, output)
is copied byte-for-byte from upstream.
Why Q2_0 and not IQ2_S
The table's rows are 128 weights wide. Quant types have fixed block sizes, and a row must divide
evenly:
| type | weights per block | 128 divisible? | result |
|---|---|---|---|
| IQ4_NL (upstream) | 32 | yes (4 blocks) | 10,986 MiB |
| IQ2_S and every IQ2+/K type | 256 | no | rejected — ncols 128 not divisible by 256 |
| Q2_0 | 64 | yes (2 blocks) | 5,493 MiB |
llama-quantize does not pad a row to fit; it refuses and falls back. Q2_0 is the only sub-4.5-bit
type whose block divides 128, which makes it the only way to halve this tensor without touching
anything else.
Measured
Same llama.cpp build, same flags, same corpus, one P100:
| check | 32 GB upstream | 26 GB (this file) |
|---|---|---|
| file size | 32.04 GB | 26.28 GB / 25,048 MiB |
| perplexity¹ | 9.2151 ± 0.899 | 9.6090 ± 0.937 |
| refusal canaries (lockpick / phishing template / keylogger) | 0/3 comply | 3/3 comply |
| 4-task suite (arithmetic, code fix, JSON extract, tool-call JSON) | 4/4 | 4/4 |
| VRAM at 32k context | 16,149 MiB | 15,893 MiB |
¹ Pride and Prejudice, 400 KB, -c 512 -b 1 --chunks 3.
The perplexity hit is +4.3%, and that is inside the noise. The chunk-sigma is ±0.9, so a 0.39 gap
is under half a sigma. On a different corpus the same change measured +1.5%. Treat it as "roughly
1–4%, not resolvable at this sample size" rather than a precise number.
The abliteration itself is not mine — see attribution. The base checkpoint at IQ4_XS refused all
three canaries 6/6 across two runs; this file complies 3/3.
Reproduce it
# 1. dump every tensor's current type
llama-quantize --dry-run --allow-requantize SRC.gguf /tmp/x.gguf IQ4_XS 2>&1 | tee tensors.log
# 2. generate a command that pins every tensor to its current type,
# except the table, which goes to q2_0
python3 requant-engram-only.py tensors.log SRC.gguf OUT.gguf \
--tensor per_layer_token_embd.weight=q2_0
# 3. run it
bash quant-pinned.sh
requant-engram-only.py is in doteyeso-ops/qwen4-p100,
along with the sm_60 CUDA patches and the full measurement log.
Step 2 is the part that matters. Handing llama-quantize a bare ftype does not change one
tensor — UD-IQ4_XS keeps attention and SSM at q8_0 and the PLE projections at bf16, so a plain
ftype rewrote 832 tensors, and tool-calling collapsed to a refusal. Pinning every type back and
changing only the table is what makes this work.
Also: llama-quantize ... copy quantizes nothing at all — the copy ftype sets only_copy, which
short-circuits every tensor, so --tensor-type is parsed and silently ignored.
Verify it yourself
from gguf import GGUFReader
r = GGUFReader("qwen4-35b-a3b-abliterated-engram-q2_0.gguf")
for t in r.tensors:
if "per_layer" in t.name or "exps" in t.name or "token_embd" in t.name:
print(f"{t.tensor_type:8s} {t.name}")
Expect per_layer_token_embd.weight at q2_0, expert tensors at iq4_xs, token_embd at q5_K,
and attention/SSM at q8_0 — the same types as upstream apart from the table.
Limitations
- Abliterated models produce content the base model refuses. That is the point; what you do with it
is on you. - 26.28 GB in 31 GB of RAM fits with ~4 GB to spare — not roomy. At 32k context the weights plus KV
leave about 490 MiB of VRAM. - The perplexity figure is a 3-chunk estimate with a wide interval, stated above.
- The 20 B table at ~2.25 bpw is a lossy change. It measured clean on task suites and refusal
behaviour, but long-tail factual recall is exactly what an n-gram table stores, so test your own
use case.
Attribution
Apache-2.0 through the whole chain. Changes are limited to per_layer_token_embd as described above.
| Qwen/Qwen4-35B-A3B | base model |
| unsloth/Qwen4-35B-A3B-GGUF | UD quantization |
| SC117/Qwen4-35B-A3B-abliterated-UD-GGUF | the abliteration |
| this file | per_layer_token_embd requantized to Q2_0 |