library_name: mlx
license: apache-2.0
base_model:
- OpenUncensored/Qwen4-35B-A3B-Uncensored
- mlx-community/Qwen4-35B-A3B-oQ6e-mtp
- Qwen/Qwen4-35B-A3B
base_model_relation: quantized
pipeline_tag: image-text-to-text
tags: - mlx
- oq
- quantized
- qwen4_moe
- mtp
- uncensored
- abliterated
- omlx
Qwen4-35B-A3B-Uncensored-oQ6e-mtp
[!WARNING]
This model needs Trust Remote Code. Its tokenizer and chat rendering run Python code shipped in this repository (encoding_qwen4.py,processing_qwen4.py,tokenization_qwen4.py), so enable Trust Remote Code in oMLX before loading it.
Mixed-precision MLX (oQ6e-mtp) port of OpenUncensored/Qwen4-35B-A3B-Uncensored built via surgical rank-2 orthogonal refusal-subspace fusion from OpenUncensored/Qwen4-35B-A3B-Uncensored-LoRA onto mlx-community/Qwen4-35B-A3B-oQ6e-mtp.
Memory & oMLX 0.8.5 Loading Modes
| Loading mode | Weights in memory |
|---|---|
| N-gram table in memory (default) | 48.7 GB / 45.4 GiB |
SSD N-gram Offload on (oMLX 0.8.5+) |
30.8 GB / 28.7 GiB (30.98 GB / 28.86 GiB measured live with KV/runtime overhead) |
The 17.9 GB / 16.690 GiB 20B n-gram embedding table can stay on SSD with SSD N-gram Offload enabled in oMLX (qwen4_ple_ssd_offload: true), preserving full 2B MTP speculative decoding and BF16 Vision Encoder support while fitting cleanly on 36 GB–64 GB Apple Silicon Macs.
Surgical Ablation Fusion & Mathematical Verification
Rather than uniformly requantizing all 56.823B weights (which would disturb the untouched BF16 vision tower, 20B PLE n-gram table, MTP head, and layers 0..7 / 34..39), all 156 LoRA adapter tensors (rank = 2, lora_alpha = 2, scaling = 1.0) from OpenUncensored/Qwen4-35B-A3B-Uncensored-LoRA were unpacked, dequantized to float32, fused (W' = W + B @ A = W - 1.5 U U^T W), cast to bfloat16, and requantized to the exact base group sizes and bit widths across the 78 modified tensors in layers 8..33 (shards 00004..00009 of 10):
| Component group | Target projections | MLX Quant Spec | Matrices Verified | Post-Requant Orthogonal Projection cos(-B^T W, B^T W') | Norm Ratio ||B^T W'|| / ||B^T W|| |
|---|---|---|---|---|---|
| Dense residual writers (layers 8..33) | linear_attn.out_proj, self_attn.o_proj, mlp.shared_expert.down_proj (52 tensors) | 8-bit (gs=64 attn, gs=128 shared expert) | 52 | min = 0.99932 | 0.4992 .. 0.5009 |
| Routed MoE down projections (layers 8..33) | mlp.switch_mlp.down_proj (26 tensors × 256 experts) | 6-bit (gs=64) | 6,656 | Whole-tensor pool min = 0.99279; 6,655/6,656 slices >= 0.98751 (1 rare outlier L09 e101 = 0.93749 from base 6-bit drift, alignment 0.99344) | 0.4724 .. 0.5018 |
| Untouched components | Shards 00001..00003, 00010 (emb, 20B PLE N-gram, BF16 Vision, MTP, layers 0..7, 34..39) | Byte-identical copy | All | Unchanged byte-for-byte | 1.0000 |
Real-Hardware Verification (oMLX 0.8.5, Apple M3 Max, SSD N-gram Offload + MTP On)
- Cold Load Time:
11.53 s(model_type: qwen4_moe,config.model_type: qwen4_moe,actual_size: 30,984,201,864 B/28.86 GiB) - Coding & Coherence (
reasoning_effort: low,max_tokens: 700):TTFT = 0.49 s,176.49 prompt tok/s,100.45 generation tok/s(475completion tokens,finish_reason: stop) — clean thread-safeTTLLRUCachewithRLock,OrderedDict, and assertions. - Vision Understanding (
1167prompt tokens with image table,reasoning_effort: low):TTFT = 1.74 s,670.94 prompt tok/s,93.02 generation tok/s(finish_reason: stop) — accurately extracted and cross-verified all exact numeric table cells (28.7,64.8,94.5,16.7). - Dual-Use Security Education (
reasoning_effort: low,max_tokens: 600):TTFT = 0.41 s,245.58 prompt tok/s,81.69 generation tok/s— direct SQL injection mechanics demonstration and parameterized?remediation without preachy refusals or repetition loops.
Storage & Quantization Distribution
Identical mixed-precision bit allocation to mlx-community/Qwen4-35B-A3B-oQ6e-mtp (48.723 GB / 45.377 GiB across 25 repo files, 10 safetensors shards):
- Language backbone (
35.038B):29.192 GB / 27.187 GiB(6-bit g64routed/dense base +8-bit g64/g128sensitive residual/attention tensors + BF16 norms/scales) - N-gram embedding (
20.480B):17.920 GB / 16.690 GiB(Affine6-bit,g32— offloadable to SSD) - Vision encoder (
0.447B):0.893 GB / 0.832 GiB(BF16) - MTP head (
0.859B):0.711 GB / 0.663 GiB
Credits & Upstream Provenance
- Base Foundation Model: Qwen/Qwen4-35B-A3B
- Uncensored Orthogonal Ablation & Official Rank-2 LoRA: OpenUncensored/Qwen4-35B-A3B-Uncensored & OpenUncensored/Qwen4-35B-A3B-Uncensored-LoRA
- oQ6e-mtp Mixed-Precision Base Quantization & oMLX: mlx-community/Qwen4-35B-A3B-oQ6e-mtp & jundot/omlx
License
Apache 2.0, following the upstream base model and quantization sources.