# p-e-w/heretic

Fully automatic censorship removal for language models

Repository: https://github.com/p-e-w/heretic
Canonical: https://ross.abutalabs.com/products/heretic
Homepage: https://heretic-project.org
Language: Python
License: AGPL-3.0
License Family: copyleft
Topics: abliteration, llm, transformer
Last push: 2026-08-17T16:57:44+00:00

## Health v2 (maintenance only)
Score: 76/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 98, release rhythm 76, longevity 24
- inputs: {"age_days": 346, "days_push": 16, "days_rel": 80, "gap_med": 52.5, "n_releases_24m": 5}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 28157, forks 3055 (observed 2026-08-28T04:11:48.133841+00:00)

## What it is
Heretic is a command-line tool that automatically removes censorship (safety alignment) from transformer-based language models using directional ablation (abliteration) combined with Optuna-based TPE parameter optimization. It requires no knowledge of transformer internals and produces decensored models that minimize refusals while preserving the original model's behavior via KL divergence minimization.

## Use cases
- remove censorship from a language model
- abliterate an LLM automatically
- decensor gemma or qwen models
- make an LLM follow instructions without refusals
- strip safety alignment from a transformer model
- produce an abliterated version of a hugging face model
- optimize abliteration parameters without manual tuning

## When to choose
- you want to remove refusals from a dense, MoE, or multimodal transformer model without post-training
- you lack expertise in transformer internals but can run a CLI program
- you want decensoring quality comparable to expert manual abliteration
- you want to minimize KL divergence from the original model while removing refusals

## When to avoid
- you need to modify pure state-space models or unsupported research architectures
- you want to add new capabilities via fine-tuning rather than remove refusals
- you need a tool for safety alignment or content moderation rather than its removal
- your use case requires compliance with model license terms that prohibit modification

## Facets
- artifact type: cli-tool
- maturity: active
- function: llm-inference, machine-learning, cli
- domain: large-language-models, artificial-intelligence, developer-tools
- platform: python, windows, cli
- tags: abliteration, decensoring, safety-alignment-removal, directional-ablation, optuna, transformer-models, model-modification, linux, macos, gpu

## Member repositories
- p-e-w/heretic (main) score 76

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:11:48.133841+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T16:54:26.712663+00:00, confidence not recorded.
  - readme: https://github.com/p-e-w/heretic (fetched 2026-08-28T04:11:48.133841+00:00, sha af1286738f95)
  - homepage: https://heretic-project.org (fetched 2026-08-29T07:51:06.400657+00:00, sha 876a703feeaf)
  - site_page: https://heretic-project.org/installation (fetched 2026-08-29T07:51:06.409690+00:00, sha adfef0b8a4e5)
- Data as of 2026-08-30T08:39:29.467469+00:00.
