heretic — What is it?

Heretic is an open-source tool designed to automatically remove censorship from transformer-based language models without the need for expensive post-training.

⭐ 25,286 Stars 🍴 2,720 Forks Python AGPL-3.0 Author: p-e-w
Source: Official README and linked documentation View on GitHub →

Why it matters

Heretic is being discussed because its innovative approach to censorship removal, which is both automatic and effective. It addresses the pain point of manual censorship removal, which is time-consuming and requires expertise. The project differs through its use of directional ablation and TPE-based parameter optimization, which allows for high-quality abliteration without damaging the original model's intelligence.

Source: Official README and linked documentation

Core Features

Automatic Censorship Removal

Heretic automatically finds high-quality abliteration parameters by co-minimizing the number of refusals and KL divergence from the original model, resulting in a decensored model that retains much of the original model's intelligence.

Source: Official README and linked documentation
Support for Various Models

Heretic supports most dense models, including many multimodal models, several different MoE architectures, and even some hybrid models like Qwen3.5.

Source: Official README and linked documentation
Research Features

Heretic provides research features such as generating plots of residual vectors and printing details about residual geometry, which support the study of model semantics and interpretability.

Source: Official README and linked documentation

Architecture

The architecture of Heretic is modular, with distinct components for analysis, configuration, evaluation, and system management. It uses a TPE-based parameter optimizer and directional ablation techniques. The code structure is organized into a clear hierarchy, with a focus on maintainability and scalability.

Source: Official repository tree and dependency files

Project Knowledge Graph

Knowledge graph: project (center) + core features (inner hexagons) + key dependencies (outer chips) accelerate bitsandbytes datasets huggingface-hub immutabledict Automatic Censorship RemovalAutomatic Censorshi… Support for Various ModelsSupport for Various… Research Features heretic Project Core feature Key dependency

Tech Stack

LanguagePythonFrameworkPyTorch
acceleratebitsandbytesdatasetshuggingface-hubimmutabledictkernelslangdetectlm-eval[hf]numpyoptunapeftpsutilpy-cpuinfopydantic-settingsquestionaryrichtomli-wtqdmtransformers
Not enough information.
Source: Official repository tree and dependency files

Quick Start

Prepare a Python 3.10+ environment with PyTorch 2.2+ installed. Run `pip install -U heretic-llm` and then `heretic <model>` to decensor a model.
Source: Official README and linked documentation

Use Cases

Heretic is suitable for developers and researchers working with language models who need to remove censorship without manual intervention. It is useful in scenarios where models need to generate responses on sensitive topics, such as political or social issues.

Source: Official README and linked documentation

Strengths & Limitations

Strengths

  • Fully automatic censorship removal process
  • Supports a wide range of models
  • Provides research features for model interpretability

Limitations

  • Limited support for certain model architectures
  • May require significant computational resources for large models
Source: Official README and linked documentation

Latest Release

The latest stable Release is v1.4.0, published on 2026-06-14. It added reproduce.json reproduction, plain-text prompt datasets, LoRA export fixes, and broader model support. The current master branch is already 2.0.0.dev0.

Source: github.com/p-e-w/heretic/releases/tag/v1.4.0

Verification and evidence

status: docs-only  |  checked_at: 2026-09-23  |  environment: Check the official README, pyproject.toml, AGPL-3.0 license, v1.4.0 release against the official listing  |  limitations: PyTorch or Heretic not installed, models and datasets not downloaded, ablation, evaluation, saving, uploading or chat not running, rejection rate not reproduced, KL, video memory and time consuming  |  observed_output: The latest official release is v1.4.0, released on 2026-06-14; the current master's pyproject.toml is marked 2.0.0.dev0 and requires Python 3.10 +

Source: github.com/p-e-w/heretic/releases/tag/v1.4.0

Comparison

ErisForge lets researchers select layers, directions, and ablation/addition transforms through a Python API and includes refusal-expression scoring. Heretic automates direction construction, TPE search, dual-objective evaluation, and the CLI workflow. Evaluate ErisForge for manual control and Heretic for automated search with reproducible experiment records.

Source: github.com/Tsadoq/ErisForge

Verdict

Heretic is a project for those working with language models who need to remove censorship efficiently. It is particularly suitable for developers and researchers who require high-quality abliteration without manual intervention and are willing to invest in computational resources.

Source: Official repository

Frequently Asked Questions

What did the documentation review verify for heretic on 2026-09-23?

The latest official release is v1.4.0, released on 2026-06-14; the current master's pyproject.toml is marked 2.0.0.dev0 and requires Python 3.10 + PyTorch or Heretic not installed, models and datasets not downloaded, ablation, evaluation, saving, uploading or chat not running, rejection rate not reproduced, KL, video…

What evidence boundary applies to this heretic review?

The review environment was: Check the official README, pyproject.toml, AGPL-3.0 license, v1.4.0 release against the official listing heretic behavior outside that scope still needs a local check.

Sources and review scope
This review is based on the project's public documentation. Versions, installation commands, and feature boundaries can change upstream; check the cited sources and current release before use. Sources checked on: 2026-09-23 13:55.

Reference materials: README, GitHub API, dependency files