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
pipeline_tag: image-text-to-text
library_name: mlx
language:
- en
tags: - mlx
- omlx
- oq
- oqe
- apple-silicon
- qwen4
- moe
- vision-language
- uncensored
- abliterated
Qwen4-35B-A3B-Uncensored oQ2.5e (MLX)
An oQ2.5e quantization of OpenUncensored/Qwen4-35B-A3B-Uncensored
for Apple Silicon, made with oQe, the importance-matrix mode of the oQ quantizer in
oMLX 0.8.5. It is 27.8 GB, down from
113.7 GB in BF16, and keeps the vision encoder and the MTP head.
The smallest build, with the routed experts at 2.6 bits per weight. Expect it to drift furthest from the BF16 model. Pick it when memory is the limit, or when you stream experts from SSD and want each read to be smaller.
Uncensored model. The base model is Qwen4-35B-A3B with its refusals removed by directional
ablation (see the base model card). It answers
requests the stock model refuses. You are responsible for how you use it.
Builds
| Build | Size | Routed-expert bits per weight | Peak memory, 4K prompt |
|---|---|---|---|
| oQ2.5e (this repo) | 27.8 GB | 2.6 | 27.5 GB |
| oQ3e | 30.9 GB | 3.5 | 30.3 GB |
| oQ3.5e | 31.7 GB | 3.8 | 31.2 GB |
Bits per weight count the quantization scales and biases, so 3-bit weights at group size 64
come to 3.5. Peak memory is oMLX's "Peak MLX" reading from the MacBook Pro benchmarks below, with no offload, a
4,096-token prompt and 128 tokens generated. With expert and n-gram offload, every build ran on a
24 GB Mac mini at about 12.5 GB.
What's in this build
| Part | Size | Precision |
|---|---|---|
| Routed experts (40 layers × 256) | 10.60 GB | 2-bit, group size 64, with the down projection at 3-bit in 16 of 40 layers |
| N-gram lookup table | 12.80 GB | 4-bit, group size 32 |
| Attention, shared experts, routers, norms | 1.94 GB | Mixed, planned by oQ's per-layer sensitivity |
| Token embeddings and output head | 1.08 GB | Mixed, 8-bit where the budget allows |
| Vision encoder | 0.89 GB | BF16, not quantized |
| MTP head | 0.51 GB | 4-bit |
Each token reads only a few rows of the n-gram table. That is why the table can stay on SSD
(see Smaller Macs).
How it was made
- Source: OpenUncensored/Qwen4-35B-A3B-Uncensored, BF16.
- Quantizer: oMLX 0.8.5, oQ level oQ2.5 in oQe mode, with "Preserve MTP weights" on.
- Calibration: oMLX's built-in calibration text, run through the BF16 weights one layer at a
time, so no lower-precision copy stood in for the model. Each layer's quantization
sensitivity, which plans the bit widths, was measured on the BF16 weights the same way. - Importance matrix: collected from 1,024 sequences of 512 tokens and applied to
744 tensors. 3 tensors had no importance data and were rounded the plain oQ way:lm_head,input_mix_weight_down,input_mix_weight_up.
oQe keeps sampling until every routed expert has seen calibration tokens.
12 of 31,488 expert slots (an expert in one
projection) never did, so it ran to its 1,024-sequence limit; those slots carry no importance data. - Refinement: the output-error step ran on 722 tensors and cut their weighted output error by a further 9.5%. That figure is oMLX's own measure against the BF16 layers, not a quality benchmark.
- Tokenizer: Qwen's
tokenizer-compat/files (a standard BPE tokenizer and a Jinja chat
template) sit at the root in place oftokenization_qwen4.py, so loading needs notrust_remote_code. The vocabulary is the same. Qwen ships these files "for backward
compatibility only"; its native chat encoding needs the remote code. oq_imatrix_report.jsonin this repo is oMLX's full report for the build.
Use with oMLX
hf download MLXBits/Qwen4-35B-A3B-Uncensored-oQ2.5e-mlx --local-dir ~/.omlx/models/Qwen4-35B-A3B-Uncensored-oQ2.5e-mlx
Or find it in oMLX's model downloader. Built and tested with oMLX 0.8.5. oMLX ships its
own Qwen4 implementation; other MLX apps need Qwen4 (qwen4_moe) support of their own, and these
builds have not been tested in them.
- MTP: the head is included, so you can turn on Lightning MTP in the model's settings.
- Sampling: the base card's evaluation settings are temperature 0.7, top-p 0.8, top-k 20 and
presence penalty 1.5 with thinking off; temperature 1.0, top-p 0.95 and top-k 20 with thinking
on.generation_config.jsondefaults to the thinking-on values.
Smaller Macs
Fully in memory, this build peaks at about 28 GB. On a Mac with less, two experimental oMLX
settings can keep part of it on SSD:
- MoE Expert Offload keeps a share of each layer's experts in memory and reads the rest from
the safetensors files when the router picks them. - SSD N-gram Offload leaves the 12.8 GB n-gram table on SSD. oMLX estimates this
slows decoding by about 2.5×.
With both on, this build runs on a 24 GB Mac mini (M4 Pro), peaking at 12.5 GB and generating 26–38 t/s for a single request. See Mac mini, 24 GB.
Benchmarks
oMLX's built-in benchmark, oMLX 0.8.5, engine "Auto", one run per row. "1K" is a
1,024-token prompt and "4K" a 4,096-token prompt, each generating 128 tokens. Batching rows are
total generation t/s with 1K prompts.
MacBook Pro, 64 GB
On a MacBook Pro with an M5 Pro and 64 GB, fully in memory, with Lightning MTP on.
| Build | Prompt | Time to first token, 1K (ms) | Prompt t/s, 1K | Generation t/s, 1K | Generation t/s, 4K |
|---|---|---|---|---|---|
| oQ2.5e | Code (Python) | 449 | 2283 | 90.9 | 84.6 |
| oQ2.5e | Novel (English) | 429 | 2385 | 81.1 | 76.0 |
| oQ3e | Code (Python) | 476 | 2150 | 92.3 | 96.2 |
| oQ3e | Novel (English) | 447 | 2290 | 90.8 | 86.3 |
| oQ3.5e | Code (Python) | 495 | 2067 | 95.9 | 86.2 |
| oQ3.5e | Novel (English) | 482 | 2124 | 87.3 | 76.9 |
| Build | Prompt | 1 request | 2 requests | 4 requests |
|---|---|---|---|---|
| oQ2.5e | Code (Python) | 90.9 | 117.0 | 156.8 |
| oQ2.5e | Novel (English) | 81.1 | 114.2 | 153.6 |
| oQ3e | Code (Python) | 92.3 | 129.8 | 176.1 |
| oQ3e | Novel (English) | 90.8 | 149.2 | 187.1 |
| oQ3.5e | Code (Python) | 95.9 | 129.3 | 173.9 |
| oQ3.5e | Novel (English) | 87.3 | 128.2 | 188.6 |
Mac mini, 24 GB
On a Mac mini with an M4 Pro and 24 GB. None of the builds fit in its memory, so these runs used:
- MoE Expert Offload on, with the resident share set by oMLX's "Fit to memory" button, which
leaves about 4 GB for prompts. That kept 50–70% of the routed experts in memory: about 70% for
oQ2.5e, about 50% for oQ3.5e. - SSD N-gram Offload on. oMLX requires it here, because loading the table into memory would
pass its model-memory limit. - Lightning MTP on, oMLX's default for this model. The MTP head stays in memory while the
experts stream. - KV cache compression: TurboQuant, 8-bit.
| Build | Prompt | Time to first token, 1K (ms) | Prompt t/s, 1K | Generation t/s, 1K | Generation t/s, 4K | Peak memory, 4K |
|---|---|---|---|---|---|---|
| oQ2.5e | Code (Python) | 4964 | 206 | 27.1 | 25.5 | 12.5 GB |
| oQ2.5e | Novel (English) | 4134 | 248 | 38.2 | 32.2 | 12.5 GB |
| oQ3e | Code (Python) | 5192 | 197 | 18.3 | 19.4 | 12.5 GB |
| oQ3e | Novel (English) | 4446 | 230 | 34.4 | 27.4 | 12.5 GB |
| oQ3.5e | Code (Python) | 5115 | 200 | 20.8 | 23.5 | 12.6 GB |
| oQ3.5e | Novel (English) | 4537 | 226 | 24.8 | 25.8 | 12.6 GB |
| Build | Prompt | 1 request | 2 requests | 4 requests |
|---|---|---|---|---|
| oQ2.5e | Code (Python) | 27.1 | 47.9 | 75.5 |
| oQ2.5e | Novel (English) | 38.2 | 52.0 | 77.7 |
| oQ3e | Code (Python) | 18.3 | 31.7 | 51.5 |
| oQ3e | Novel (English) | 34.4 | 33.3 | 36.7* |
| oQ3.5e | Code (Python) | 20.8 | 30.5 | 49.0 |
| oQ3.5e | Novel (English) | 24.8 | 47.0 | 65.5 |
* Batching barely raised total speed for oQ3e with the Novel prompt. An earlier run did the same (49.2 t/s at 2 requests, 26.6 at 4), while every other row here gains 2–2.8× at 4 requests. The cause is unknown.
Only about 3B parameters are active per token, so in memory generation speed stays close across
builds. With expert offload the smallest build is the fastest: the memory budget is the same, so
a smaller build keeps a larger share of its experts resident and fewer tokens wait for an SSD
read. Which experts a text routes to matters too: code ran faster than prose on the MacBook Pro,
prose faster on the Mac mini. Each row is a single run, so treat small differences as noise.
Quality
Not measured. These builds have no perplexity, KL divergence or benchmark scores. The base
model's results (refusal rate, MMLU) are on its card and were measured in BF16. Lower oQ levels
store fewer bits per weight and are expected to drift further from the BF16 model, but no one has
measured by how much.
Credits
- Qwen: the base model, Apache-2.0.
- OpenUncensored: the refusal ablation.
- oMLX: the oQ quantizer and runtime.