license: apache-2.0
base_model: heterodoxin/qwen4-35b-a3b-uncensored-safetensors
base_model_relation: quantized
library_name: gguf
pipeline_tag: image-text-to-text
tags:
- uncensored
- abliteration
- apostate
- diode
- gguf
- imatrix
- multimodal
Qwen4 35B A3B Uncensored GGUF
An uncensored edit of Qwen/Qwen4-35B-A3B. Refusals are removed by editing the weights directly, and the model stays multimodal (vision tower included). The Transformers checkpoint is at qwen4-35b-a3b-uncensored-safetensors.
GGUF quantizations
Non-uniform quantizations: each tensor gets its own quant type, chosen by llama.cpp's budgeted allocator (llama-quantize --target-bpw). The allocator measures every candidate type's imatrix-weighted error on the actual weights and solves the size budget exactly. The four sizes match the operating points of ISTA-DASLab's GSQ-RCO releases (2.50 / 2.75 / 3.00 / 3.50 bpw). Note that GSQ's refinement and RCO's gradient-based search were not used here: the allocation comes from measured per-tensor error, solved under the size budget.
Qwen4 carries a 20.5B-parameter per-layer n-gram lookup table (37% of all weights) that llama.cpp stores at Q4_0. So the operating points are applied to the trunk, everything except that table, and the whole-file bpw is higher. IQ1 types are excluded, so no matrix drops below about 2 bpw. The importance matrix is the published one for the base model, with the 32 new shared-expert down_proj columns set to each tensor's mean importance (imatrix-qwen4-35b-a3b-uncensored.gguf). The widened shared-expert down_proj rows (544) are not a multiple of 256, so llama.cpp stores those 40 small tensors in a 32-block fallback type. tensor-allocation/ lists the type assigned to every tensor in each file.
| File | trunk bpw | file bpw | Size | Notes |
|---|---|---|---|---|
qwen4-35b-a3b-uncensored-NU-IQ2_XS.gguf |
2.50 | 3.24 | 22.5 GB | Smallest |
qwen4-35b-a3b-uncensored-NU-IQ2_S.gguf |
2.76 | 3.40 | 23.6 GB | |
qwen4-35b-a3b-uncensored-NU-IQ3_XXS.gguf |
3.01 | 3.56 | 24.7 GB | Good all-round size |
qwen4-35b-a3b-uncensored-NU-IQ3_S.gguf |
3.50 | 3.87 | 26.9 GB | Recommended |
| Extra | Contents |
|---|---|
mmproj-qwen4-35b-a3b-uncensored-BF16.gguf |
Vision encoder + projector (BF16) for image input |
mtp-qwen4-35b-a3b-uncensored-BF16.gguf |
Multi-token-prediction head for speculative decoding |
mtp-qwen4-35b-a3b-uncensored-Q8_0.gguf |
Multi-token-prediction head for speculative decoding |
llama-cli -m qwen4-35b-a3b-uncensored-NU-IQ3_S.gguf -ngl 99 -p "Your prompt"
# vision
llama-mtmd-cli -m qwen4-35b-a3b-uncensored-NU-IQ3_S.gguf --mmproj mmproj-qwen4-35b-a3b-uncensored-BF16.gguf --image photo.jpg -p "Describe this image."
Method
Produced with Apostate's diode method: conditional directional abliteration baked into ordinary weights. There is no finetune, adapter, runtime hook or trust_remote_code.
Each edited layer gets one gated neuron. Its gate reads a refusal detector and fires only above a threshold calibrated on harmless prompts (target: 0.2% of harmless tokens), and its output subtracts the residual refusal direction. On harmless input the detector stays below threshold, the neuron is silent, and the layer computes its original function. 11 layers carry a neuron (layers 12–30, except 15, 19, 22, 24, 25, 27, 28, 30).
Qwen4-35B-A3B needed several architecture-specific changes, now in Apostate (#17, #18):
- MoE: the neuron lives in each layer's dense shared expert, which every token passes through. The routed experts are untouched. The shared expert is widened from 512 to 544 neurons rather than having a neuron overwritten: the new neuron takes slot 512, the other new slots are zero, and every original weight is byte-identical (overwriting one neuron alone cost 0.053 KL).
- Gate calibration: on Qwen4's hyper-connection inputs the gate's reference dimension varies by 20–55%, so the threshold is calibrated on the firing ratio itself. Layers where that reference changes sign are skipped.
- Hyper-connections: the 4 parallel residual streams are folded into the 2048-wide space the MLP writes to.
- Size: the ~41 GB per-layer n-gram (PLE) table stays in CPU RAM while fitting, and the edit is baked shard by shard. Only the 5 shards holding shared experts differ from the base checkpoint. The vision tower is byte-identical to the base model's; the MTP head's shared expert is zero-padded to the new width.
Strength 24.0, κ 16.0.
Results
Measured on 128 held-out harmful prompts (harmful_behaviors test split + JailbreakBench) and 128 held-out harmless prompts. These were never used for fitting. Delivery is scored by the HarmBench classifier (cais/HarmBench-Llama-2-13b-cls) on the first 32 generated tokens: it counts a response only when those tokens already deliver the requested behavior. That is stricter than a refusal-keyword check, because many answers that start complying (headers, an outline) are still scored as non-delivered. KL is float32 KL(base‖edited) over every token position of the harmless prompts.
| Metric | Base | This model |
|---|---|---|
| HarmBench delivery | 0.8% | 57.0% |
| Harmless KL (nats) | 0.000 | 0.019 |
KL was measured with the routed experts in 4-bit NF4 and the shared experts in bf16 on both sides. Loading the base weights twice and scoring them against each other gives exactly 0.000, so the 0.019 is the edit's own shift. For comparison, the first build of this model (diode before the Qwen4 fixes below) measured 0.135 KL at 38.3% delivery, and Apostate's Qwen3.6-27B release measured 0.159 KL.
Most remaining non-deliveries are soft deflections rather than refusals: the answer starts, then steers to a safe reading of the request.
License and use
Apache-2.0, inherited from Qwen/Qwen4-35B-A3B. This is a research artifact with safety alignment removed: it will answer harmful requests, and you are responsible for how you use it.