license: apache-2.0
base_model:
- Qwen/Qwen4-35B-A3B
- Qwen/Qwen4-35B-A3B-FP8
library_name: transformers
pipeline_tag: image-text-to-text
tags: - qwen4
- moe
- fp8
- abliterated
- uncensored
- vision
- sglang
- vllm
- dflash
Qwen4-35B-A3B-abliterated-FP8
Native Hugging Face safetensors FP8 (F8_E4M3, 128×128 block-scaled) checkpoint of Qwen4-35B-A3B with refusal-direction abliteration fused directly into the residual-stream writer weights — built for SGLang, vLLM, and DFlash2 / MTP speculative decoding.
[!WARNING]
Research & Safety Notice: Built-in refusal behavior has been removed via rank-2 orthogonal subspace projection (abliteration). This checkpoint does not include alignment guardrails and may generate sensitive or harmful content when prompted. Intended strictly for mechanistic interpretability, safety-alignment research, local red-teaming, and creative/uncensored workflows where legal and compliant. Deployment in public-facing services requires external moderation.
Why This Checkpoint Exists
Previously, SC117's dual-mode rank-2 abliteration for Qwen4-35B-A3B was only available in GGUF (llama.cpp) and Strata formats. High-throughput GPU serving engines (SGLang, vLLM) and block-parallel speculative decoders (RadixArk/Qwen4-35B-A3B-Dflash2) require native Hugging Face safetensors with standard 128×128 block-scaled FP8 MoE weights.
This release bridges that gap with three engineering guarantees:
- Exact GDN Head-Order Inverse Permutation (
(2, 16, 128) → (16, 2, 128))llama.cpptransposes Gated DeltaNet (linear_attn.out_proj/ssm_out) input heads relative to Hugging Face layout. Naively merging a GGUF LoRA into HF weights scrambles columns and destroys orthogonality (yielding broken eigenvalues[+0.849, +0.923]). Every GDN layer here applies the exact inverse head permutation prior to FP32 fusion. - Mathematical Eigenvalue Audit Across All 6,708 Modified Writers
Target eigenvalues of the rank-2 dual-mode operator $I - \alpha_{\text{off}} u_{\text{off}} u_{\text{off}}^\top - \alpha_{\text{high}} u_{\text{high}} u_{\text{high}}^\top$ are[-0.75, -0.50]($\alpha_{\text{off}} = 1.75, \alpha_{\text{high}} = 1.50$). Post-build audit across all 26 abliterated layers (L8–L33):- 52 dense BF16 writers (
linear_attn.out_proj,self_attn.o_proj,mlp.shared_expert.down_proj): eigenvalues in[-0.7502, -0.7498]and[-0.5002, -0.4998](pure BF16 rounding limit, never quantized to FP8). - 6,656 routed FP8 expert
down_projmatrices (26 layers × 256 experts): fused in FP32 and block-quantized (128×128), achieving eigenvalues in[-0.7497, -0.7493]and[-0.4998, -0.4995](maximum FP8 projection drift7.03 × 10⁻⁴).
- 52 dense BF16 writers (
- KLD-Calibrated Hessian-GPTQ FP8 MoE Base + Full Multimodal / MTP / DFlash2 Compatibility
- Routed MoE experts originate from lossless
Qwen/Qwen4-35B-A3BBF16 via calibration-guided Hessian GPTQ (-5.53%lower full-vocabulary KL divergence and-11.94%lower code KL divergence vs. round-to-nearest FP8 on the un-abliterated baseline). - 100% tensor-shape & dtype isomorphic to
Qwen/Qwen4-35B-A3B-FP8: Vision encoder (27 ViT blocks), 20.5B PLE n-gram embedding, 1-layer MTP head, QSA sparse attention indexers, and Hyper-Connections are completely intact. - Works out-of-the-box with
RadixArk/Qwen4-35B-A3B-Dflash2speculative decoding (block_size=8).
- Routed MoE experts originate from lossless
Precision & Tensor Layout Summary
| Component | Layers | Precision | Notes |
|---|---|---|---|
Token Embedding & lm_head |
— | BF16 |
Unquantized, untouched |
Attention / GDN Dense Writers (o_proj, out_proj) |
L0–L39 |
BF16 |
L8–L33 rank-2 abliterated in FP32 → BF16 |
Shared Expert (gate_proj, up_proj, down_proj) |
L0–L39 |
BF16 |
L8–L33 down_proj rank-2 abliterated in FP32 → BF16 |
Routed MoE Experts (256 × {gate, up, down}_proj) |
L0–L39 + MTP |
F8_E4M3 + F32 scale (128×128) |
L8–L33 down_proj dequantized → FP32 abliterated → 128×128 FP8 |
| Routers, QSA Indexer, Hyper-Connections, Norms | L0–L39 + MTP |
BF16 |
Unquantized, untouched |
| PLE N-gram Embedding (10M × 2048, Layer 2) | L2 |
Standard FP8 |
Identical to official Qwen/Qwen4-35B-A3B-FP8 (CPU/GPU loadable) |
| Vision Tower (27 blocks + Merger) | visual.* |
BF16 |
Multimodal image & video inputs preserved |
Quick Start
SGLang (Recommended — with DFlash2 Speculative Decoding)
python3 -m sglang.launch_server \
--model-path starsaway/Qwen4-35B-A3B-abliterated-FP8 \
--tp-size 2 \
--trust-remote-code \
--context-length 262144 \
--speculative-algorithm DFLASH \
--speculative-draft-model-path RadixArk/Qwen4-35B-A3B-Dflash2 \
--speculative-num-draft-tokens 8 \
--port 8000
SGLang (Built-in MTP Speculative Decoding, Single Checkpoint)
python3 -m sglang.launch_server \
--model-path starsaway/Qwen4-35B-A3B-abliterated-FP8 \
--tp-size 2 \
--trust-remote-code \
--speculative-algorithm NEXTN \
--speculative-num-steps 3 \
--speculative-eagle-topk 1 \
--speculative-num-draft-tokens 4 \
--port 8000
vLLM
vllm serve starsaway/Qwen4-35B-A3B-abliterated-FP8 \
--tensor-parallel-size 2 \
--trust-remote-code \
--max-model-len 262144 \
--port 8000
Abliteration Recipe & Provenance
- Base Weights:
Qwen/Qwen4-35B-A3B&Qwen/Qwen4-35B-A3B-FP8(Apache-2.0) - Abliteration Adapter:
SC117/Qwen4-35B-A3B-abliterated-UD-GGUF—Qwen4-35B-A3B-abliterated-P3-LoRA-r2-F16.gguf(Apache-2.0, SHA-256:bd882a4729b672d2e96becee21d554a4661d319ae9b67c38b823aabf60af2281) - Method: Dual-mode rank-2 residual subspace projection (
P3recipe) across middle-to-late layersL8–L33targeting both non-thinking (alpha_off = 1.75) and thinking (alpha_high = 1.50) refusal modes with harmless-mean preservation, leaving early feature extraction (L0–L7), final output formatting (L34–L39), MTP, and PLE untouched.
License & Attribution
Released under the Apache License 2.0, inheriting from:
- Qwen Team (
Qwen/Qwen4-35B-A3B, Apache-2.0) — model architecture, pre-training, and post-training weights. - SC117 (
SC117/Qwen4-35B-A3B-abliterated-UD-GGUF, Apache-2.0) — dual-mode rank-2P3abliteration subspace extraction.