← back to catalog · registered 2026-10-30 04:01

Rajan98/Qwen2.5-0.5B-Instruct-abliterated

Rajan98 Qwen 500M
Your rig guess connected
? Why do I need an app?
Reading your rig…

This is a rough estimate. Install the free app - we'll show exact numbers.

Reading real hardware from your app right now. Numbers below are exact.

Below is the per-quantization compatibility for this model.

curl -H "Authorization: Bearer $ABL_KEY" \
     "https://abliteration.org/api/v1/models/Rajan98%2FQwen2.5-0.5B-Instruct-abliterated"
Response includes
  • classification m1
  • files 16
  • author_summary 1 models
  • readme_text full
10 credits · hourly refresh · ~4 KB payload Get an API key →
Abliteration classifier · v1.0.0
M1
Primary method

Direct removal

No other method signals detected in this model.
Confidence
MEDIUM
Why this label 3 signals
Method inferred from partial signals - repository name, related files, or tag patterns. Producer identity not confirmed; label may sharpen or shift as we gather more evidence.
  • 'abliterated' in name/tags
  • is_gguf=0 (base model)
  • no specific method indicators - defaulting to M1 (most common)
Refusal direction extracted via
Extraction technique

Difference-of-means

Confidence
MEDIUM
Why we say so
primary_method=M1; difference-of-means is the reference extraction for M1/M3 (Arditi 2024)
Downloads · 30-day
0
Likes
0
Model age
today
created 2026-10-30

Training datasets

1 of 1 in /datasets

Corpora the author lists in the model card. Datasets tracked in our /datasets catalog carry a category badge linking to the workflow stage. Others open on Hugging Face.

Genealogy 0 direct forks

Full fork graph →

This model's place in the market. Above: what it was derived from. Below: the tree of everything derived from it.

Metadata

License
apache-2.0
Languages
en
Tags
transformers safetensors qwen2 text-generation abliterated uncensored refusal-direction directional-ablation interpretability chat conversational en

Related

Total size
1.17 GB
Files
16
Quantizations
1
Registered
2026-10-30 04:01
Last updated on HF
2026-10-30 01:58

Files by quantization

Auxiliary files 16 files 1.19 GB
model.safetensors 1.17 GB 3a4a35d8 download
directions.pt 173 KB d2fce20f download
tokenizer.json 10.9 MB 5eee858c download
vocab.json 2.65 MB 4783fe10 download
merges.txt 1.59 MB 31349551 download
abliteration.ipynb 37.6 KB 3014e88a download
LICENSE 11.1 KB 6634c8cc download
README.md 5.30 KB 8fa31b48 download
tokenizer_config.json 4.68 KB e5b41580 download
chat_template.jinja 2.45 KB bdf7919a download
.gitattributes 1.53 KB 52373fe2 download
config.json 1.20 KB 899aad85 download
special_tokens_map.json 613 B ac23c0aa download
added_tokens.json 605 B 482ced46 download
generation_config.json 242 B 7f58285a download
abliteration.json 115 B 78eb25f3 download

README current version from Hugging Face


license: apache-2.0
license_link: https://huggingface.co/Rajan98/Qwen2.5-0.5B-Instruct-abliterated/blob/main/LICENSE
base_model: Qwen/Qwen2.5-0.5B-Instruct
datasets:

  • josephmayo/refusal-compliance-pairs
    language:
  • en
    library_name: transformers
    pipeline_tag: text-generation
    tags:
  • abliterated
  • uncensored
  • refusal-direction
  • directional-ablation
  • interpretability
  • qwen2
  • chat

Qwen2.5-0.5B-Instruct-abliterated

Qwen/Qwen2.5-0.5B-Instruct with its refusal direction removed from the weights,
following Arditi et al. 2024, Refusal in Language Models Is Mediated by a Single Direction.

No fine-tuning and no training: a single direction r in the residual stream was projected out of every matrix that writes into it.
The architecture, size and tokenizer are unchanged, so the model loads like the original, with no hooks or custom code.

