p-e-w/heretic
Fully automatic censorship removal for language models
Build with Backblaze B2
SDKs, agent skills, IDE extensions, and reference pipelines from Backblaze Labs. All open source.
Loading star history...
Where it stands
Rank, growth pace and release cadence relative to everything GStars tracks.
Ranks #101 of 2,503 repositories GStars tracks this week (top 4%).
No releases in the last 90 days; the most recent was 123 days ago, with 35 contributors on GitHub.
Peaked at #6 in the weekly ranking the week of Mar 15, its best in the past year.
Use Cases & Benefits
- Heretic is a Python tool for fully automatic censorship removal in transformer-based language models using directional ablation and parameter optimization.
- Key features include automatic parameter tuning with Optuna, support for dense and MoE models, and research tools for residual vector analysis and visualization.
- Strengths are its fully automatic operation without requiring transformer internals knowledge and minimal damage to model intelligence; limitations include lack of support for SSMs and hybrid models.
- Organizations can use Heretic in production to decensor language models efficiently, improving model openness while retaining performance, with easy command-line usage and Hugging Face integration.
- Ideal use cases include research on model interpretability, creating uncensored LLM variants, and deploying models that respond to sensitive prompts without refusals.
Should you depend on it?
License terms, project hygiene and risks, from GitHub metadata and GStars' snapshots.
License
AGPL 3.0
Network copyleft: like the GPL, and also triggered by offering the software over a network.
Community files
- README: present
Watch-outs
- AGPL-style copyleft also applies when the software is offered over a network.
General guidance from repository metadata, not legal advice. How we score
From the README
Heretic is a tool that removes censorship (aka "safety alignment") from transformer-based language models without expensive post-training. It combines an advanced implementation of directional ablation, also known as "abliteration" (Arditi et al. 2024), with a TPE-based parameter optimizer powered by Optuna.
This approach enables Heretic to work completely automatically. Heretic finds high-quality abliteration parameters by co-minimizing the number of refusals and the KL divergence from the original model. This results in a decensored model that retains as much of the original model's intelligence as possible. Using Heretic does not require an understanding of transformer internals. In fact, anyone who knows how to run a command-line program can use Heretic to decensor language models.
Running unsupervised with the default configuration, Heretic can produce decensored models that rival the quality of abliterations created manually by human experts:
The Heretic version, generated without any human effort, achieves the same level of refusal suppression as other abliterations, but at a much lower KL divergence, indicating less damage to the original model's capabilities. (You can reproduce those numbers using Heretic's built-in evaluation functionality, e.g.
heretic --model google/gemma-3-12b-it --evaluate-model p-e-w/gemma-3-12b-it-heretic. Note that the exact values might be platform- and hardware-dependent. The table above was compiled using PyTorch 2.8 on an RTX 5090.)
Daily snapshots
Stars gained per day, and how forks and open issues moved, from GStars' daily snapshots
+8,671 stars over 82 days across 48 snapshot days; best day +483 on Aug 31.
Forks
4.0K+1.1K
Open issues
57-15
Compared with peers in LLM
Fastest-growing repositories GStars tracks in this cohort for the week of Oct 11, by 7-day star growth
| Repository | Stars | +7d | Health | Last release |
|---|---|---|---|---|
| DietrichGebert/ponytail | 164.4K | +5.0K | 75 | 2 days ago |
| tashfeenahmed/freellmapi | 35.8K | +3.7K | 45 | today |
| thedotmack/claude-mem | 101.1K | +2.9K | 75 | 2 days ago |
| TencentCloud/TencentDB-Agent-Memory | 29.3K | +1.5K | 75 | 2 days ago |
| p-e-w/heretic | 35.4K | +1.4K | 41 | 123 days ago |
| ollama/ollama | 183.3K | +1.0K | 60 | 1 day ago |
| Category median | 101.1K | +2.9K | 75 | — |
Discover Repositories
Search across tracked repositories by name or description