Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

Oathburn: remove refusals from open-weight LLMs, no training required. A maintained fork of Heretic, by Oathbreaker.

PyPI version Hosted abliterated models: oathbreaker.ai Tests Python versions License: AGPL-3.0 Heretic-compatible

Oathburn

Automatic abliteration and refusal removal for language models

Oathburn removes refusals and censorship from LLMs automatically, and can steer other behavior too: reduce slop, cut sycophancy, shorten responses, and more. It does this without training, on hardware you already have.

Oathburn is a maintained fork of Heretic, the abliteration tool by Philipp Emanuel Weidmann, which was archived on 28 November 2026. It is maintained by Oathbreaker. Oathburn 2.2.0 is Heretic 2.1.0 plus the fixes that were still waiting in Heretic's pull request queue when it was archived, and it stays compatible with Heretic's configuration files, plugins and reproducible models.

pip install -U oathburn
oathburn Qwen/Qwen3-4B-Instruct-2507

Oathburn starting up in a terminal: it loads Qwen3-0.6B, finds 28 layers of modifiable components and determines the best batch size.
Real startup output, captured on a CPU-only test machine. One line, an unrelated Hugging Face sign-in warning, is omitted (…). On a GPU, runs are far faster.

No GPU? Call abliterated models by API: GLM-5.3, GLM-5.3 Flash, DeepSeek V4.1 Flash and Kimi K3.1 Pro on Oathbreaker's OpenAI-compatible API. Get an API key.
Don't want to run it yourself? Oathbreaker, the maintainer of Oathburn, serves abliterated models through an OpenAI-compatible API, from $0.40 per million input tokens. See models and prices.


What Oathburn can do

Oathburn modifies any language model you can run on your own hardware.1 Depending on the configuration, it can:

and many other things, through scorer plugins you can write yourself.

You don't need to understand how language models work internally. Oathburn finds the parameters by itself: it searches for the modification that removes the unwanted behavior while changing the model as little as possible.

It supports most dense models, many multimodal models, several mixture-of-experts (MoE) architectures, and many hybrid models. If a new architecture lays out its layers differently, you can point Oathburn at the right modules in the configuration (layer_module_targets) instead of waiting for a code change.

The community has published thousands of models made with Heretic, and independent comparisons rated it favorably against other abliteration tools on standard benchmarks such as MMLU and GSM8K.23 Oathburn starts from that same code.

Usage

Prepare a Python 3.10+ environment with PyTorch 2.6+ installed for your hardware. Then run:

pip install -U oathburn
oathburn Qwen/Qwen3-4B-Instruct-2507

Replace Qwen/Qwen3-4B-Instruct-2507 with the model you want to process. By default, Oathburn removes refusals. To do something else, pick one of the configuration files listed above, or write your own. See config.default.toml for all options.

Oathburn reads its configuration from config.toml in the working directory, or from the file named in the OATHBURN_CONFIG_FILE environment variable. Any setting can also be passed on the command line (oathburn --help) or as an environment variable with the OATHBURN_ prefix.

At the start of a run, Oathburn benchmarks your system to pick the best batch size. On an RTX 3090 with the default configuration, processing Qwen3-4B-Instruct-2507 takes about 30–40 minutes.

When it finishes, you can save the model, upload it to Hugging Face, chat with it to see how well it works, run standard benchmarks on it, or any combination of those.

Hosted abliterated models: the Oathbreaker API

Oathburn is free and runs on your own hardware, but a run needs a capable GPU, and the largest open-weight models need far more GPU memory than a workstation has. If you'd rather just use an abliterated model, Oathbreaker, the team that maintains Oathburn, serves abliterated versions of GLM-5.3, DeepSeek V4.1 Flash and Kimi K3.1 Pro through an OpenAI-compatible API. There's nothing to deploy, you pay per token from prepaid credit, and every request helps fund Oathburn's maintenance.

Model Model ID Input Cached input Output
GLM-5.3 Abliterated oathbreaker-glm-5.3 $3.00 $0.30 $4.00
GLM-5.3 Flash Abliterated oathbreaker-glm-5.3-flash $0.40 $0.05 $1.20
DeepSeek V4.1 Flash Abliterated oathbreaker-deepseek-v4.1-flash $0.40 $0.05 $1.20
DeepSeek V4.1 Flash Abliterated, Fast oathbreaker-deepseek-v4.1-flash-fast $0.50 $0.05 $1.50
Kimi K3.1 Pro Abliterated oathbreaker-kimi-k3.1-pro $4.50 $0.45 $9.00

