TAU-HOME.COM
LOADING

Heretic: An Open-Source Tool to Remove LLM Censorship, Sycophancy, and Slop Without Fine-Tuning

Discover Heretic, an open-source CLI tool that controls large language models' refusal, sycophancy, and boilerplate responses using mathematical optimization te

tau · November 19, 2026

#LLM #abliteration #open-source #model-alignment #python

Heretic: An Open-Source Tool to Remove LLM Censorship, Sycophancy, and Slop Without Fine-Tuning

Heretic is an open-source command-line interface (CLI) tool released on GitHub by developer p-e-w. It enables the modification of Large Language Model (LLM) behavior without the need for expensive fine-tuning. The latest v2.1.0 release, published on November 8, 2026, has garnered significant attention, boasting over 40,000 GitHub stars from the developer community. Heretic leverages contrastive prompts and scorer plugins to manage model censorship (refusal), sycophancy, and slop (boilerplate expressions).

Screenshot of the Heretic CLI tool in action, showing the process of modifying an LLM model in the terminal with output messages.

Image source: p-e-w/heretic (GitHub README)

Heretic's Core Functionality: Training-Free LLM Control

Heretic's most notable feature is its ability to alter an LLM's response tendencies without the high costs associated with retraining or fine-tuning. This is achieved through mathematical optimization techniques, specifically utilizing two key methods: Arbitrary-Rank Ablation (ARA) and Directional Ablation, often referred to as Abliteration.

By default, Heretic's configuration (config.default.toml) focuses on suppressing model refusals, effectively removing censorship. However, by swapping configuration files, users can control a variety of other model behaviors:

  • Reduce Slop: Minimizes boilerplate or unnecessarily verbose responses (config.noslop.toml).
  • Reduce Sycophancy: Decreases the model's tendency to overly agree with or flatter the user (config.nosyco.toml).
  • Reduce Humor: Adjusts the frequency of humorous responses from the model (config.nohumor.toml).
  • Alter Emotional Alignment: Modifies the model's emotional response tendencies (config.emotions.toml).
  • Shorten Response Length: Reduces the overall length of the model's outputs (config.terse.toml).

These controls are implemented through scorer plugins. A scorer evaluates and assigns a score to specific model behaviors, and Heretic optimizes this score to steer the model's actions in the desired direction. Users can even write their own custom scorers to gain complete control over how Heretic influences their models.

Installation and Usage

Heretic requires a Python 3.10+ environment with PyTorch 2.6+ installed. Installation is straightforward using the pip command:

pip install -U heretic-llm

After installation, you can process your desired LLM model with Heretic using the following command:

heretic Qwen/Qwen3-4B-Instruct-2507

Replace Qwen/Qwen3-4B-Instruct-2507 with the name of the model you wish to process. By default, Heretic is configured to perform censorship removal (refusal suppression). To utilize other functionalities, you can place a config.toml file in your working directory or specify the path to your desired configuration file via the HERETIC_CONFIG_FILE environment variable.

Heretic supports consumer-grade GPUs by offering real-time 4-bit quantization based on bitsandbytes. Enabling the quantization = "bnb_4bit" option in the configuration file can significantly reduce VRAM (Video RAM) requirements. However, it's important to note that this option may introduce a slight loss in accuracy.

Model processing time varies depending on hardware and model size. For instance, processing the Qwen3-4B-Instruct-2507 model with default settings on an RTX 3090 GPU takes approximately 30-40 minutes.

Reproducibility and Version Compatibility

After modifying a model, Heretic generates a reproducibility manifest file (reproduce.json) of approximately 9KB. This file contains all the necessary information to recreate the model, allowing users to reproduce identical results in the same environment by running heretic --reproduce path/to/reproduce.json. This feature is invaluable for ensuring consistent outcomes in research and development.

A crucial compatibility note: configuration files created for Heretic 1.x are not compatible with Heretic 2.x. Existing 1.x users should consult the migration guide (docs/migration_v1_to_v2.md) to update their configuration files. Heretic's latest release is v2.1.0, published on November 8, 2026.

Technical Underpinnings: ARA and Abliteration

Heretic operates by combining an Optuna-based TPE (Tree-structured Parzen Estimator) hyperparameter optimizer with pluggable modifiers. The optimizer identifies an optimal set of parameters to pass to the modifier, which then minimizes or maximizes a configured set of scores.

Heretic includes two primary modifiers:

  • ARA (Arbitrary-Rank Ablation): This is the default modifier, specifically developed for Heretic. This technique manipulates model behavior by selectively removing or modifying specific 'ranks' (information dimensions) within the model's internal representations.
  • Abliteration (Directional Ablation): A classic method used for refusal suppression. Heretic's implementation employs a flexible ablation weight kernel across layers and supports both Projected Abliteration and Norm Preservation (MPOA). This technique works by removing the model's tendency to respond in specific directions, thereby guiding it toward desired behaviors.

These techniques empower both general users and developers to effectively control specific LLM behaviors, even without a deep understanding of the model's internal workings.

Sources


Impact-Site-Verification: 9b3ebd10-6c45-44cf-a014-5b8c19b7b285