p-e-w

    p-e-w/heretic

    #101 this week

    Fully automatic censorship removal for language models

    llm
    deep-learning
    abliteration
    transformer
    Python
    AGPL-3.0
    35.4K stars
    4.0K forks
    35.4K GitHub watchers
    Updated Oct 16, 2026
    View on GitHub

    Build with Backblaze B2

    SDKs, agent skills, IDE extensions, and reference pipelines from Backblaze Labs. All open source.

    Explore Backblaze Labs

    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.)

    Excerpt from the p-e-w/heretic README on GitHub (AGPL-3.0 license). © its authors.Read the full README on GitHub

    Daily snapshots

    Stars gained per day, and how forks and open issues moved, from GStars' daily snapshots

    Aug 19: +39Aug 31: +483Sep 1: +430Sep 2: +187Sep 3: +134Sep 4: +145Sep 5: +137Sep 6: +137Sep 7: +121Sep 8: +90Sep 9: +105Sep 10: +82Sep 11: +73Sep 12: +56Sep 13: +48Sep 14: +108Sep 15: +95Sep 16: +109Sep 17: +94Sep 18: +103Sep 19: +99Sep 20: +65Sep 21: +129Sep 22: +102Sep 23: +67Sep 24: +55Sep 25: +47Sep 26: +48Sep 27: +40Sep 28: +21Oct 4: +164Oct 5: +98Oct 6: +348Oct 7: +196Oct 8: +192Oct 9: +227Oct 10: +200Oct 11: +125Oct 12: +83Oct 13: +196Oct 14: +263Oct 15: +151Oct 16: +151

    +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

    p-e-w/heretic compared with LLM repositories by stars, 7-day star growth, health score and last release
    RepositoryStars+7dHealthLast release
    DietrichGebert/ponytail164.4K+5.0K752 days ago
    tashfeenahmed/freellmapi35.8K+3.7K45today
    thedotmack/claude-mem101.1K+2.9K752 days ago
    TencentCloud/TencentDB-Agent-Memory29.3K+1.5K752 days ago
    p-e-w/heretic35.4K+1.4K41123 days ago
    ollama/ollama183.3K+1.0K601 day ago
    Category median101.1K+2.9K75—

    Discover Repositories

    Search across tracked repositories by name or description