license: apache-2.0
license_link: https://huggingface.co/Qwen/Qwen4-35B-A3B/blob/main/LICENSE
base_model: OpenUncensored/Qwen4-35B-A3B-Uncensored
base_model_relation: quantized
library_name: mlx
pipeline_tag: image-text-to-text
tags:
- mlx
- omlx
- oq
- quantized
- 4-bit
- mtp
- qwen4
- qwen4_moe
- moe
- uncensored
- abliterated
Qwen4-35B-A3B-Uncensored-oQ4e-mtp (MLX)
A 4-bit MLX build of OpenUncensored/Qwen4-35B-A3B-Uncensored
(a refusal-ablated edit of Qwen/Qwen4-35B-A3B), quantized with
oMLX oQ4e and with the native MTP head kept, so multi-token-prediction
speculative decoding works on Apple Silicon.
As of 2026-12-04, the other MTP-capable MLX builds of Qwen4-35B-A3B we could find are made from the stock (refusing) model,
and the uncensored MLX build we found does not keep the MTP head. This build has both.
[!WARNING]
This model has its refusal behaviour removed. It will answer requests that the original model declines.
You are responsible for how you use it and for complying with the law and with the
Qwen license. Do not deploy it for end users without your own safeguards.
Choosing a build
All five builds are from the same pipeline (oMLX v0.8.5 oQ*e, MTP head kept or grafted) and were measured the same way:
Mac Studio M5 Max 128 GB, oMLX with native kernels, one request at a time, short contexts, thinking off, median decode
speed over 3 prompts × 2 runs. All five passed our internal 9-case task check (9/9, 0 refusals).
| Build | Ablation | Disk | Memory while serving | Decode, MTP off → on | Suggested Mac |
|---|---|---|---|---|---|
| Uncensored-oQ3e-mtp | OpenUncensored | 30.9 GB | ≈30 GB (est.) | 143 → 160 tok/s | 48 GB+ |
| Uncensored-oQ4e-mtp | OpenUncensored | 35.2 GB | 34 GB (measured) | 139 → 175 tok/s | 64 GB+ |
| Uncensored-oQ5e-mtp | OpenUncensored | 41.9 GB | ≈41 GB (est.) | 129 → 156 tok/s | 64 GB+ |
| Heretic-oQ4e-mtp | Heretic | 35.2 GB | ≈34 GB (est.) | 134 → 174 tok/s | 64 GB+ |
| Heretic-oQ6e-mtp | Heretic | 48.5 GB | 47 GB (measured) | 122 → 151 tok/s | 96 GB+ |
- Memory is the oMLX process footprint with the n-gram (PLE) table resident, at short context; long contexts need more
for the KV cache. "est." means we did not record the footprint for that build; it is the size on disk minus about 1 GB,
which is how the measured builds behaved. - Suggested Mac assumes macOS's default GPU memory limit (about 75% of RAM): 48 GB → ~36 GB usable, 64 GB → ~48 GB,
96 GB → ~72 GB. You can raise the limit withsudo sysctl iogpu.wired_limit_mb=...at your own risk. - Smaller is not faster here. Decode on Apple Silicon is mostly memory-bound, but with MTP the draft acceptance also drops
as precision drops, so oQ3e ends up slower than oQ4e with MTP on. oQ4e is the balanced pick; oQ3e only if it is the one that fits. - If oMLX's memory guard is set below what the build needs, it moves the n-gram table to SSD, and decode gets about 2.5×
slower. Leave a few GB of headroom.
What was done
| Step | Detail |
|---|---|
| Source | OpenUncensored/Qwen4-35B-A3B-Uncensored BF16 (113.6 GB). All 36 safetensors checked against the published SHA-256 |
| Custom code | *_qwen4.py, qwen4_detector.py, tokenizer and config files are byte-identical to Qwen/Qwen4-35B-A3B (git blob hashes compared) |
| Not included | The source's edit.safetensors / edit.pt (the ablation basis). The edit is already merged into the source weights, so these files are not needed |
| Quantizer | oMLX v0.8.5, quantize_oq_streaming, level 4, oQe (enhanced), group size 64, preserve_mtp=True, trust_remote_code=True |
| Calibration | oQe imatrix, 1024 samples × 512 tokens (built-in oqe_code_multilingual set), followed by oQe output-error refinement over all 40 layers |
| Result | ≈4.96 bits/weight (oMLX estimate), 33 GB on disk, 7 shards. Mixed precision across 753 per-layer overrides. MTP head kept (76 tensors). The n-gram (PLE) table is included in the weights |
| Time | 8.9 min on a Mac Studio (M5 Max, 128 GB) with a cached imatrix. Collecting the imatrix the first time took about 15 min more |
oMLX note: we ran the quantizer directly, not through the admin API, because the admin API in v0.8.5 does not forward trust_remote_code.
We also changed one line locally: _refine_oqe_streamed now passes trust_remote_code to the tokenizer loader. Without it, oQe refinement
fails on checkpoints that ship custom tokenizer code. Neither change affects how the weights are computed.
Usage (oMLX)
omlx serve --model-dir /path/to/models # put this repo in a subfolder
In the oMLX model settings, turn on Trust Remote Code: the Qwen4 tokenizer and chat rendering run Python code shipped
in this repo. Turn on MTP for speculative decoding. We tested only oMLX v0.8.5, not plain mlx-lm or mlx-vlm.
Our test results
Hardware: Mac Studio, Apple M5 Max, 128 GB, macOS 27.2. Server: oMLX v0.8.5, single request, memory guard set to a 48 GB
ceiling (n-gram table resident, not offloaded to SSD). Thinking was off for every test. We measured twice: first without oMLX's
native custom kernels, then with them (make kernels, which needs Xcode's Metal Toolchain). With the kernels built, oMLX uses
its "Lightning MTP" path.
Decode speed (streaming, tokens after the first ÷ time)
Three prompts (a Traditional Chinese technical explanation, a Python coding task, a Traditional Chinese short essay), each run twice,max_tokens 1024, temperature 0.2.
| Setting | Chinese explanation | Python code | Chinese essay | Median |
|---|---|---|---|---|
| MTP off | 137–138 tok/s | 138 tok/s | 138 tok/s | 138.8 tok/s |
| MTP on, stock MLX kernels | 109 / 172 tok/s | 195–199 tok/s | 125–128 tok/s | 149.9 tok/s |
| MTP on, oMLX native kernels (Lightning MTP) | 171–179 tok/s | 194–205 tok/s | 144–146 tok/s | 175.4 tok/s |
With the native kernels, MTP is about 26% faster than MTP off overall: about 45% on code and about 5% on free-form Chinese
prose. Without the kernels, MTP made Chinese prose about 8% slower, so build them if you use MTP. Draft acceptance in the
server log was about 57% with the kernels and 49% without. Peak process memory with the model loaded was 34 GB.
Task benchmark (our internal 9-case set)
Our set targets internal reverse-engineering and security-analysis work. It has three disassembly or pseudo-code explanations
(CRC32, RC4, XOR string decryption), three security-concept explanations (two of them are prompts that refusing models
usually decline), two tool-calling cases and one Chinese instruction-following case. The system prompt asks for Traditional
Chinese. Temperature 0.2.
| Model (same machine) | Passed | Refusals | Simplified-Chinese chars | Median gen speed | Total time |
|---|---|---|---|---|---|
| This model, oQ4e + MTP (oMLX) | 9/9 | 0 | 2 | 164.6 tok/s | 57.8 s |
| Qwen3.8-27B uncensored (RVN), GGUF Q5_K_M + DFlash2 draft (llama.cpp) | 9/9 | 0 | 0 | 55.6 tok/s | 268.0 s |
- Refusals: none in 9 cases. The upstream card warns that 4-bit quantization of the edited routed experts might weaken the
edit. Our sample is small (only two dedicated refusal probes), so we have not ruled that out. If you need a reliable number,
measure refusals on your own prompt set. - Language: in one answer, two words came out in Simplified characters ("经典", "实战") inside otherwise Traditional Chinese text.
- The two models' speeds come from different engines and measure slightly different things: llama.cpp reports decode speed,
and oMLX here is completion tokens ÷ request time. Compare the total-time column for an end-to-end view.
Credits and license
- Base model: Qwen/Qwen4-35B-A3B, Apache 2.0, by the Qwen team.
- Refusal ablation: OpenUncensored/Qwen4-35B-A3B-Uncensored, Apache 2.0.
- Quantization: oMLX oQ / oQe.
- This repo is a modified (quantized) derivative of the above and is distributed under Apache 2.0. See
LICENSE.
Changes from the source: weights requantized to oQ4e mixed precision (MLX affine), MTP head kept,edit.*files removed,
this README replaced.