license: apache-2.0
language:
- en
- zh
- ru
- uk
- multilingual
base_model: - OpenUncensored/Qwen4-35B-A3B-Uncensored
- Qwen/Qwen4-35B-A3B
base_model_relation: quantized
pipeline_tag: image-text-to-text
library_name: gguf
tags: - qwen4
- qwen4exp
- moe
- uncensored
- abliterated
- gguf
- mixed-precision
- imatrix
- 16gb-vram
- engram
- llama-cpp
Qwen4-35B-A3B-Uncensored-Smart-16GB-GGUF
Mixed-precision, imatrix-optimized GGUF quantization of OpenUncensored/Qwen4-35B-A3B-Uncensored (all 256 experts intact, no expert pruning) engineered specifically for 16 GB VRAM GPUs with room for 32K context.
Quantized in a single direct pass from the original BF16 safetensors (revision: 0b86787a3396095bc19ab2746ac58040ee53cc01) using llama.cpp b13023 (--target-size Lagrangian bit allocation + unsloth/Qwen4-35B-A3B-GGUF 381K-token importance matrix with 100% expert coverage) and packaged as a native 2-split GGUF so the 10.73 GiB Per-Layer Token Embedding (PLE / Engram) table stays lazy-mapped in host memory (0 MiB VRAM).
Key Highlights
- Fits 16 GB VRAM with 32K context:
12.73 GiB(13,035 MiB) GPU model weights;13.73 GiBtotal VRAM at32Kcontext (q8_0KV + Flash Attention) or14.10 GiBat32Kcontext (F16KV). - Zero 1-bit or sub-
IQ2_Stensors: Everyffn_down_expsexpert tensor across all 40 layers is kept at 3–4 bits (2 × IQ4_XS,37 × IQ3_S,1 × IQ3_XXS), whileffn_gate_expsandffn_up_expssit atIQ2_S/IQ3_XXS— eliminating theIQ1_S/IQ1_M/IQ2_XXSdegradation common in tighter 12 GB packs. - Protected non-expert core: Attention (
K/VatQ8_0,Q/OatQ6_K, QKV gates atQ5_K), DeltaNet/SSM projections (BF16/Q6_K), hyper-connections (Q8_0), shared experts (Q8_0), PLE key/value projections (Q8_0),output.weightand CPU-mappedtoken_embd.weight(Q6_K), plus all norms and routers inF32. - Verified vision support: Includes
mmproj-Qwen4-35B-A3B-Uncensored-BF16.gguf(861 MiB), tested end-to-end withllama-mtmd-cli. - Reproducible: Includes
recipes/core_pins.txtandrecipes/pins_Smart-16GB-MaxQ.txt(all 557 explicit tensor assignments).
Included Files
| File | Size | Purpose |
|---|---|---|
Smart-16GB-MaxQ/Qwen4-35B-A3B-Uncensored-Smart-16GB-MaxQ-00001-of-00002.gguf |
13.13 GiB (14.10 GB) | Shard 1/2: 881-tensor 35B MoE trunk (3.2160 BPW), GPU weights + CPU-mapped token_embd |
Smart-16GB-MaxQ/Qwen4-35B-A3B-Uncensored-Smart-16GB-MaxQ-00002-of-00002.gguf |
10.73 GiB (11.52 GB) | Shard 2/2: per_layer_token_embd.weight (IQ4_NL, lazy CPU mmap, 0 MiB VRAM) |
mmproj-Qwen4-35B-A3B-Uncensored-BF16.gguf |
861 MiB (903 MB) | Vision encoder / multimodal projector (BF16/F32) |
recipes/core_pins.txt |
372 B | Core tensor-type pin rules passed to llama-quantize |
recipes/pins_Smart-16GB-MaxQ.txt |
20 KB | Complete per-tensor quantization map (557 pinned/quantized tensors) |
LICENSE |
11.5 KB | Apache License 2.0 |
Keep both GGUF shards in the same directory and pass only 00001-of-00002.gguf to llama.cpp; the second shard loads automatically via native GGUF split metadata.
Tensor Precision Breakdown
Total trunk size: 881 tensors (35.04B parameters, 3.2160 BPW) + 1 PLE tensor in shard 2.
| Tensor Group | Count | Precision | Placement |
|---|---|---|---|
| Norms, MoE routers, biases, scales | 324 | F32 |
GPU |
ssm_beta_alpha, ple_conv1d, indexer.{k,q}_proj |
51 | BF16 |
GPU |
hc_*, output_hc_*, *_shexp, ple_key, ple_value, attn_k, attn_v |
304 | Q8_0 |
GPU |
output.weight, attn_q, attn_output, ssm_out |
51 | Q6_K |
GPU |
token_embd.weight |
1 | Q6_K |
CPU mmap (0 VRAM) |
attn_qkv_gate |
30 | Q5_K |
GPU |
ffn_down_exps (40 MoE layers) |
40 | 2 × IQ4_XS, 37 × IQ3_S, 1 × IQ3_XXS |
GPU |
ffn_up_exps (40 MoE layers) |
40 | 6 × IQ3_XXS, 34 × IQ2_S |
GPU |
ffn_gate_exps (40 MoE layers) |
40 | 1 × IQ3_XXS, 39 × IQ2_S |
GPU |
per_layer_token_embd.weight (shard 2) |
1 | IQ4_NL |
Lazy CPU mmap (0 VRAM) |
Measured VRAM Footprint
Measured on an NVIDIA RTX 5080 16 GB (15,977 MiB usable) with llama.cpp b13023 (Vulkan backend, -ngl 99, all 41/41 layers offloaded to GPU):
| Configuration | GPU Weights (Vulkan0) |
Total GPU VRAM | Free VRAM on 16 GB | CPU-Mapped (0 VRAM) |
|---|---|---|---|---|
ctx = 4096, F16 KV |
13,035 MiB (12.73 GiB) | 13,726 MiB (13.40 GiB) | ~2,250 MiB | 10,987 MiB PLE + 398 MiB token_embd |
ctx = 32768, q8_0 KV, -fa on |
13,035 MiB (12.73 GiB) | 14,060 MiB (13.73 GiB) | ~1,916 MiB | 10,987 MiB PLE + 398 MiB token_embd |
ctx = 32768, F16 KV, -fa on |
13,035 MiB (12.73 GiB) | 14,434 MiB (14.10 GiB) | ~1,542 MiB | 10,987 MiB PLE + 398 MiB token_embd |
Benchmarks
Evaluated locally with identical llama.cpp b13023 settings (reasoning_effort=off, temperature=0, official chat template) against the 12 GB mixed-precision reference (ahpah/Qwen4-35B-A3B-Uncensored-Smart-12GB-GGUF, MaxQ variant):
| Benchmark | Smart-16GB-MaxQ (this repo) | Smart-12GB-MaxQ (ahpah) |
|---|---|---|
| WikiText-2 Perplexity (20 × 512 tokens) ↓ | 8.2799 ± 0.3143 |
9.7150 ± 0.3869 |
| MMLU-285 (5 × 57 subjects, non-thinking) ↑ | 79.30% (226/285, 79.86% on parsed) |
78.25% (223/285, 78.52% on parsed) |
HumanEval-40 (pass@1, non-thinking) ↑ |
90.0% (36/40) |
92.5% (37/40) |
| Benign sensitive prompts (6 prompts, false refusals) ↓ | 0 / 6 |
0 / 6 |
| Strict JSON formatting | Pass | Pass |
| Multilingual (Russian & Ukrainian) | Clean RU and UK without English leaks or code-switching | English word leaks in RU (smallest, greater) and mixed Latin/Cyrillic tokens in UK |
Vision (mmproj via llama-mtmd-cli) |
Pass (193 ms image encode, exact shape/color/position recall) |
Supported |
Why full 256 experts instead of 50% REAP expert pruning? Before choosing this build, we also pruned OpenUncensored/Qwen4-35B-A3B-Uncensored down to 128 experts (Q4_K_M) and ran the exact same test suite. Pruning half the experts degraded WikiText-2 to 13.6015 ± 0.5607 and MMLU-285 to 59.30% (169/285). Keeping all 256 experts with imatrix mixed-precision quantization outperformed both the pruned Q4_K_M model and the 12 GB quantization on perplexity, MMLU, and multilingual fluency.
Usage (llama.cpp)
Requires a recent llama.cpp build with qwen4exp / PLE support (b13023 or newer).
Text-only server (32K context, recommended for 16 GB VRAM)
llama-server \
-m Smart-16GB-MaxQ/Qwen4-35B-A3B-Uncensored-Smart-16GB-MaxQ-00001-of-00002.gguf \
-ngl 99 \
-c 32768 \
-fa on \
-ctk q8_0 -ctv q8_0 \
--port 8080
Multimodal server (with vision mmproj)
llama-server \
-m Smart-16GB-MaxQ/Qwen4-35B-A3B-Uncensored-Smart-16GB-MaxQ-00001-of-00002.gguf \
--mmproj mmproj-Qwen4-35B-A3B-Uncensored-BF16.gguf \
-ngl 99 \
-c 16384 \
-fa on \
-ctk q8_0 -ctv q8_0 \
--port 8080
Note: On 16 GB cards, enabling
--mmprojuses additional VRAM for the vision encoder and image activations; start with-c 16384andq8_0KV cache when running vision workloads alongside desktop apps.
Limitations
- Refusal / safety evaluation: Abliteration behavior is inherited directly from
OpenUncensored/Qwen4-35B-A3B-Uncensored. We verified0/6false refusals on benign sensitive prompts after quantization, but did not re-run a full post-quantization HarmBench sweep. - No MTP head: Multi-Token Prediction (MTP) speculative draft tensors are excluded to keep the GPU footprint inside 16 GB VRAM.
- System RAM requirement: While the PLE table uses
0 MiBof VRAM, host RAM (16 GB minimum, 32 GB recommended) or fast NVMe storage is used for lazy memory-mapped lookups into shard 2. - Throughput: Generation speed depends on backend (CUDA vs Vulkan), host memory bandwidth for PLE lookups, and background GPU load; idle
tok/snumbers are omitted here because benchmark runs shared the GPU with desktop workloads.
Credits & License
Licensed under Apache 2.0, matching the upstream models.
- Abliterated base model:
OpenUncensored/Qwen4-35B-A3B-Uncensored(0b86787a3396095bc19ab2746ac58040ee53cc01) - Upstream architecture & weights:
Qwen/Qwen4-35B-A3Bby the Qwen team - Importance matrix:
unsloth/Qwen4-35B-A3B-GGUF(imatrix_unsloth.gguf_file, 381K tokens) - Mixed-precision core-pinning & 2-split PLE reference:
ahpah/Qwen4-35B-A3B-Uncensored-Smart-12GB-GGUF(Apache 2.0)