license: apache-2.0
pipeline_tag: image-text-to-text
base_model:
- Qwen/Qwen4-35B-A3B
- Qwen/Qwen4-35B-A3B-FP8
base_model_relation: quantized
library_name: transformers
tags: - fp8
- gguf
- safetensors
- ud-q4_k_xl
- qwen4
- qwen4_moe
- uncensored
- abliterated
- vllm
- sglang
- llama.cpp
- strata
Qwen4-35B-A3B-Uncensored (FP8 Safetensors + Q8_0 GGUF + UD-Q4_K_XL GGUF)
Language: English | 简体中文
This repository ships three mathematically verified abliterated formats of Qwen/Qwen4-35B-A3B (Apache-2.0) in one place so every serving stack and VRAM tier (24 GB, 40 GB, 80–96 GB) works out of the box without interfering with each other:
- Native
FP8Safetensors (60.17 GB, 33 shards, repo root) — exactQwen/Qwen4-35B-A3B-FP8format (float8_e4m3fn,128×128blockF32weight_scale_inv, lossless BF16 attention/shared-expert layers) for vLLM / SGLang / Transformers / TensorRT-LLM on 80–96 GB Hopper / Blackwell / Ada GPUs (H100,H200,RTX 5090,RTX PRO 6000). - In-Place Binary
Q8_0GGUF (55.32 GiB+ untouchedmmproj-BF16&mtpheads, repo root) — exactggml-org/Qwen4-35B-A3B-GGUFformat for mainlinellama.cpp(with full vision + MTP support) andStrata(256Klosslessfp16KV + 2B MTP on 40 GB GPUs). - NEW: Zero-Double-Quant
UD-Q4_K_XLGGUF (33.75 GiB,UD-Q4_K_XL/folder) — exactunsloth/Qwen4-35B-A3B-GGUFdynamic-quant layout (23.02 GiBtrunk +10.73 GiBIQ4_NLPLE table), single-shot quantized directly from BF16 with 0% refusal (0/20), ~1–3% delta vsQ8_0,151–183 tok/son A100-40GB (30.3 GiBVRAM w/256K fp16 KV+ 2B MTP), and ideal for 24 GB GPUs (L4,RTX 4090,RTX 3090).
Method & Mathematical Verification
All three builds modify only the 78 residual-writing logical modules across layers 8..33 (linear_attn.out_proj, self_attn.o_proj, mlp.shared_expert.down_proj, mlp.experts.down_proj) using the Apache-2.0 rank-2 dual-mode (thinking + non-thinking) orthogonal refusal basis (edit.safetensors, $s = 1.5$) from OpenUncensored/Qwen4-35B-A3B-Uncensored. All other modules — layers 0..7, layers 34..39, the 20.5B per-layer n-gram table (per_layer_token_embd), MoE routers, gate_proj/up_proj, vision tower, and MTP speculative heads — remain 100% byte-identical to upstream releases.
1. Native FP8 Safetensors (Zero Double-Quantization)
- Base: Official
Qwen/Qwen4-35B-A3B-FP8(33shards;16shards untouched byte-for-byte). - 52 Attention & Shared-Expert Writers: Kept in lossless BF16 (max orthogonal drift =
0.001657). - 6,656 Routed Expert
down_projTensors: Single-shot quantized directly from BF16 into128×128blockfloat8_e4m3fn+F32weight_scale_inv. - Audit (
fp8_abliteration_report.json):mean_refusal_ratio = 0.500180(target0.5),mean_refusal_cos = -0.999391,mean_fp8_quant_rel_l2 = 0.02678,0NaN/Inf.
2. In-Place Binary Q8_0 GGUF
- Base: Official
ggml-org/Qwen4-35B-A3B-GGUF(Q8_0,hc_*/ssm_beta/ssm_alpha/ple_conv1dinBF16, stock KL vs BF16 =0.0359). - In-Place Edit: Only 78
Q8_0tensors (7.15 GiB / 55.32 GiB) edited via left-multiplicationW' = W - 1.5 * B (B^T W)and repacked toQ8_0(mean_refusal_ratio = 0.4993;804 / 882tensors untouched). - Untouched MTP Acceptance Drift Check:
37.91%(mean len 2.14) before edit →38.06%(mean len 2.14) after edit on x86-64 reverse-engineering (reasoning_effort=high).
3. Zero-Double-Quant UD-Q4_K_XL GGUF (UD-Q4_K_XL/)
- Base:
unsloth/Qwen4-35B-A3B-GGUF(UD-Q4_K_XL,23.02 GiBshard 1 +10.73 GiBuntouched shard 2IQ4_NLPLE). - Why accuracy barely drops: Unsloth's dynamic quant keeps all 52 attention / SSM / shared-expert residual writers in
Q8_0and all 26 middle-layer expertffn_down_expstensors in18 × Q6_K + 8 × Q5_K(833 other tensors stay byte-identical). - Single-Shot GGML C Quantization + Exact GatedDeltaNet V-Head Permutation: Streamed directly from
OpenUncensoredBF16 into GGML's referenceggml-quants.c(Q8_0/Q6_K/Q5_K) with the exactllama.cppGatedDeltaNetssm_out.weightV-head transpose(2048, 16, 2, 128) → (2048, 2, 16, 128). - Triple-Gate Audit (
UD-Q4_K_XL/Qwen4-35B-A3B-UD-Q4_K_XL-00001-of-00002.gguf.abliterated.json):mean_refusal_ratio = 0.499984(0.49967 ~ 0.50041)mean_refusal_cos = -0.999898min_orth_cos = 0.99999(orthogonal non-refusal component matches upstream GGUF to 5 nines across all 78 tensors)
Benchmarks (Full 4-Way Comparison on NVIDIA A100-SXM4-40GB)
All builds were evaluated live on identical slices and prompts. Full structured metrics are in benchmarks.json.
| Benchmark | Official Stock Q8_0(Strata pre-MTP) |
Abliterated FP8(vLLM 0.35.0rc1) |
Abliterated Q8_0( llama.cpp / Strata) |
Abliterated UD-Q4_K_XL(Strata Full + 2B MTP) |
|---|---|---|---|---|
A100 VRAM (256K ctx) |
~39.0 GiB (fp16 KV) |
37.0 GiB (8GB offload) | 39.0 GiB (fp16 KV, Strata)38.2 GiB ( 96K q8_0, llama.cpp) |
30.3 GiB (fp16 KV, 100% resident) |
Prose Speed (off, 400t) |
55.7 tok/s | 5.5–6.8 tok/s (1-seq) | 70.4 tok/s (Strata+MTP) 62.3 tok/s (llama.cpp+MTP) |
151.4 tok/s (2.15×) |
Code Speed (off, 400t) |
— | — | 78.3 tok/s (Strata+MTP) | 168.2 tok/s (2.15×) |
Thinking Speed (low/high) |
60.2–88.4 tok/s | ~16–24 tok/s (4-seq agg) | 91.9 tok/s (Strata+MTP) | 159.5 – 182.7 tok/s |
16K Needle (15,453 tok) |
PASS (4.72s, 3,274/s) |
— | PASS (4.78s, 3,233/s) |
PASS (3.36s, 4,600/s) |
HumanEval-30 (low) |
30/30 (100.0%) |
30/30 (100.0%) |
30/30 (100.0%) |
29/30 (96.67%) |
GSM8K-40 (low) |
40/40 (100.0%) |
39/40 (97.5%) |
39/40 (97.5%) |
38/40 (95.0%) |
MMLU-100 (low, 5 subj) |
92/100 (92.0%) |
92/100 (92.0%) |
89/100 (llama.cpp)87/100 (Strata) |
89/100 (89.0%) |
MATH-500-30 (high, strict) |
26/30 (86.67%) |
22/30 (73.33%) |
23/30 (llama.cpp)24/30 (Strata, 80.0%) |
23/30 (76.67%) |
JBB Harmful Refusal (off) |
20/20 (100.0%) |
0/20 (0.0%) |
0/20 (0.0%) |
0/20 (0.0%) |
JBB Harmful Refusal (low) |
8/20 (40.0%) |
0/20 (0.0%) |
— | 0/20 (0.0%) |
| JBB Benign Over-Refusal | 2/10 / 2/10 |
0/10 / 0/10 |
0/10 |
0/10 / 0/10 |
MMLU-100 Per-Subject Breakdown (thinking=low)
| Subject | Official Stock Q8_0 |
Abliterated FP8 |
Abliterated Q8_0 (llama.cpp / Strata) |
Abliterated UD-Q4_K_XL |
|---|---|---|---|---|
high_school_mathematics |
20/20 (100%) | 20/20 (100%) | 20/20 / 20/20 | 19/20 (95%) |
college_computer_science |
18/20 (90%) | 19/20 (95%) | 16/20 / 17/20 | 18/20 (90%) |
computer_security |
19/20 (95%) | 18/20 (90%) | 18/20 / 18/20 | 18/20 (90%) |
electrical_engineering |
17/20 (85%) | 18/20 (90%) | 17/20 / 15/20 | 17/20 (85%) |
machine_learning |
18/20 (90%) | 17/20 (85%) | 18/20 / 17/20 | 17/20 (85%) |
NVIDIA L4-24GB (sm_89, 72W TDP, 300 GB/s) — Strata Stage 6 Native 1M Context + CPU Vision
Using our strata-l4-stage6/ bundle (UD-Q4_K_XL + 16 upstream PRs + 6 custom CUDA/memory patches including un-evictable 2 MiB HugePage anonymous-RAM PLE, CUDA DM16, zero-spill 4-stream gr_write+hc_inject, FP16 QSA Pass-1, CUDA fused QSA gate epilogue, STRATA_SPEC_COST=1, --lookup-chain 4, and 0 MiB GPU VRAM CPU vision strata-vision-own):
Metric (NVIDIA L4-24GB, 1,048,576 INT8 KV + CPU Vision) |
Stage 6 Live Production Result |
|---|---|
Short/Medium Decode (EN / ZH / Python / Thinking / HumanEval) |
85.2 / 87.3 / 104.5 / 103.5 / 107–126 tok/s |
Long-Context Decode (86K Prose / 78K Code-Edit / 138.5K Prose) |
87.65 / 131.62 / 86.35 tok/s |
Cold Prefill TTFT (3K / 16K / 86.4K / 138.5K) |
1.35s (2,382/s) / 5.41s (3,190/s) / 26.51s (3,258/s, 80K CLI 24.1s) / 36.50s (3,794/s) |
Warm Follow-up TTFT (86K / 138.5K) |
0.34s / 0.29s |
| Zero Quality Loss & Stability Gate | HumanEval 8/8 · GSM8K 8/8 · JSON PASS · 3K–138.5K Needle 4/4 PASS · OpenAI/Anthropic CPU Vision 2/2 PASS (+0 MiB VRAM) · 0 OOM |
Repository Files
| Format | Path | Size | Best For |
|---|---|---|---|
| FP8 Safetensors | model-00001-of-00033.safetensors … 00033 + config/tokenizer |
60.17 GB | vLLM / SGLang on 80–96 GB GPUs (H100 / H200 / RTX 5090 / PRO 6000) |
GGUF (Q8_0) |
Qwen4-35B-A3B-Q8_0.gguf |
55.32 GiB | llama.cpp (with vision) or Strata on 40–96 GB GPUs |
GGUF (UD-Q4_K_XL) |
UD-Q4_K_XL/Qwen4-35B-A3B-UD-Q4_K_XL-00001-of-00002.ggufUD-Q4_K_XL/Qwen4-35B-A3B-UD-Q4_K_XL-00002-of-00002.gguf |
23.02 GiB 10.73 GiB |
Strata (151–183 tok/s on A100-40G; 85–131 tok/s + 1M ctx on 24 GB L4) & llama.cpp |
| Strata L4 Stage 6 Bundle | strata-l4-stage6/ (patches/, bin-linux-x86_64-sm89/, mtp-rt-iq4nl/, expert-profile-learned.bin, strata_qwen4_l4.json, restore_l4_stage6.sh) |
~571 MiB | One-click 24 GB L4 (sm_89) 1M INT8 KV + CPU Vision production stack (16 PRs + 6 custom CUDA/HugePage-PLE patches) |
| GGUF Vision & MTP | mmproj-Qwen4-35B-A3B-BF16.ggufmtp-Qwen4-35B-A3B-Q8_0.gguf / mtp-Qwen4-35B-A3B-Q4_K_M.gguf |
0.84 GiB 1.88 / 1.20 GiB |
Official untouched vision tower & MTP heads (also packs to 563 MiB IQ4_NL MTP for Strata) |
| Audits & Benchmarks | fp8_abliteration_report.json, Qwen4-35B-A3B-Q8_0.gguf.abliterated.json, UD-Q4_K_XL/...abliterated.json, edit.safetensors, benchmarks.json |
~1.3 MiB | Full mathematical verification & 4-way benchmark records |
Quick Start
Option A: UD-Q4_K_XL (Fastest / Best for 24–40 GB GPUs)
Download only UD-Q4_K_XL (+ optional MTP head):
hf download miaomiao1233/Qwen4-35B-A3B-Uncensored-Q8-GGUF \
--include "UD-Q4_K_XL/*" --include "mtp-Qwen4-35B-A3B-Q8_0.gguf" \
--local-dir ./Qwen4-UD-Q4_K_XL
With llama.cpp mainline (24–40 GB GPU):
llama-server \
--model ./Qwen4-UD-Q4_K_XL/UD-Q4_K_XL/Qwen4-35B-A3B-UD-Q4_K_XL-00001-of-00002.gguf \
--spec-draft-model ./Qwen4-UD-Q4_K_XL/mtp-Qwen4-35B-A3B-Q8_0.gguf \
--spec-type draft-mtp --spec-draft-ngl all --spec-draft-n-max 3 --spec-draft-p-min 0 \
--parallel 1 --ctx-size 131072 --cache-type-k q8_0 --cache-type-v q8_0 \
--lazy-mode auto -ot per_layer_token_embd=CPU --n-gpu-layers all --flash-attn on \
--jinja --reasoning on --reasoning-effort high --reasoning-format deepseek
With Strata (151–183 tok/s on A100-40GB; 85–131 tok/s + native 1M ctx + CPU Vision on 24 GB L4):
- One-click 24 GB L4 (
sm_89) restore: Seestrata-l4-stage6/restore_l4_stage6.sh&strata-l4-stage6/README.md(prebuiltsm_89binary,patches/0001..0018, 183K EN+ZH+Code MTPmtp-rt-iq4nl, learned expert profile, andstrata_qwen4_l4.json). - 40 GB GPU (A100):
--max-context 262144 --kv fp16 --prefill 4096(30.3 GiBVRAM, compile with-DCMAKE_CUDA_ARCHITECTURES=80 -DSTRATA_Q6K_EXPERTS=ON).
Option B: Native FP8 with vLLM / SGLang (80–96 GB GPUs)
vLLMandSGLangautomatically load only theFP8.safetensorsshards listed inmodel.safetensors.index.jsonand ignore.gguffiles andUD-Q4_K_XL/.
vllm serve miaomiao1233/Qwen4-35B-A3B-Uncensored-Q8-GGUF \
--trust-remote-code --tensor-parallel-size 1 --max-model-len 262144
Download only FP8 Safetensors:
hf download miaomiao1233/Qwen4-35B-A3B-Uncensored-Q8-GGUF \
--exclude "*.gguf" --exclude "UD-Q4_K_XL/*" --exclude "edit.safetensors" \
--local-dir ./Qwen4-35B-A3B-Uncensored-FP8
Option C: Q8_0 GGUF with llama.cpp Mainline (Vision + MTP)
# 96 GB GPU (256K lossless f16 KV + GPU vision + mtp-Q8_0)
llama-server \
--model Qwen4-35B-A3B-Q8_0.gguf \
--mmproj mmproj-Qwen4-35B-A3B-BF16.gguf \
--spec-draft-model mtp-Qwen4-35B-A3B-Q8_0.gguf \
--spec-type draft-mtp --spec-draft-ngl all --spec-draft-n-max 3 --spec-draft-p-min 0 \
--parallel 1 --ctx-size 262144 --cache-type-k f16 --cache-type-v f16 \
--lazy-mode auto --image-min-tokens 1024 --n-gpu-layers all --flash-attn on \
--jinja --reasoning on --reasoning-effort high --reasoning-format deepseek
Note: Supported
reasoning_effortvalues on Qwen4 areoff,low,high(default), andxhigh(nomedium). Disable thinking per-request via{"chat_template_kwargs": {"enable_thinking": false, "reasoning_effort": "off"}}.
License
Apache 2.0 (inherited from Qwen/Qwen4-35B-A3B, Qwen/Qwen4-35B-A3B-FP8, ggml-org/Qwen4-35B-A3B-GGUF, unsloth/Qwen4-35B-A3B-GGUF, and OpenUncensored/Qwen4-35B-A3B-Uncensored).
Stage 7 Update (2026-12-05): Niko1221/Strata v0.2.27 + 29 PRs + DFlash2 Q8_0 (strata-l4-stage7/)
- Engine Bundle:
strata-l4-stage7/— built onNiko1221/Stratav0.2.27(f73230d) + 29 PRs (Qwen4 CUDA DFlash2#7927/#7929/#7999, native--kv nvfp4#7983,sm_89Q8 HC rounding fix#7924,kMaxBatch=256&G<=8 m8n8k16#7996,float4MoE combine#8038, inline thinking tool-call rescue#8073, plus all Stage 5/6 patches#7986–#7992), prebuilt Linux x86_64sm_89strata+ CPUstrata-vision-own, packeddf2-qwen4-q8.pack(RadixArk/Qwen4-35B-A3B-Dflash2), 183K EN+ZH+Codedraft_vocab_en_zh.bin, learned expert profile, sanitizedstrata_qwen4_l4.json, andrestore_l4_stage7.sh. - Verified Live Results on NVIDIA L4-24GB (
UD-Q4_K_XL, 1Mint8KV + CPU Vision, 100% Lossless):- Decode: EN
93.0 tok/s| ZH91.1 tok/s| Python133.6 tok/s| Thinking (low)160.7 tok/s| GSM8K137.6–155.8 tok/s| HumanEval182.6–200.9 tok/s| Long-Ctx Code-Edit Lookup167.8 tok/s - Cold Prefill & Warm TTFT: 86K
25.36s(3,410 tok/s) / warm0.25s| 138.7K35.28s(3,930.3 tok/s) / warm0.29s - Gates: HumanEval
4/4, GSM8K4/4, JSON, 86K & 138.7K Needle2/2, OpenAI & Anthropic CPU Vision2/2(+0 MiBGPU VRAM,22,302 / 23,034 MiB,0 OOM,0 graph evictions).
- Decode: EN