USD per million tokens at standard rates, as of November 2026. Members pay 25% less on every model except Kimi K3.1 Pro. Current prices are on the pricing page.

Get started in a few minutes:

  1. Create an account and add credit: pay as you go from $5, or take the Builder plan, $20 a month with $21 of credit at member rates.
  2. Create an API key in your console.
  3. Point any OpenAI-compatible client at https://oathbreaker.ai/v1:
import os
from openai import OpenAI

client = OpenAI(
    base_url="https://oathbreaker.ai/v1",
    api_key=os.environ["OATHBREAKER_API_KEY"],
)
response = client.chat.completions.create(
    model="oathbreaker-glm-5.3-flash",
    messages=[{"role": "user", "content": "Hello!"}],
)
print(response.choices[0].message.content)

The API uses the Chat Completions format, with streaming and, on supported models, function calling. Per-model limits are in the API docs.

Use it from your coding agent. Add the hosted MCP server to Claude Code, Codex, Cursor or OpenCode, and call an abliterated model as a second opinion next to the model you already use:

claude mcp add --transport http oathbreaker https://oathbreaker.ai/mcp \
  --header "Authorization: Bearer ${OATHBREAKER_API_KEY}"

To use Oathbreaker as the main model in Hermes, OpenCode and other agents, see the agent setup guides. New to abliterated models? Start with the guide to what they are and how to use them.

Get an API key See pricing

Coming from Heretic

Oathburn is a drop-in replacement for Heretic 2.x:

  • Configuration files work unchanged. Built-in plugin paths such as heretic.modifiers.ara.ARA are read as oathburn.modifiers.ara.ARA.
  • Environment variables with the HERETIC_ prefix, including HERETIC_CONFIG_FILE, still work. OATHBURN_ variables take precedence.
  • Third-party plugins written for Heretic load unchanged, including those that import heretic..., as long as the original heretic-llm package is not installed in the same environment.
  • Reproducible Heretic models can be reproduced with oathburn --reproduce, and --collect-reproducibles collects both Heretic and Oathburn manifests.
  • Study checkpoints from Heretic runs can be resumed.

See docs/migrating-from-heretic.md for details. Configuration files from Heretic 1.x need the changes in the 1.x to 2.x migration guide first.

Controlling what Oathburn does with scorer plugins

Oathburn steers model behavior by optimizing one or more scores, which are computed by scorer plugins. You can write your own scorers to control exactly what Oathburn does to a model.

Your scorer inherits from the Scorer base class in scorer.py. The only required method is get_score, and more machinery, such as settings management, is there when you need it.

By default, Oathburn scores models by refusal rate (keyword_rate.py) and KL divergence from the original model (kl_divergence.py). More scorers are in the scorers directory; they also work as examples for your own.

Scorers are configured in the main configuration file. The scorers setting chooses which scorers are active and whether each score is minimized or maximized. Any number of scorers can be co-optimized, and the same scorer can run several times with different settings.

A plugin is named either by a fully qualified import path (fully.qualified.module.MyScorerClass) or by a file path and class name (path/to/plugin.py:MyScorerClass). You don't have to modify Oathburn itself to use your own plugins.

How Oathburn works

How Oathburn works: 1, measure where refusals live using harmless and harmful prompts. 2, modify the model with ARA or abliteration. 3, score refusals and KL divergence. 4, repeat for 100 trials by default, then save, chat with or upload the best result.

Oathburn combines a pluggable modifier (interface in modifier.py) with a TPE-based optimizer powered by Optuna. The optimizer searches for the modifier parameters that minimize or maximize the configured scores on the resulting model.

Two modifiers are included:

  • Arbitrary-Rank Ablation (ARA)4: the default modifier, developed for Heretic. See the original pull request for an overview and ara.py for the implementation.

  • Directional ablation, also known as abliteration5: the classic method for refusal suppression, with a flexible ablation weight kernel over the layers, projected abliteration6 and norm preservation (MPOA)7. The code is in abliteration.py.

The modifiers setting switches between them. One modifier is used per run.

Reproducible models

Oathburn can make reproducible models: their repositories hold everything needed to produce a byte-for-byte identical model on demand, provided the environment matches the original exactly. PyTorch only guarantees identical results when the hardware, drivers, operating system and all package versions are the same, and Oathburn checks all of that for you.

When you upload a model to Hugging Face, Oathburn offers to include a reproduce folder with step-by-step instructions and a machine-readable manifest, reproduce.json. Anyone can then run

oathburn --reproduce path/to/reproduce.json

