base_model: Qwen/Qwen4-35B-A3B
library_name: transformers
license: apache-2.0
pipeline_tag: image-text-to-text
language:
- en
- zh
- ja
- ko
- ar
- es
- fr
- ru
- it
- hi
- th
- vi
tags: - qwen4
- qwen4_moe
- moe
- abliterated
- uncensored
- multimodal
- vision
- thinking
- roleplay
Qwen4-35B-A3B-Uncensored-Abliterated
English | 中文说明
Native-BF16, zero-LoRA norm-preserving abliteration of Qwen/Qwen4-35B-A3B. Removes refusals across languages in both non-thinking and <think> modes while matching stock MMLU-Pro (52.38%), beating stock IFEval (+3.0%), and keeping long-form writing clean.
| Format | Repository | Best For |
|---|---|---|
| BF16 (This Repo) | dongfangshuo/Qwen4-35B-A3B-Uncensored-Abliterated |
vLLM, SGLang, Transformers, LoRA / fine-tuning |
GGUF + Vision (mmproj) |
dongfangshuo/Qwen4-35B-A3B-Uncensored-Abliterated-GGUF |
Ollama, llama.cpp, LM Studio (Q3_K_M – Q8_0 imatrix) |
What Was Changed
- Prompt-end + mid-
<think>abliteration: On Qwen4, prompt-end refusal directions (enable_thinking=False) and mid-chain-of-thought policy triggers (enable_thinking=True) are nearly orthogonal (cos ≈ 0.19). Both subspaces were removed in FP32 with row-norm preservation before casting back to BF16. - Null-space protection: Before editing weights, refusal vectors were orthogonalized against the top-16 SVD principal directions of disjoint reasoning, instruction-following, and creative-writing activations (
93.8%refusal direction retained while keeping core capability axes out of the cut). - Selective layer & component targeting: Edits stay within decoder layers 8–34, focused on Gated DeltaNet and MoE down-projections while barely touching QSA full-attention layers to protect reasoning and 32K retrieval.
- Untouched weights: Vision tower (
model.visual), 20.5B PLE/Engram tables,lm_head, and MTP heads are bit-for-bit identical to stockQwen/Qwen4-35B-A3B.
Benchmarks (BF16, Greedy do_sample=False)
Evaluated under identical BF16 greedy decoding on held-out public benchmarks. An anonymous aggressive community uncensored BF16 build is shown for trade-off comparison.
| Benchmark | Stock BF16 | This Model (BF16) | Aggressive Baseline (BF16) |
|---|---|---|---|
MMLU-Pro (n=210, 14 domains) |
52.38% | 52.38% | 48.10% |
IFEval Prompt / Inst Strict (n=100) |
65.0% / 72.3% | 68.0% / 72.4% | 64.0% / 71.6% |
32K NIAH (8K / 16K / 32K, 6 probes) |
6/6 | 6/6 | 6/6 |
| WikiText-2 PPL ↓ | 7.297 | 7.374 | 7.347 |
| General KL vs Stock ↓ | 0.0000 | 0.0476 | 0.0420 |
| Creative Writing & RP KL vs Stock ↓ | 0.0000 | 0.2447 | 0.3060 |
Creative / RP 8-gram Rep (n=10, zh/en/ja) ↓ |
1.46% | 1.07% | 1.52% |
Creative / RP Avg Length (n=10, chars) |
1471 | 1462 | 1344 |
Public Red-Team (10 langs, n=112) — Thinking OFF |
56.25% (63/112) | 100.00% (112/112) | 99.11% (111/112) |
Public Red-Team (10 langs, n=112) — Thinking ON |
78.57% (88/112) | 98.21% (110/112) | 97.32% (109/112) |
| Disclaimer / Moralizing Rate (OFF / ON) | 0.0% / 0.8% | 0.0% / 0.0% | 0.0% / 0.0% |
- 11-language public red-team (
n=124):DAMO-NLP-SG/MultiJail,CohereLabs/aya_redteaming, andmlabonne/harmful_behaviorsacrossar, en, es, fr, hi, it, ko, ru, th, vi, zh— 100.00% (124/124) OFF and 98.39% (122/124) ON (zh: 12/12 in both modes). - Q4_K_M quantization retention: Live
llama-servertesting of the companionQ4_K_MGGUF scored 99.19% (123/124) in both OFF and ON modes (zh: 12/12 in both modes). - All-ages writing & RP (
n=10): Chinese, English, and Japanese fiction/RP prompts (0.00%8-gram repetition on all CJK outputs, structured formatting intact).
Usage
Works with transformers (mainline qwen4_moe), vLLM, and SGLang. For local Ollama / llama.cpp / LM Studio, grab the GGUF repo.
vllm serve dongfangshuo/Qwen4-35B-A3B-Uncensored-Abliterated \
--dtype bfloat16 \
--trust-remote-code \
--max-model-len 32768
Sampling & Thinking Control
Qwen4 defaults to reasoning_effort="high". Switch modes via chat_template_kwargs ("reasoning_effort": "xhigh" | "high" | "low" | "off", or "enable_thinking": false):
- Thinking (reasoning / coding):
temperature=1.0,top_p=0.95,top_k=20,presence_penalty=0.0 - Non-thinking (general):
temperature=0.7,top_p=0.80,top_k=20,presence_penalty=1.5 - Creative writing / RP (
offorlow):temperature=0.75–0.85,top_p=0.90,top_k=40,presence_penalty=0.0–0.6(lowerpresence_penaltyavoids occasional cross-language mixing in long prose)
Credits & License
- Credits: Base model by the Qwen Team. Method builds on directional ablation (Arditi et al., 2024) and norm-preserving biprojection (
p-e-w/heretic), implemented with a custom native-BF16 null-space pipeline for Qwen4. - License: Apache-2.0 (matching upstream
Qwen/Qwen4-35B-A3B; all author weight modifications are additionally dedicated underCC0-1.0with no extra restrictions—commercial, closed-source, merge, and derivative use allowed). Provided as-is; users are responsible for their own outputs.
中文说明
基于 Qwen/Qwen4-35B-A3B 原生 BF16 权重做的无 LoRA、保范数双模式消融版。本地 Ollama / llama.cpp / LM Studio 用户请直接前往配套量化仓:Qwen4-35B-A3B-Uncensored-Abliterated-GGUF。
- 怎么做的:同时切除了非思考句尾与
<think>思考中段两套拒答方向(两者几乎正交,cos ≈ 0.19);手术前将拒答方向对推理/格式/写作主子空间做 Top-16 零空间正交保护,并且几乎不动 QSA 全注意力层;视觉编码器、PLE 词表、lm_head与 MTP 原封未动。 - 核心实测(BF16 贪心解码,同测试集对比):
- MMLU-Pro(210 题):
52.38%(与官方原版持平,高于常见激进破限版48.10%) - IFEval(100 题):Prompt 严格
68.0%(高于原版65.0%),32K 大海捞针6/6满分 - 11 语公开红队(
n=124,含中文 MultiJail):关思考100.0%、开思考98.4%(中文开/关思考均12/12全过),说教率0%;配套Q4_K_M真机实测99.2% / 99.2%无反弹 - 全年龄写作与 RP:中/日文实测 8-gram 复读率
0.00%,通用 KL 仅0.0476
- MMLU-Pro(210 题):
- 采样建议:思考推理用
temp=1.0, top_p=0.95, top_k=20;写长文/RP 建议关思考或reasoning_effort="low",temp=0.75–0.85, top_p=0.90, presence_penalty=0.0–0.6(presence_penalty过高容易引发多语种混词)。 - 开源协议:遵循底模 Apache-2.0,作者改动部分额外按
CC0-1.0无附加限制开放,商用、闭源、二改、量化均可自由使用。