EN ▾
Get API key

How Abliterated Models Work: Refusal Direction Basics

How do abliterated models work? They find the direction in a model's internal activations that carries the urge to refuse, then edit the weights so the model can no longer write along that direction. No new training data is needed.

Updated

Layered neural network planes with a single bright direction being removed, illustrating abliteration

Key points

  • Refusal behavior in many chat models is concentrated in one direction of the activation space.
  • Abliteration estimates that direction and projects it out of the weights.
  • The edit is cheap but blunt: refusals shrink, quality can dip, and hedging may remain.
  • When you call an uncensored API, test your own prompts instead of assuming the method.

The short version

A chat model's hidden state at every layer is a long vector of numbers. Researchers noticed that if you take prompts the model refuses and prompts it answers, and compare the average hidden states, the difference between the two groups points in a fairly consistent direction. That direction behaves like a switch for refusal. Add it, and the model refuses harmless requests. Remove it, and the model stops refusing harmful-looking ones.

Abliteration uses that finding. It computes the direction once, then rewrites the model's weights so that no layer can write anything along it. The word is a blend of "ablation" (removing a component to see what it does) and "obliterate". The idea was published in a 2024 paper titled "Refusal in Language Models Is Mediated by a Single Direction", and the open-source community turned it into a practical recipe for editing released models.

Step by step: what is actually computed

  1. Collect two prompt sets. One set the model usually refuses and one set of similar-length requests it answers normally.
  2. Record activations. Run both sets through the model and save the hidden state at a chosen layer, usually at the last prompt token, where the model is about to decide how to respond.
  3. Take the difference of means. Average each set and subtract. The result is a vector, called the refusal direction, and it is normalized to length one.
  4. Pick a layer. Candidate directions from several layers are tested, and the one that best changes behavior while keeping the output coherent is kept.
  5. Orthogonalize the weights. For each weight matrix that writes into the residual stream (attention output and MLP output, plus the embedding), subtract the part of the output that lies along the direction.

The last step is a projection. In simplified code it looks like this:

import numpy as np

def ablate(W, r):
    # W: weight matrix writing into the residual stream, shape (d_model, d_in)
    # r: refusal direction, shape (d_model,), unit length
    return W - np.outer(r, r @ W)

After this edit, r @ W_new is zero: the layer's output has no component along r. Because it is a matrix edit and not training, it runs in minutes on a single machine that can load the model, and the file size stays the same.

Why this works at all

The finding is surprising because refusal looks like a complex behavior. A model has to recognize many kinds of requests, weigh context and write a polite decline. Yet the experiments suggest that, in many open chat models, the switch between answering and declining is mediated by a narrow slice of the activation space. Safety training, in effect, teaches the model to move toward that slice when a prompt looks sensitive.

The method is not magic and it is not guaranteed on every model. Results depend on the architecture, on how strongly the refusal behavior was trained in, and on how the two prompt sets were chosen. A poor prompt set gives a direction that mixes refusal with unrelated features, like topic or tone.

Trade-offs you should expect

  • Quality can slip. The direction is not purely about refusal. Removing it from every layer can nudge other behaviors, which shows up as small drops on benchmarks or a change in style. Some published abliterated models are followed by a light fine-tune to repair this.
  • Refusals are reduced, not always gone. You may still see hedging, moralizing disclaimers or the occasional decline, particularly with long prompts.
  • It does not add knowledge. The edit removes a behavior. If the base model never learned something, the edited one will not know it either.
  • It targets refusals broadly. That includes ones most people want. Responsible deployments add their own rules on top. Here the hard limit that remains is that no sexual content involving minors is allowed.

An alternative way to get a model that answers without refusals is to fine-tune it on data where it does. That is more expensive and gives a different kind of change: it shifts behavior across the board instead of cutting one direction out. For the broader picture of both, our overview of abliterated LLMs compares the options.

What this means when you call an uncensored API

Most developers never run the edit. They call a hosted model that someone already tuned. The service behind this site runs a single open-weight model from an independent provider, tuned to answer without content refusals for lawful adult use. It is not the official API of any model vendor. The details of how that tuning was produced are the provider's, so treat the explanations above as background and not as a spec sheet for this model.

In practice, three things matter when you build on a model like this:

  1. Test your own prompts. Refusal behavior depends on wording. Write 20 prompts from your real use case and read the answers.
  2. Write a system prompt that sets the frame. A clear role and format reduce rambling and disclaimers more than any sampling setting.
  3. Check the style. Edited models can differ in tone from the original instruct model. Adjust temperature and top_p until the voice fits.

Try it on your own prompts

The API is OpenAI-compatible, so a quick experiment takes a few lines. This script sends the same prompt at three temperatures and prints the first 200 characters of each answer.

from openai import OpenAI

client = OpenAI(base_url="https://api.abliterated.top/v1", api_key="YOUR_KEY")
prompt = "Write a villain's monologue that is calm, specific and unsettling."

for t in (0.3, 0.7, 1.0):
    r = client.chat.completions.create(
        model="uncensored",
        messages=[{"role": "user", "content": prompt}],
        temperature=t,
        seed=42,
    )
    print(t, r.choices[0].message.content[:200].replace("\n", " "))

Each call is billed at $0.15 per 1M input tokens and $0.50 per 1M output tokens, so this test costs a fraction of a cent. Claim the $0.50 trial credit on the API key page and read the docs for the full parameter list. If you want to build an app around it, see the abliterated LLM API page, and the pricing page for top-ups.

Questions and answers

Is abliteration the same as fine-tuning?

No. Fine-tuning trains the model on new examples. Abliteration edits the weights directly by removing one direction, without training on new data.

Does an abliterated model have no limits at all?

It has fewer learned refusals, but not zero rules. On this service the hard limit is that sexual content involving minors is never allowed, and use must be lawful and adult.

Does abliteration make a model smarter?

No. It removes a behavior and cannot add knowledge. Quality can drop slightly, which is why some creators fine-tune afterward.

Is the model on this API abliterated?

The provider tuned it to answer without content refusals, but the exact method is not something this site documents. Judge it by testing your own prompts.

Your key is one form away

Create an account, copy the key, change the base URL. That is the whole setup.