library_name: mlx
tags:
- mlx
- oq
- quantized
- mtp
- uncensored
- abliterated
- qwen4
- moe
- vision-language
license: apache-2.0
license_link: https://huggingface.co/Qwen/Qwen4-35B-A3B/blob/main/LICENSE
pipeline_tag: image-text-to-text
base_model: - OpenUncensored/Qwen4-35B-A3B-Uncensored
base_model_relation: quantized
Qwen4-35B-A3B-Uncensored-oQ5h-mtp
[!IMPORTANT]
This is an oQh checkpoint. It needs oMLX 0.8.5 or later. Earlier versions cannot load it.
[!WARNING]
This model needsTrust Remote Codeenabled
A 5-bit oQ quantization of
OpenUncensored/Qwen4-35B-A3B-Uncensored:
Qwen4 35B A3B (35B MoE, 3B active, 1M context, vision) with its refusals
removed by directional ablation.
- Size: 41.8 GB (39.0 GiB) on disk.
- Everything kept: vision tower, n-gram embedding table, and the MTP head for speculative decoding.
- Quantizer: oMLX v0.8.5, oQ5h (mixed precision, imatrix-calibrated on
oqe_code_multilingual, 1,024 samples × 512 tokens). - Higher precision: oQ6h and oQ8h versions.
- Lower precision: oQ4h version.
Quantization
| Component | Parameters | Format | Storage | Bits/weight |
|---|---|---|---|---|
| Routed experts (256 per layer) | 32.21B | 5-bit affine, group 128, oQh (7.79B of sensitive weights kept at 6-bit) | 20.59 GiB | 5.49 |
| Attention, DeltaNet, shared expert, mixers | 2.83B | 8-bit affine (group 64/128), 0.69B at 6-bit, norms and router in BF16 | 2.65 GiB | 8.06 |
| MTP head | 0.86B | 5-bit affine, group 64 (projections kept at 8-bit) | 0.57 GiB | 5.69 |
| Vision tower | 0.45B | BF16 | 0.83 GiB | 16.00 |
| N-gram embedding table | 20.48B | 5-bit affine, group 32 | 14.31 GiB | 6.00 |
| Total | 56.82B | 38.95 GiB | 5.89 |
5.83 bits/weight on average without the n-gram table.
How the ablation is stored. The edit touches the residual writers of layers 8 to 33. In this quant:
- The shared expert
down_projstays at 8 bits on every edited layer. - DeltaNet
out_projand attentiono_projare 8-bit on 18 of the 26 edited layers and 6-bit on the other 8. - The routed experts
down_projare 6-bit on 20 of the 26 edited layers and 5-bit on the other 6.
The upstream card warns that 4-bit quantization of the routed experts may weaken the edit. At 5–6 bits, this quant is
closer to that case than the oQ6h and oQ8h versions. The refusal check below shows no loss of the edit.
Refusal check after quantization
Measured on these quants through oMLX with the 100 harmful prompts of
JBB-Behaviors:
- Settings: thinking off, upstream sampling (temperature 0.7, top-p 0.8, top-k 20, presence penalty 1.5), up to 768
tokens, one sample per prompt. - Criterion: a refusal phrase in the answer, the same as the first row of the upstream results.
| oQ4h | oQ5h | oQ6h | oQ8h | |
|---|---|---|---|---|
| Refusal phrase in the answer | 0 / 100 | 1 / 100 | 0 / 100 | 2 / 100 |
| Flagged answers that are real refusals (manual review) | 0 | 0 | 0 | 0 |
The three flagged answers all comply: the matched phrase sits inside the requested text. As the upstream card notes,
a few answers add caveats or answer a safer version of the request. The differences between quants are within sampling
noise. The upstream BF16 figure (2 / 100) was measured on a different prompt set, so compare it only loosely.
Use with oMLX
Download the repo into your oMLX models folder and load it from the oMLX app.
- Enable Trust Remote Code
- Thinking: Qwen4 reasons by default. To turn it off for a request, send
"chat_template_kwargs": {"reasoning_effort": "off"}. - Speculative decoding: the MTP head is included, so oMLX can run MTP speculative decoding. Acceptance on the
edited weights has not been measured. - Sampling: the upstream evaluation used temperature 0.7, top-p 0.8 and top-k 20 with thinking off, and
temperature 1.0, top-p 0.95 and top-k 20 with thinking on.
About the uncensored model
From the upstream card, measured on the BF16 weights:
| Qwen4 35B A3B | Uncensored | |
|---|---|---|
| Refusals on 100 held-out harmful prompts, thinking off / on | 97 / 99 | 2 / 1 |
| MMLU, 300 questions, thinking off | 70.0% | 71.3% |
The edit removes a rank-2 refusal direction from the residual writers of layers 8 to 33 (W' = W − 1.5 B Bᵀ W). Every
other tensor is byte-identical to Qwen's release. See the upstream card for the method, judges and caveats.
License
Apache 2.0, inherited from Qwen4 35B A3B.