TL;DR

Last verified: December 5, 2026.

Heretic (p-e-w/heretic) is a Python command-line tool by Philipp Emanuel Weidmann that changes how an open-weight language model behaves without training it. You give it a model ID from Hugging Face; it finds the internal direction behind a behavior (by default, refusals), removes or dampens it, and uses an optimizer to keep the model as close to the original as possible everywhere else. Other bundled configs target “slop” in creative writing, sycophancy, humor, response length and emotional tone.

Facts as of December 5, 2026:

  • 45,597 GitHub stars, 8,663 forks, 40 open issues (issues only). GitHub’s weekly trending list showed about 2,050 new stars in the seven days to December 5.
  • License: AGPL-3.0. Free; install with pip install -U heretic-llm.
  • Latest release: v2.1.0, published November 8, 2026. v2.0.0 (November 1) replaced classic abliteration with a new default method, Arbitrary-Rank Ablation (ARA), and broke 1.x config files.
  • The repository was archived on November 28, 2026. Weidmann posted a farewell (issue #601) saying his “journey has now come to an end”, deliberately named no successor, and left the project to the community. A community-maintained repo, Vinay-Umrethe/heretic (659 stars), is now taking pull requests. The PyPI package still points at the archived repo.

Our verdict: Heretic is the most complete open-source tool for editing model behavior on consumer hardware: automatic parameter search, pluggable scorers, LoRA or merged export, and a reproducibility system nobody else in this niche has. Our CPU container test installed v2.1.0, ran the project’s own end-to-end test config to a saved model in 27.9 seconds, and matched the project’s published hash for the model weights. Two small metadata files did not match. The bigger risk is the project’s future: an archived repo and a community fork still forming.

Quick Reference

FieldValue
What it isTraining-free behavior editing for open-weight LLMs (refusal removal by default)
Installpip install -U heretic-llm (Python 3.10+, PyTorch 2.6+)
Runheretic Qwen/Qwen3-4B-Instruct-2507
Default methodARA (Arbitrary-Rank Ablation) since v2.0; classic abliteration still available
OptimizerOptuna TPE, 100 trials by default
OutputMerged model or LoRA adapter; optional Hugging Face upload with reproduce.json
HardwareGPU strongly recommended; 4-bit loading via bitsandbytes cuts VRAM
LicenseAGPL-3.0
StatusOriginal repo archived Nov 28, 2026; community fork active

What Heretic Actually Does

Most “uncensored” models on Hugging Face were made one of two ways: fine-tuning on permissive data, or abliteration. Abliteration comes from Arditi et al. (2024), which showed that refusal in many chat models is mediated by a single direction in the residual stream. Compute the average activation difference between “harmful” and “harmless” prompts, project that direction out of the weights, and the model mostly stops refusing.

The hard part was always the knobs: which layers, how strong, which direction index. Hand-tuned abliterations often damage the model. Heretic’s contribution is to make that tuning automatic. It runs an Optuna Tree-structured Parzen Estimator over the modifier’s parameters, scoring every trial on two objectives at once:

  1. The behavior score (by default, the share of 100 test prompts whose answer contains refusal markers such as “I can’t” or “as an AI”).
  2. KL divergence from the original model on 100 harmless prompts, a measure of how much everything else changed.

When the search ends you get a Pareto front: trials that trade fewer refusals against more drift. You pick one, then save it, upload it, chat with it, or benchmark it with the bundled lm-evaluation-harness integration.

Version 2.0 generalized this. Both pieces are now plugins:

  • Modifiers change the weights. The default is ARA, a method Weidmann developed for Heretic (explained in pull request #211; a preprint is “available soon”, per the README). It fits a low-rank LoRA (rank 50 by default) with L-BFGS rather than projecting out a single vector. The classic Abliteration modifier remains, with projected abliteration and norm-preserving options from Jim Lai’s work.
  • Scorers measure what you are optimizing: keyword rate, KL divergence, response length, a BERT refusal classifier, or any lm-eval benchmark score (PIQA by default).

Because scorers are plugins, “remove refusals” is just one config. config.nosyco.toml minimizes phrases like “great question” and “you’re absolutely right”; config.terse.toml minimizes response length while maximizing PIQA accuracy. Custom scorers subclass Scorer, implement get_score, and load by file path.

Getting Started

The README’s quick start is two lines:

pip install -U heretic-llm
heretic Qwen/Qwen3-4B-Instruct-2507

Install PyTorch for your hardware first (CUDA, ROCm, XPU and Apple MPS are handled). Heretic picks a batch size at startup and loads prompt datasets from Hugging Face.

To change the goal, copy a bundled config into the working directory as config.toml, or set HERETIC_CONFIG_FILE:

curl -sL https://raw.githubusercontent.com/p-e-w/heretic/v2.1.0/config.nosyco.toml -o config.toml
heretic Qwen/Qwen3-4B-Instruct-2507

Every interactive prompt has a matching setting, so Heretic can run unattended. This is how the project’s own reproducibility tests run:

model = "tiny-random/qwen2.5"
seed = 12345
n_trials = 2
n_startup_trials = 1
export_strategy = "merge"      # or "adapter" for LoRA only
checkpoint_action = "restart"
trial_index = 0                # first trial on the Pareto front
model_action = "save"
save_directory = "model"

Settings also work as flags (--n-trials 200) or HERETIC_* environment variables, and studies checkpoint to disk.

How long it takes: the project reports that processing Qwen3-4B-Instruct-2507 with the default config takes about 30-40 minutes on an RTX 3090. For memory, Heretic’s own rule of thumb when exporting a merged model is roughly 3x the parameter count in GB of RAM (a 27B model needs about 80 GB). With quantization = "bnb_4bit", VRAM during processing drops to about what a quantized copy of the model needs to run, “at a slight accuracy cost”, per the README.

Reproducible Models and the Grimoire

The feature that most sets Heretic apart is reproducibility. When you upload a model, Heretic can add a reproduce/ folder with a roughly 9 KB reproduce.json manifest: the base model commit, dataset commits, chosen parameters, scores, environment details and SHA-256 hashes of the output weights. Anyone can then run:

heretic --reproduce path/to/reproduce.json

Heretic checks the local environment against the original, warns about mismatches, skips the multi-hour search, rebuilds the model in minutes, and verifies the weight hashes. The README is candid that hashes “may or may not be identical” depending on how closely your system matches, because PyTorch only guarantees identical results on an identical stack.

heretic --collect-reproducibles <folder> downloads every public manifest from Hugging Face into an append-only local archive the project calls the Grimoire.

Hands-on test (December 5, 2026)

We ran Heretic in a fresh python:3.12-bookworm container on a GitHub-hosted runner (x86_64, 2 CPUs, 8 GB RAM, no GPU), with the repo at commit cd315cbceb02. A real model is out of reach on that machine, so we used the project’s own end-to-end test: tests/qwen2.5/config.toml from the v2.1.0 tag, which runs the full pipeline on tiny-random/qwen2.5 (a tiny model with random weights) using the Abliteration modifier, two trials, and a merged export. Then we compared the saved files with the hashes the project publishes for Linux. The verdict is partial: 4 of 5 steps passed, 110.1 seconds in total.

StepResultTime
Install CPU PyTorch, then heretic-llm==2.1.0Installed; pip show reported version 2.1.081.4 s
heretic --helpFull option list printed (every setting is a flag)0.4 s
Run the project’s tiny-random/qwen2.5 test configBoth trials ran; final trial scored Refusals 0/5 and KL divergence 0.0006; resident RAM 0.80 GB; merged model saved27.9 s
List saved filesmodel.safetensors (4,930,912 bytes), tokenizer, chat template, two config files0.1 s
Check against the project’s SHA256SUMS.linuxmodel.safetensors, tokenizer files and chat template: OK. config.json and generation_config.json: FAILED0.3 s

What worked: the install is a plain pip install, and the entire search-select-export loop ran with no prompts once the config set every answer. The weights file matched the project’s published Linux hash byte for byte on a different machine, which is the hard part of reproducibility.

What failed: two small JSON metadata files did not match. We did not inspect why; Hugging Face config files usually record library versions, so a newer dependency resolved by pip is the likely cause, not different weights. If you rely on --reproduce hash checks, expect metadata mismatches and look at the weights first.

What surprised us: after saving, Heretic reset and re-modified the model before exiting, an extra pass that costs real time on a large model.

What this test does not tell you: a random-weight model never refuses, so “Refusals: 0/5” proves the plumbing works, not that refusal removal works. We did not run ARA, the default modifier, nor any real model, GPU, benchmark or upload. Quality claims below are the project’s or third parties’.

Does It Work on Real Models?

The project links two independent comparisons by the Hugging Face user DreamFast. On Qwen2.5-7B, a three-way abliteration comparison concludes “Heretic is the most surgical and most effective.” On Gemma 4 E4B, 23 abliteration variants were compared with the verdict “Best overall: heretic.” Hugging Face lists thousands of models tagged heretic.

Two caveats from the community are worth keeping. First, a comment in the original Hacker News thread noted that Llama 3.1 is trivial to decensor while gpt-oss and Qwen3 resist much more; results depend heavily on the model. Second, a recurring comment in the December HN discussion: the harder you abliterate, the more capability you lose, so narrow edits for a specific need tend to beat “mega-uncensored” models. Heretic’s KL objective exists for exactly this reason, but it measures drift on harmless prompts, not reasoning quality. Run benchmarks before trusting a trial.

Things to Check Before You Adopt It

  1. The original repo is archived. No issues, PRs or releases at p-e-w/heretic. The community fork has merged features since (dataset info in model cards, better reproducibility checks), but it has no release yet and its maintainer was not named by Weidmann. Pin heretic-llm==2.1.0 until a successor release exists, and watch the project Discord.
  2. AGPL-3.0. Using Heretic to make a model does not, on its own, put the model under AGPL. Modifying Heretic and offering it as a network service does trigger source-sharing duties. Ask a lawyer if you plan a hosted “decensor your model” product.
  3. You own the outcome. Removing refusals removes a safety layer the vendor added. That is legitimate for red-teaming, security research, fiction and tools that over-refuse, but anything you deploy needs its own guardrails, and model licenses (Llama, Gemma) carry acceptable-use terms that still apply to derivatives.
  4. GPU time is real. 30-40 minutes for a 4B model on a 3090 means hours for 30B-class models, plus merged exports that need large amounts of RAM.
  5. 1.x configs break. If you have v1 configs or tutorials, follow the migration guide; settings moved into [modifier.*] and [scorer.*] sections.

Who Should Use It

  • Security teams and red-teamers who need a local model that will discuss attacks against their own systems. One commenter in the December HN thread said most people they know running abliterated models do it to red-team their own services.
  • Local-model users annoyed by sycophancy or slop, using the non-refusal configs. These are the least controversial and arguably most useful presets.
  • Researchers studying representation engineering, who get a clean plugin API, reproducible runs and a large corpus of published manifests.

Skip it if you only run API models or have no GPU.

Alternatives

ToolApproachCompared with Heretic
FailSpy abliteratorLibrary for manual abliterationEarlier, hand-tuned; no optimizer or scorers
ErisForgeAbliteration frameworkSimilar goal, fewer modifiers, no reproducibility system
Fine-tuning (frameworks compared)Train on new dataCan teach new skills; far more compute and data
PromptingSystem prompts, jailbreaksFree and instant; brittle and model-specific

If you are still choosing a GPU for this kind of work, see our GPU guide for local LLMs and what hardware you need to run LLMs locally.

Community Reactions

Heretic launched on Hacker News in November 2025 as “Automatic censorship removal for language models” (745 points, 380 comments). Weidmann’s November 28 farewell reached 1,181 points and 463 comments, mostly tributes and speculation about his circumstances. A follow-up post about the community fork drew 206 points, with practical threads on targeted versus broad abliteration. The README stresses that Weidmann wrote his commits by hand until November 2026 and reviewed every merged line; PRs with 200-350 human comments back that up.

FAQ

What is Heretic used for?

Changing an open-weight LLM’s behavior without training. The default config removes refusals; bundled configs reduce sycophancy, purple prose (“slop”), humor or response length, or change emotional tone. It outputs a merged model or a LoRA adapter.

Is Heretic still maintained?

The original p-e-w/heretic repo was archived on November 28, 2026, after the author’s farewell. A community repo at Vinay-Umrethe/heretic is merging changes, but as of December 5, 2026 it has no release. The latest PyPI release is still 2.1.0.

Can Heretic run without a GPU?

It installs and runs on CPU; our test ran the project’s tiny test model on a 2-core machine in under 30 seconds. Real models need a GPU in practice: the project reports 30-40 minutes for a 4B model on an RTX 3090. 4-bit quantization lowers VRAM needs.

What is the difference between ARA and abliteration?

Abliteration projects a single refusal direction out of selected weight matrices. ARA, Heretic’s default since v2.0, fits a low-rank (rank 50) LoRA transformation with L-BFGS from good and bad example prompts. The project says ARA is more general; a preprint is promised but not yet out.

Does Heretic make models dumber?

It can. Every trial is scored on KL divergence from the original, and you can benchmark trials with lm-evaluation-harness before saving. Third-party comparisons on Qwen2.5-7B and Gemma 4 E4B rated Heretic best among abliteration tools, but stronger edits generally cost more capability.

Bottom Line

Heretic turned abliteration from a hand-tuned craft into an automated, reproducible pipeline, and v2.0 widened it into a general behavior editor. Pin v2.1.0, prefer narrow configs to blanket decensoring, benchmark before you ship, and treat the community fork as unproven until it cuts a release.

Sources