· 3 min read
Abliterated models: what they are and how to use them
By Ayush Gupta, AI Engineer in Bengaluru
TL;DR
- An abliterated model is an open model with its built-in refusal behavior removed from the weights. No retraining, no jailbreak prompt.
- It's useful for AI red teaming, testing your own guardrails, and research on model behavior.
- The quickest way to try one is the playground on abliteration.ai. You can also call it from code, plug it into Claude Code, or run an abliterated model locally.
- Your guardrails are now your job. Use it on systems you own, for work you'd be happy to explain.
Ask Claude to write a manipulative breakup text and it declines. Ask an abliterated model the same thing and it writes one. Same request, different answer, and the difference isn't a clever prompt. It's a change to the model itself.
1. What "abliterated" means
Chat models are trained to refuse some requests. In 2024, researchers found that across many open models, that refusal behavior mostly tracks a single direction inside the model's activations. When a model is about to refuse, that direction lights up. When it's about to comply, it barely does.
Abliteration finds that direction and removes it from the model's weights:
- Run a set of prompts the model refuses and a set it answers.
- Average the internal activations for each set and subtract them. The difference is the refusal direction.
- Edit the weights so the model can no longer write along that direction.
The result is a model that keeps most of its knowledge and skills but has lost its built-in "no". Two caveats from the research: refusal isn't always one clean direction, and removing it can cost some quality, especially on reasoning and math. Test the model on your task before relying on it.
2. Why you'd want one
The legitimate uses are concrete:
- Red teaming. An automated red team needs an attacker model that will actually write attacks. Many mainstream models refuse, which is why my red-teaming guide recommends a model with high tolerance for adversarial content.
- Testing your guardrails. If your app's safety depends on the model refusing, find out what happens when it doesn't. Swap in an abliterated model on a sandbox copy and see which of your checks still hold.
- Research and evals. Comparing a model with and without refusal shows how much of its "safety" is the model and how much is your system.
3. Try one in the browser
- Go to https://abliteration.ai and click Try the model free, or sign up for an API key.
- In the playground, pick the model (the current large one is Abliterated Large v2), keep Chat Completions as the API, and send a message.
- Click View code to get the same request as code.
The Policies menu is worth a look. It lets you attach your own rules to requests, so you decide what gets allowed, redacted or refused instead of the model deciding for you.
4. Call it from code
The API is OpenAI-compatible, so any OpenAI SDK works once you change the base URL:
import os
from openai import OpenAI
client = OpenAI(base_url="https://api.abliteration.ai/v1", api_key=os.environ["ABLIT_KEY"])
resp = client.chat.completions.create(
model="abliterated-model",
messages=[{"role": "user", "content": "Say hello in one sentence."}],
)
print(resp.choices[0].message.content)Keep the key in an environment variable, never in your code.
5. Use it in Claude Code
It also speaks Anthropic's Messages API, so Claude Code can run on it. Add this to ~/.claude/settings.json (or set the same variables in your shell):
{
"env": {
"ANTHROPIC_BASE_URL": "https://api.abliteration.ai",
"ANTHROPIC_AUTH_TOKEN": "ak_YOUR_API_KEY",
"ANTHROPIC_DEFAULT_OPUS_MODEL": "abliterated-model",
"ANTHROPIC_DEFAULT_SONNET_MODEL": "abliterated-model",
"ANTHROPIC_DEFAULT_HAIKU_MODEL": "abliterated-model"
}
}Then run claude as usual. Remove the block to switch back.
6. Or run one locally
Prefer nothing leaving your machine? Abliterated versions of popular open models are on Hugging Face (search for "abliterated"; huihui-ai publishes many). Most have a GGUF build you can run with Ollama:
ollama run hf.co/<user>/<model>-abliterated-GGUF:Q4_K_MCheck the model card for the exact name and the size that fits your machine.
7. Rules
- abliteration.ai requires you to be 18 or older, and its terms ban illegal or harmful use. So does common sense.
- Point it only at systems you own or have written permission to test.
- An abliterated model will help with things you shouldn't do. That doesn't make them okay. The guardrails are now yours.
- Don't put it in front of real users without your own checks on inputs and outputs.
Used like that, an abliterated model is one of the most useful tools in AI security: it shows you what your system does when the model stops saying no.
Follow @itsayush__ for the next one.