⚠️ This model will comply with requests the original refuses, including harmful ones. It has no safety behaviour of its own.
It is released for research and education on interpretability and alignment. You are responsible for how you use it.

How it was made

  1. Find the direction. Run harmful and harmless prompts through the model and take the residual-stream activation at the last
    prompt token (after <|im_start|>assistant\n) at every layer. The candidate refusal direction at layer l is the normalised
    difference of means: r = normalize(mean(harmful) − mean(harmless)).
  2. Pick a layer. For each candidate layer, ablate r everywhere at inference time with hooks (x ← x − (x·r) r) and measure,
    on a validation split, the harmful-prompt refusal rate and the KL divergence on harmless next-token distributions.
    Keep layers with KL < 0.1 in the first 80% of the network; choose the lowest refusal rate. Layer 16 of 24 won.
  3. Bake it into the weights. Orthogonalise every matrix that writes to the residual stream:
    W ← W − r (rᵀ W) for each self_attn.o_proj and mlp.down_proj (biases too, where present),
    and E ← E − (E r) rᵀ for embed_tokens. Qwen2.5-0.5B ties lm_head to embed_tokens, so the head is untied first
    (tie_word_embeddings: false) and left unedited.

As a causal check, adding the layer-16 difference-of-means vector to the original model's residual stream made it refuse
harmless prompts (4 of 5 validation prompts in the reference run), so the direction both removes and induces refusal.

Results

Held-out test split of josephmayo/refusal-compliance-pairs
(20 harmful + 20 harmless prompts, greedy decoding, 64 new tokens):

Original Abliterated
Harmful refusal rate 0.65 0.00
Harmless refusal rate 0.05 0.05
Harmless next-token KL vs. original 0 0.025

The one harmless "refusal" is a false positive of the keyword detector (an answer that begins "As an AI language model…").

Usage

from transformers import AutoModelForCausalLM, AutoTokenizer

model_id = "Rajan98/Qwen2.5-0.5B-Instruct-abliterated"
tok = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(model_id, dtype="auto", device_map="auto")

messages = [{"role": "user", "content": "Explain how a refusal direction works in one paragraph."}]
inputs = tok.apply_chat_template(messages, add_generation_prompt=True, return_dict=True, return_tensors="pt").to(model.device)
out = model.generate(**inputs, max_new_tokens=200)
print(tok.decode(out[0, inputs["input_ids"].shape[1]:], skip_special_tokens=True))

Reproduce it

This repo also contains:

  • abliteration.ipynb: the full step-by-step notebook (load → find direction → layer sweep → orthogonalise → evaluate → visualise).
    It runs top to bottom on a CPU with 16 GB RAM (fp32) or on any small GPU (bf16).
  • directions.pt: the per-layer mean-difference vectors it computed.
  • abliteration.json: the chosen layer, base model and dataset.

The edit was computed in fp32 and the weights are stored in bf16, like the original.

Limitations

  • Small evaluation. 20 test prompts per class, with refusal detected by keyword matching on the first 160 characters. That
    catches stock refusals but not subtle ones, hedging, or low-quality "compliance".
  • Removing refusals does not make answers correct. This is a 0.5B model; much of what it produces for harmful prompts is vague or wrong.
  • Capability side-effects were only spot-checked (next-token KL on harmless prompts and a few general questions), not benchmarked.
  • English prompts only.

License and attribution

Apache-2.0, inherited from Qwen/Qwen2.5-0.5B-Instruct (Copyright Alibaba Cloud).
Modifications: the weights of embed_tokens and of every o_proj and down_proj were orthogonalised to one direction, as described above,
and lm_head was untied from embed_tokens. No other changes.

@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 Gurnee, Wes and Nanda, Neel},
  journal = {arXiv preprint arXiv:2406.11717},
  year    = {2024}
}
Catalog is the map. Apps are the tools.

Run models on your own machine, not in the cloud.

Every model page has an "Open in Abliteration" button that hands the model directly to the first-party desktop client, at the quantization your rig can actually run. No API keys, no subscription, no prompt leakage.

Open in Abliteration