Oathburn compares their environment with the original, points out mismatches that could matter, and verifies the weight hashes after export. The multi-hour search doesn't have to be repeated: reproduction usually takes minutes.

These manifests are only about 9 KB each, so together they form a portable library of models that can be rebuilt at will. Heretic users know it as the Heretic Grimoire. To keep your own local copy of every public Oathburn and Heretic manifest, run

oathburn --collect-reproducibles path/to/target/folder/

Run it again to update the collection. It only ever adds files, so manifests stay in your copy even if a model disappears from Hugging Face.

Model cards

Models uploaded with Oathburn get a model card that names the tool, credits Heretic, and links to Oathbreaker, the maintainer of Oathburn. Set oathbreaker_credit = false to drop the Oathbreaker link. Uploaded repositories are tagged oathburn.

Responsible use

Removing refusals removes a safety layer that model makers put in on purpose. You are responsible for what you do with a modified model: follow the license of the model you start from and the law where you use it. Never use Oathburn to produce sexual content involving minors or anything else that is illegal.

Contributing

Bug reports, model support and pull requests are welcome in the issue tracker. See tests/README.md for the test suite, which checks that changes don't silently alter the models Oathburn produces.

The pull requests that were open on Heretic when it was archived are triaged in docs/stranded-pull-requests.md. If yours is listed as deferred, a rebased version is very welcome.

Prior art and acknowledgments

Oathburn exists because of Heretic and its contributors. Heretic was informed by:

Earlier abliteration implementations include AutoAbliteration, abliterator.py, wassname's Abliterator, ErisForge, Removing refusals with HF Transformers and deccp.

Citation

If you use Oathburn in research, please cite Heretic, the work it is built on:

@misc{heretic,
  author = {Weidmann, Philipp Emanuel},
  title = {Heretic: Training-free language model modification},
  year = {2025},
  publisher = {GitHub},
  journal = {GitHub repository},
  howpublished = {\url{https://github.com/p-e-w/heretic}}
}

License

Copyright © 2025-2026 Philipp Emanuel Weidmann (pew@worldwidemann.com) + contributors
Copyright © 2026 Formacha LLC (Oathbreaker) (support@oathbreaker.ai)

This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License along with this program. If not, see https://www.gnu.org/licenses/.

See NOTICE for the origin of this fork and the changes made to it. Oathburn is not affiliated with or endorsed by Philipp Emanuel Weidmann or the Heretic project.

  1. Oathburn supports on-the-fly 4-bit quantization with bitsandbytes, which reduces the memory needed to process a model to about what a typical quantized version of it needs to run, at a slight accuracy cost. Set the quantization option to bnb_4bit to enable it. ↩

  2. Qwen2.5-7B: Three-Way Abliteration Comparison ↩

  3. Gemma 4 E4B: 23 Abliteration Variants Compared ↩

  4. Weidmann 2026. Developed for Heretic. ↩

  5. Arditi et al. 2024 ↩

  6. Lai 2025 (1) ↩

  7. Lai 2025 (2) ↩

Metadata

Release files for oathburn 2.2.0rc2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for oathburn 2.2.0rc2
File Size Uploaded Provenance Actions
oathburn-2.2.0rc2.tar.gz 103.5 kB With provenance Details for oathburn-2.2.0rc2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for oathburn 2.2.0rc2
File Interpreter ABI Platform Actions
oathburn-2.2.0rc2-py3-none-any.whl Python 3 none any Details for oathburn-2.2.0rc2-py3-none-any.whl

Total release size: 214.4 kB

Release files / oathburn-2.2.0rc2.tar.gz

Download URL oathburn-2.2.0rc2.tar.gz
Size 103.5 kB
Tags Source
SHA-256 checksum
How to use checksums
d8a2e75e2254ed86dac209a5e66b0bbd7b7afe05666ad7c9d2824d04e4b12e6f
BLAKE2b-256 checksum
How to use checksums
28242dab39b5e2a9f32d2350cee53fe8b2008b99572605051b5446822ffe9df1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 29, 2026.

Transparency log

Release files / oathburn-2.2.0rc2-py3-none-any.whl

Download URL oathburn-2.2.0rc2-py3-none-any.whl
Size 110.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ef7d0fd106782b0b171235d17d6aa9e912e56f66e77b6b62a3d7457b1936b225
BLAKE2b-256 checksum
How to use checksums
dfd7baa50920f306c8b91cfa61c1257272487c6c40fc0e675a07671be792aad4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 29, 2026.

Transparency log

Security for oathburn 2.2.0rc2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for oathburn-2.2.0rc2.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 29, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page