#55th of 7 in Training and fine-tuning

heretic

Removes refusal behavior from transformer language models via automated abliteration

Stars
35.3k
License
AGPL-3.0
Last commit
Oct 2026
Last release
Jun 2026
Language
Python
Stars, last 29 weeks+18,432
25 Mar 2026: 16,859 stars1 Apr 2026: 17,690 stars8 Apr 2026: 18,497 stars15 Apr 2026: 19,051 stars22 Apr 2026: 19,376 stars29 Apr 2026: 19,867 stars6 May 2026: 20,232 stars13 May 2026: 20,467 stars20 May 2026: 20,751 stars27 May 2026: 21,791 stars3 Jun 2026: 23,183 stars10 Jun 2026: 23,808 stars17 Jun 2026: 24,763 stars24 Jun 2026: 25,125 stars1 Jul 2026: 25,385 stars8 Jul 2026: 25,630 stars15 Jul 2026: 26,059 stars22 Jul 2026: 26,364 stars29 Jul 2026: 26,669 stars5 Aug 2026: 26,908 stars12 Aug 2026: 27,142 stars19 Aug 2026: 27,681 stars26 Aug 2026: 27,977 stars2 Sept 2026: 30,049 stars9 Sept 2026: 30,913 stars16 Sept 2026: 31,487 stars23 Sept 2026: 32,169 stars30 Sept 2026: 32,527 stars7 Oct 2026: 33,916 stars14 Oct 2026: 35,291 stars

16,859 on 25 Mar 202635,291 on 14 Oct 2026

From GitHub's daily star counts.

Checked on GitHub.

Overview

Heretic applies directional ablation (abliteration) to the attention out-projection and MLP down-projection matrices of a transformer model. An Optuna TPE optimizer searches the ablation parameters, co-minimizing refusals and KL divergence from the original model. After a run it can save the model, upload it to Hugging Face, chat with it, or run benchmarks.

Who it is for: Users who want to decensor open-weight LLMs without manual abliteration work

Strengths

  • One command, no configuration needed; Optuna TPE tunes ablation parameters automatically
  • README reports 3/100 refusals at 0.16 KL on gemma-3-12b-it, versus 0.45 and 1.04 for manual abliterations
  • Supports most dense models, several MoE architectures, and some multimodal and hybrid models
  • Optional bitsandbytes 4-bit quantization (bnb_4bit) reduces VRAM needs

Weaknesses

  • Pure state-space models and some research architectures are not supported out of the box
  • AGPL-3.0 license may restrict use in proprietary or networked products
  • About 20-30 minutes for a 4B model on an RTX 3090; larger models unknown
  • README metrics come from one RTX 5090 setup and may vary by hardware

What it needs

  • GPU optional
  • Needs Python 3.10+, PyTorch 2.2+, Optuna, bitsandbytes (optional), Hugging Face
  • Models: Hugging Face transformer models (dense), MoE, multimodal, hybrid (Qwen3.5), MXFP4 (gpt-oss, needs PyTorch 2.6+)

Also in Training and fine-tuning

See all 7
Also in Training and fine-tuning
RankProjectScore
1unslothDesktop and web app to run, fine-tune and export open models Live demo ↗ (opens in a new tab)78k starsApache-2.087 out of 100
2deepspeedPyTorch library for distributed training of large models with ZeRO43.2k starsApache-2.074 out of 100
3llamafactoryFine-tuning toolkit for 100+ LLMs with a CLI and Gradio web UI Live demo ↗ (opens in a new tab)75.5k starsApache-2.072 out of 100
#4minimindTrain a 64M-parameter LLM from scratch in plain PyTorch Live demo ↗ (opens in a new tab)63.8k starsApache-2.063 out of 100
#6nanochatMinimal PyTorch codebase to train and chat with a small GPT-2-class LLM58.6k starsMIT49 out of 100