Rank #07 · Daily · AI
Heretic: Training-Free Behavior Editing for LLMs (AGPL-3.0)
Point it at a Hugging Face model and get a behavior-modified copy in an afternoon on a gaming GPU. Know what you're removing before you ship it.
License: AGPL-3.0 — modifying and offering as a network service can require sharing corresponding source. Legal review before commercial SaaS embedding.
What it does
Heretic changes how a model behaves without fine-tuning. It contrasts example prompts, scores the model's outputs, and edits weights along the directions it finds:
- Modifiers. The default is Arbitrary-Rank Ablation (ARA). Classic directional ablation ("abliteration") is also included, with a flexible, non-constant ablation weight kernel.
- Scorers. For example, a refusal keyword rate plus KL divergence from the original model, to limit collateral damage.
- Optimization. Optuna searches for modifier parameters that balance the target behavior against KL.
- Presets. The default config suppresses refusals. Other configs target slop, humor, sycophancy, or emotional alignment.
- Usage.
pip install -U heretic-llm, thenheretic <hf-model-id>. Optional bnb 4-bit quantization reduces VRAM. The README cites about 30–40 minutes for Qwen3-4B on an RTX 3090. Afterward you can save the model, upload it, chat with it, or benchmark it.
Note: Heretic 1.x configs are not compatible with 2.x. See the migration guide.
Who it's for
Interpretability and alignment researchers, local-model hobbyists, and teams studying how refusal and style behaviors are represented in a model. Some of the README's evidence comes from community comparisons on Reddit, not a peer-reviewed benchmark.
Stars / language / license
38,104 stars · Python · AGPL-3.0
Data verified: 2026-11-03 09:04 Asia/Shanghai (GitHub API get_repository + README get_file_contents)
Trending note: +420 stars today (Trending selection captured 09:02 Asia/Shanghai)
> License note: AGPL-3.0. If you modify Heretic and offer it to users over a network (for example as a hosted "uncensor-my-model" service), AGPL requires you to provide your modified source to those users. Get legal review before embedding it in a commercial product. Models you produce keep the base model's license and acceptable-use terms.
Category tags
AI · LLM · abliteration · interpretability · model-editing · Optuna · AGPL
How it differs from similar projects
Earlier abliteration notebooks and scripts usually hard-code one refusal direction per layer and need manual tuning. Heretic automates the search (Optuna plus KL constraints), offers more than one modifier, and generalizes beyond refusals through pluggable scorers. Compared with fine-tuning (LoRA/DPO), it needs no training data pipeline or gradient updates.
Safety implications. Removing refusals also removes the guardrails that reduce harmful outputs. A modified model may violate the base model's license or AUP, and your deployment carries the responsibility. Evaluate capability regressions yourself. TidyHow doesn't vouch for any quality numbers.