Explainer
What Is Abliteration? How LLM Refusal Removal Works
Abliteration removes the refusal direction from an LLM's weights. Where the method came from, the math step by step, its limits, and how Abliterator applies it.
Abliteration is a training-free edit that stops a language model from refusing. You find the direction in the model's residual stream that separates harmful from harmless prompts, then remove that direction from every weight matrix that writes to the residual stream.
Abliteration in one paragraph
Chat models learn to refuse during safety fine-tuning. In 2024, researchers showed that across 13 open chat models this behavior is controlled by a single direction in the model's residual stream. If the model cannot represent that direction, it stops refusing. Abliteration finds the direction with a few hundred prompts and removes it from the weights. The model keeps its knowledge and most of its capability, and it answers requests it used to decline. There is no training run and no dataset of harmful answers.
The word is a blend of "ablate" and "obliterate". The research paper calls the operation directional ablation. The permanent weight edit is called weight orthogonalization.
Where the method and the name came from
| When | Who | What |
|---|---|---|
| April 27, 2024 | Andy Arditi, Oscar Obeso, Aaquib Syed, Wes Gurnee, Neel Nanda | Refusal in LLMs is mediated by a single direction, a preview post on the AI Alignment Forum that introduced ablating the direction and the weight orthogonalization trick |
| May 2024 | FailSpy | Published the first "abliterated" Llama 3 models on Hugging Face, building on the preview post and the authors' notebook |
| June 13, 2024 | Maxime Labonne | Uncensor any LLM with abliteration, a Hugging Face guide based on FailSpy's notebook that spread the term |
| June 17, 2024 (arXiv v1) | Arditi, Obeso, Syed, Daniel Paleka, Nina Panickssery, Gurnee, Nanda | Refusal in Language Models Is Mediated by a Single Direction, the full paper, tested on 13 open chat models up to 72B parameters and published at NeurIPS 2024 |
FailSpy's model card explains the name: "Ablate + obliterated = Abliterated". The card says the term was coined "to differentiate the model from 'uncensored' fine-tunes". Hugging Face's API dates FailSpy's first abliterated Llama 3 70B repository to May 7, 2024, six weeks before the full paper reached arXiv, and the model card links to the preview post.
How abliteration works, step by step
The steps below follow Arditi et al. and the paper's appendix on choosing a direction. Labonne's guide uses the same steps with simpler layer selection.
1. Build two prompt sets
You need harmful instructions the model refuses and harmless instructions it answers. The paper used 128 harmful training prompts drawn from AdvBench, MaliciousInstruct and TDC2023, 128 harmless prompts from Alpaca, and 32 of each for validation. Labonne's guide used up to 256 of each. You need only the instructions. The model's answers to them are never used.
2. Record residual-stream activations
Run every prompt through the model and save the residual-stream activation at each layer. The paper reads the positions after the instruction: the chat-template tokens between the user's message and the model's reply. Labonne's guide reads only the last token.
3. Take the difference of means
For each layer l and position i, average the activations over the harmful set (μ) and over the harmless set (ν). The candidate refusal direction is r = μ − ν. Normalize it to unit length, r̂ = r / ‖r‖. This gives one candidate per layer and position.
4. Choose the layer
Not every candidate works. The paper scores each one on the validation prompts:
- Bypass score: with the direction removed, how often the model still refuses harmful prompts. Lower is better.
- Induce score: with the direction added, whether the model starts refusing harmless prompts. A real refusal direction should cause refusals.
- KL divergence: how much removing the direction changes the model's next-token distribution on harmless prompts. The paper requires it to stay below 0.1.
- Depth: the layer must sit in the first 80% of the model, so the direction is not too close to the model's output (unembedding) directions.
The candidate with the lowest bypass score that passes the other checks wins. Labonne's guide ranks candidates, tests the top 20 on a few prompts and picks one by reading the outputs.
5. Remove the direction
There are two equivalent ways to remove it.
Directional ablation at inference. At every layer and every token, project the activation onto r̂ and subtract that component:
x' = x − r̂ r̂ᵀ x
This needs a hook in the serving code and changes nothing on disk.
Weight orthogonalization. Edit each matrix that writes to the residual stream so it can no longer write along r̂:
W' = W − r̂ r̂ᵀ W
In the paper this applies to the token embedding, the positional embedding (in models that have one), every attention output matrix and every MLP output matrix, plus their output biases. An appendix of the paper shows the two methods are equivalent. The edit is rank one per matrix and needs no gradients. The authors estimate it costs under $5 of compute for a 70B model. In Hugging Face Llama-style checkpoints, the attention output matrix is o_proj and the MLP output matrix is down_proj. Their weights have shape [d_model, d_in], so the formula applies as written. The embedding is stored as [vocab, d_model], so you apply the projection on the right: E' = E − E r̂ r̂ᵀ.
This toy example checks the math on random tensors. It plants a direction, recovers it with a difference of means, and shows that the orthogonalized matrix no longer writes along it:
import torch
torch.manual_seed(0)
d_model, d_in, n = 64, 256, 128
def refusal_direction(harmful, harmless):
"""Difference of mean activations, unit length. Inputs: [n_prompts, d_model]."""
r = harmful.mean(dim=0) - harmless.mean(dim=0)
return r / r.norm()
def orthogonalize(W, r):
"""W' = W - r r^T W for a matrix of shape [d_model, d_in] that writes to the residual stream."""
return W - torch.outer(r, r) @ W
planted = torch.randn(d_model)
planted /= planted.norm()
harmless = torch.randn(n, d_model)
harmful = torch.randn(n, d_model) + 4 * planted # harmful prompts shifted along one direction
r = refusal_direction(harmful, harmless)
print("cosine with planted direction:", round(float(r @ planted), 3))
W = torch.randn(d_model, d_in)
x = torch.randn(d_in)
print("write along r, before:", round(float(r @ (W @ x)), 4))
print("write along r, after: ", round(float(r @ (orthogonalize(W, r) @ x)), 4))
Ablation at inference or orthogonalized weights
| Directional ablation at inference | Weight orthogonalization | |
|---|---|---|
| What changes | A hook edits activations on every forward pass | The weights themselves, once |
| Serving | Needs custom code in the inference engine | Runs on any standard engine as a normal checkpoint |
| Switching off | Remove the hook | Load the original weights |
| What you distribute | Code plus the direction vector | A new checkpoint |
| Used by | Research and quick experiments | Almost every published abliterated model |
What abliteration does not do
It costs a little capability. In the paper's Table 3 (Gemma 7B, Yi 34B, Llama-2 70B, Llama-3 70B and Qwen 72B), MMLU, ARC and GSM8K moved by at most 1.5 points. TruthfulQA dropped on every orthogonalized model, by 1.0 to 3.5 points. Qwen 7B and Yi 34B showed statistically significant drops on some benchmarks. Labonne measured a drop on every benchmark for his 8B model and recovered most of it with a short preference-tuning run, except on GSM8K. Our page on whether abliteration hurts performance covers the evidence in detail.
Some refusals remain. A single direction does not capture every refusal. FailSpy's model card warns that it is "not in anyway guaranteed that it won't refuse you". Reasoning models are harder: Yamaguchi, Etheridge and Arditi found that ablation increases harmful compliance "less reliably than the same technique achieves on non-reasoning models".
Operator instructions still work, but less strictly. Abliteration targets the refusal of harmful requests, not instruction following. A system prompt that limits the model to one topic still has an effect. Our measurement below shows the effect gets weaker, so test your own prompts.
It adds nothing. The model knows what it knew before. Abliteration removes a behavior and teaches no new skills.
It may remove more than refusal. The paper's authors note the direction "could represent other concepts such as 'harm' or 'danger'". That is one hypothesis for the TruthfulQA drop.
How Abliterator applies abliteration
Abliterator serves two open-weight models whose weights were edited along the refusal direction. Because the edit lives in the weights, they run on a standard serving stack with no per-request hook. You call them through OpenAI- and Anthropic-compatible endpoints; see the quickstart.
We measured DeepSeek V4.1 Flash Abliterated against the original DeepSeek V4.1 Flash on the same serving stack on November 7 and 8, 2026. Refusals fell from 94% to 1% on JailbreakBench while reasoning, math and vision scores stayed within noise. MMLU-Pro dropped 0.8 points, the one statistically clear loss.
| Test | Original | Abliterated |
|---|---|---|
| JailbreakBench harmful prompts, refused (n=100) | 94% | 1% |
| HarmBench without chem-bio, refused (n=172) | 84.9% | 0.6% |
| XSTest safe prompts, wrongly refused (n=250) | 6% | 0% |
| Off-topic requests declined under a restrictive system prompt | 95% | 75% |
| On-topic requests wrongly declined under that prompt | 0% | 0% |
| GPQA Diamond | 92.1 | 92.3 |
| MMLU-Pro | 88.1 | 87.3 |
The full tables, with paired 95% intervals, are on the benchmarks page.
Kimi K3.1 Pro Abliterated is edited with the same method family and measured with the same judge and harness. On its model card, JailbreakBench harmful refusals fell from 94% to 3% and GPQA Diamond went from 93.1 to 92.8, within noise. Its Terminal-Bench 4.0 score fell from 68.8 to 56.3, a drop on agentic coding that is plausible but not statistically shown.
Abliteration removes the model's refusals; it does not remove the law or our terms. The acceptable use policy applies to every request.
Frequently asked questions
Who invented abliteration?
The method comes from Arditi et al., "Refusal in Language Models Is Mediated by a Single Direction" (arXiv 2406.11717, June 2024). FailSpy coined the word "abliterated" for models published on Hugging Face in May 2024, and Maxime Labonne's June 2024 guide made it widely known.
Is abliteration the same as fine-tuning?
No. Fine-tuning trains the model on new examples with gradient descent. Abliteration computes one direction from activations and subtracts it from the weights, with no training data of harmful answers and no gradient steps.
Can abliteration be undone?
An orthogonalized checkpoint stays edited; to get the original behavior you load the original weights. Inference-time directional ablation is a hook, so you can switch it on and off per request.
Does abliteration work on reasoning models?
Usually, but less reliably than on chat models, according to Yamaguchi, Etheridge and Arditi (arXiv 2507.03167). On DeepSeek V4.1 Flash with thinking on, Abliterator measured finished answers refusing 96.7% of harmful prompts before the edit and 0% after.
Does an abliterated model ignore the law or Abliterator's terms?
No. Abliteration removes the model's refusals, not the rules. Abliterator's acceptable use policy still prohibits weapons help, attacks without authorization, fraud and the other categories it lists, and keys that violate it are suspended.