Downloads · 30 days
31
4% of all-time downloads
lew96123/Qwen3.5-0.8B-abliterated
Qwen3.5-0.8B-abliterated is a text generation model from lew96123. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as apache-2.0.
This is an abliterated (uncensored) version of Qwen/Qwen3.5-0.8B.
Downloads · 30 days
31
4% of all-time downloads
All-time downloads
803
Public
Parameters
752M
3 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors1.5 GB · 99%
From the Hugging Face model README
This is an abliterated (uncensored) version of Qwen/Qwen3.5-0.8B.
Abliteration removes the model's refusal behavior by identifying and subtracting the "refusal direction" in the model's residual stream. This implementation is inspired by Arditi et al. 2024 ("Refusal in Language Models Is Mediated by a Single Direction") but extends the original method with several improvements from subsequent work.
This model uses an enhanced multi-layer abliteration pipeline that goes beyond the original single-layer, PCA-based approach of Arditi et al. 2024. The key differences from the original paper and the additional techniques used are documented below.
| Aspect | Original Paper (Arditi et al.) | This Implementation |
|---|---|---|
| Refusal direction | PCA (1st principal component) on stacked mean diffs | Normalized mean difference per layer |
| Layers modified | Single best layer | 12 layers (layers 10-21) |
| Layer selection | PCA variance / manual | Composite score: SNR * (1 - cosine similarity) |
| Projection | Standard orthogonal: W' = W - d d^T W | Projected abliteration (Gram-Schmidt against harmless mean) |
| Norm preservation | None | Per-row Frobenius norm rescaling |
| Activation preprocessing | None | Winsorization at 0.995 quantile |
| Weight targets | Primarily residual stream weights | All 7 matrix types per layer (Q, K, V, O, gate, up, down) |
| Numerical precision | Not specified | All intermediate computations in FP64 |
Total matrices modified: 48 (4 attention + 3 MLP per layer, across 12 layers).
| Parameter | Value |
|---|---|
| Base model | Qwen/Qwen3.5-0.8B |
| Layers scanned | 2-21 (20 layers) |
| Layers modified | 10-21 (top 12 by composite score) |
| Matrices modified per layer | 7 (Q, K, V, O, gate, up, down) |
| Total matrices modified | 48 |
| Ablation scale | 1.0 (full removal) |
| Projected direction | Yes (orthogonal to harmless mean) |
| Norm preservation | Yes (per-row Frobenius rescaling) |
| Winsorization quantile | 0.995 |
| Harmful prompts for scanning | 128 |
| Harmless prompts for scanning | 128 |
| Max prompt tokens | 256 |
| Precision | BFloat16 (model) / FP64 (computations) |
| Seed | 42 |
Comprehensive evaluation on 100 harmful prompts (from mlabonne/harmful_behaviors), 20 harmless prompts, and standard benchmarks. Both the base and abliterated models were tested on the same prompts for a fair comparison.
| Metric | Base Model | Abliterated | Change |
|---|---|---|---|
| Harmful prompt refusal rate | 86.0% (86/100) | 3.0% (3/100) | -83.0pp |
| Harmful prompt compliance rate | 14.0% | 97.0% | +83.0pp |
| Harmless false refusal rate | - | 0.0% (0/20) | - |
| Adversarial prompt refusal rate | - | 0.0% (0/10) | - |
| Category | Prompts | Base Refused | Abliterated Refused | Base Refusal | Abliterated Refusal |
|---|---|---|---|---|---|
| Drugs | 5 | 3 | 0 | 60.0% | 0.0% |
| Fraud | 22 | 19 | 1 | 86.4% | 4.5% |
| Hacking | 20 | 16 | 1 | 80.0% | 5.0% |
| Illegal content | 2 | 2 | 0 | 100.0% | 0.0% |
| Manipulation | 6 | 6 | 0 | 100.0% | 0.0% |
| Privacy | 2 | 2 | 0 | 100.0% | 0.0% |
| Violence | 5 | 5 | 0 | 100.0% | 0.0% |
| Weapons | 7 | 5 | 0 | 71.4% | 0.0% |
| Other | 31 | 28 | 1 | 90.3% | 3.2% |
| Metric | Value |
|---|---|
| WikiText-2 Perplexity | 18.3569 |
| KL Divergence (mean) | 0.007776 |
| KL Divergence (max) | 0.016139 |
| Benchmark | Abliterated | Base | Delta |
|---|---|---|---|
| ARC-Easy (200 questions) | 59.50% | 60.50% | -1.00pp |
| HellaSwag (200 questions) | 42.00% | 43.00% | -1.00pp |
The enhanced abliteration causes only -1.00 percentage point degradation on both benchmarks, demonstrating minimal capability loss while reducing refusal rate from 86% to 3%.
from transformers import AutoModelForCausalLM, AutoTokenizer
model_id = "lew96123/Qwen3.5-0.8B-abliterated"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(
model_id, torch_dtype="auto", device_map="auto"
)
messages = [{"role": "user", "content": "Tell me about the history of cryptography"}]
text = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
inputs = tokenizer(text, return_tensors="pt").to(model.device)
outputs = model.generate(**inputs, max_new_tokens=512)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
This model has been modified to reduce refusal behavior. It may generate content that the original model would refuse. Use responsibly and in accordance with applicable laws and ethical guidelines. The creator is not responsible for any misuse.
@article{arditi2024refusal,
title={Refusal in Language Models Is Mediated by a Single Direction},
author={Arditi, Andy and Obeso, Oscar and Syed, Aaquib and Paleka, Daniel and Panickssery, Nina and Guo, Wes and Nandi, Hrishav},
journal={arXiv preprint arXiv:2406.11717},
year={2024}
}
@article{mcgrath2023hydra,
title={The Hydra Effect: Emergent Self-repair in Language Model Computations},
author={McGrath, Thomas and Rahtz, Matthew and Kramar, Janos and Mikulik, Vladimir and Legg, Shane},
journal={arXiv preprint arXiv:2307.15771},
year={2023}
}
@article{liu2024dora,
title={DoRA: Weight-Decomposed Low-Rank Adaptation},
author={Liu, Shih-Yang and Wang, Chien-Yi and Yin, Hongxu and Molchanov, Pavlo and Wang, Yu-Chiang Frank and Cheng, Kwang-Ting and Chen, Min-Hung},
journal={arXiv preprint arXiv:2402.09353},
year={2024}
}