HelloPixDig

Directory › Local AI › Heretic

Heretic
Image: official project repository

> GEM LOCAL AI · DEVELOPMENT

Heretic

by p-e-w

A tool that removes the refusals ("safety alignment") from an open language model, such as Gemma or Qwen, that you run yourself. It does not work on Claude or ChatGPT.

43.5 k stars GitHub AGPL-3.0 Open sourceFreeLocal
View on GitHub →

What it does

  • "Directional ablation" (abliteration): the program finds on its own the settings that cut refusals while damaging the model as little as possible, with no configuration
  • Repository figures on Gemma 3 12B (RTX 5090): refusals from 97/100 to 3/100, divergence from the original model (KL) of 0.16, versus 0.45 and 1.04 for two other modified versions
  • One command after install: "heretic Qwen/Qwen3-4B-Instruct-2507"; the model can then be saved, chatted with or uploaded to Hugging Face

! These limits exist to protect: a model without refusals also answers dangerous requests, and you are responsible for that. It only applies to models whose weights you have (Gemma, Qwen, Llama…), never to online services such as Claude or ChatGPT. AGPL-3.0 licence: if you modify the program and make it available online, you must publish your code. Source: the repository README, read on 28 October 2026. We have not tested it ourselves.

Install it

Requirements: Python 3.10+, PyTorch 2.2+ suited to your card, and an NVIDIA graphics card with enough memory for the chosen model.

Install Heretic
pip install -U heretic-llm
Run it on a small open model (repository example)
heretic Qwen/Qwen3-4B-Instruct-2507

The prompt for your agent

Paste it into your coding agent: it checks the requirements and installs it for you.

Claude CodeCodexCursorGemini CLIopencode
Prompt
Install Heretic (https://github.com/p-e-w/heretic) on my machine.
1. Check the requirements: Python 3.10+, PyTorch 2.2+ suited to your card, and an NVIDIA graphics card with enough memory for the chosen model. If anything is missing, tell me before installing anything.
2. Follow the official method:
- Install Heretic: pip install -U heretic-llm
- Run it on a small open model (repository example): heretic Qwen/Qwen3-4B-Instruct-2507
3. Check that it works, then explain how to launch it and where to start.

Always review what your agent is about to run, especially install commands.