Heretic
Heretic is a command-line tool that removes a language model's learned refusals (its safety alignment) without retraining it. It relies on directional ablation, or "abliteration" (Arditi et al., 2024): it finds the direction in the model that triggers refusal, then attenuates it. An optimizer (Optuna, TPE method) searches by itself for the settings that minimize both the number of refusals and the gap with the original model (KL divergence), to keep the model's intelligence. AGPL-3.0 license; it supports most dense models, several mixture-of-experts architectures and some multimodal models; pure state-space models are not supported yet.
Strengths
- Fully automatic: one command and a model name, with no need to understand transformer internals
- Finds the balance itself: it minimizes both refusals and the gap with the original model, to limit quality loss
- Useful for research and red teaming: measuring how well the alignment of an open model really holds
Limitations
- Removes guardrails: the resulting model answers what the original refused, and responsibility for its use is entirely yours
- AGPL-3.0: building it into an online service obliges you to publish that service's source
- Coverage limits: only the attention output and MLP down projections are targeted, and pure state-space models are not supported
Best for
- Researchers and security teams testing how robust the alignment of an open model is
- Developers deploying an open model who want to know what a third party can do with it before deciding on their own filters