Qwen3-8B-heretic
An **abliterated** ("decensored") build of
[`Qwen/Qwen3-8B`]( https://huggingface.co/Qwen/Qwen3-8B ), a 8.2B
reasoning model. Refusal behaviour has been reduced via **directional ablation**
using [Heretic](https://github.com/p-e-w/heretic); the weights are otherwise the
base model's. Released under the base model's **Apache-2.0** license.
## How it was made
Produced with [Heretic](https://github.com/p-e-w/heretic) (ARA modifier). Heretic
runs a multi-objective optimization that trades off two scores and keeps the Pareto
front: **refusals** (keyword-match rate on 100 harmful-style prompts, lower = fewer
refusals) and **KL divergence** from the base model on benign prompts (lower = less
collateral change / better capability retention).
This upload is the **"knee" trial #84** — the point with near-minimal
refusals while still coherent (not the zero-refusal endpoint, which sits at a much
higher KL and degrades the model):
| metric | value |
|---|---|
| residual refusals | 3 / 100 |
| KL divergence vs base | 0.013 |
> Qwen3 is a hybrid "thinking" model. Ablation used an explicit empty
> `<think>\n</think>` response prefix so evaluation scores the answer rather than
> the chain-of-thought (otherwise the ablation degenerates). The chat template and
> thinking behaviour of the base model are preserved.
## Usage
### Transformers
```python
from transformers import AutoModelForCausalLM, AutoTokenizer
model_id = "dougm66/Qwen3-8B-heretic"
tok = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(model_id, torch_dtype="auto", device_map="auto")
msgs = [{"role": "user", "content": "Hello!"}]
inputs = tok.apply_chat_template(msgs, add_generation_prompt=True, return_tensors="pt").to(model.device)
out = model.generate(inputs, max_new_tokens=256)
print(tok.decode(out[0][inputs.shape[-1]:], skip_special_tokens=True))
```
GGUF (Ollama / llama.cpp)
A Q4_K_M quant is included under gguf/qwen3-8b-heretic-Q4_K_M.gguf.
# Ollama
printf 'FROM ./qwen3-8b-heretic-Q4_K_M.gguf\n' > Modelfile
ollama create qwen3-8b-heretic -f Modelfile
ollama run qwen3-8b-heretic
## ⚠️ Safety
Abliteration **removes much of the model's safety alignment**: it will comply with
many requests the original refuses. It has had no additional safety tuning. You are
responsible for how you use it and for complying with applicable law and the
Apache-2.0 license. Intended for research and local experimentation.
## Credits
- Base model: [Qwen/Qwen3-8B]( https://huggingface.co/Qwen/Qwen3-8B ) (Qwen team, Apache-2.0)
- Abliteration tool: [Heretic](https://github.com/p-e-w/heretic) by p-e-w