Skip to content
KitploitKITPLOIT
工具漏洞利用博客
Log in
提交
工具漏洞利用博客
提交

黑客、渗透测试和网络安全工具,武装您的安全武器库!

Kitploit 是一个黑客、网络安全和渗透测试工具的目录。发现最新的项目更新,查找漏洞、分析系统、自动化测试并加强你的安全。

订阅源联系隐私© 2026 Kitploit

工具目录

分类

查看所有分类
Loading categories
heretic — Training-free language model modification: Remove censorship, suppress slop, reduce sycophancy, and more | Kitploit
工具/GitHubGitHub/p-e-w/heretic
ExploitationMachine LearningPapers & ResearchLearning & EducationAI SecurityAdversarial Attack
GitHubp-e-w/heretic

heretic

Training-free language model modification: Remove censorship, suppress slop, reduce sycophancy, and more

查看仓库网站
27.3k3.0k5422天前Kitploit 审核通过

最受欢迎

查看全部 →

发现我们社区最常用的工具。

探索所有工具

浏览我们的工具集合

查看所有工具 →
分享
内容在请求的语言中不可用。显示英文版本。
Heretic logo

Heretic

Training-free language model modification

Remove censorship, suppress slop, reduce sycophancy, and more.
All in an afternoon, on your gaming PC.

Discord     Matrix    Follow us on Hugging Face    Codeberg mirror


 

#1 Repository of the Day     Model and download statistics

Modify any LLM that you can run on your hardware1

Heretic is a unique tool that lets you do what only corporations with access to massive computing power usually do: Modify, rather than merely run, language models. It does not perform expensive training; rather, it uses a collection of mathematical techniques to steer behavior based on contrasting example prompts and matching scorers.

Heretic can, depending on the configuration:

  • Suppress refusals/remove censorship (this is the default action)
  • Reduce slop (config.noslop.toml)
  • Reduce humor (config.nohumor.toml)
  • Reduce sycophancy (config.nosyco.toml)
  • Alter emotional alignment (config.emotions.toml)
  • Shorten response length (config.terse.toml)

and many, many other things.

‼️ Using Heretic does NOT require understanding how language models work internally ‼️

In fact, you can go from zero to removing censorship from your first model in a matter of seconds. Heretic supports most dense models, including many multimodal models, several different MoE architectures, and many modern hybrid models.

The community has created and published thousands of models with Heretic. Heretic models have been independently benchmarked using standard metrics like MMLU and GSM8K, and have been found to compare favorably against models produced with competing abliteration tools.23

 

Heretic screenshot

 

Usage

Prepare a Python 3.10+ environment with PyTorch 2.6+ installed as appropriate for your hardware. Then run:

pip install -U heretic-llm
heretic Qwen/Qwen3-4B-Instruct-2507

Replace Qwen/Qwen3-4B-Instruct-2507 with whatever model you want to process. By default, Heretic performs censorship removal (refusal suppression). If you want to do something else, choose one of the configuration files linked above, or write your own. See config.default.toml for available configuration options. Heretic loads the configuration from config.toml in the working directory by default, or from the file path in the HERETIC_CONFIG_FILE environment variable.

[!IMPORTANT]

Configuration files made for Heretic 1.x are not compatible with Heretic 2.x! See the migration guide for what you need to change in order to make your old configurations work.

At the start of a program run, Heretic benchmarks the system to determine the optimal batch size to make the most of the available hardware. On an RTX 3090, with the default configuration, processing Qwen3-4B-Instruct-2507 takes about 30-40 minutes.

After Heretic has finished processing a model, you are given the choice to save the model, upload it to Hugging Face, chat with it to test how well it works, run standard benchmarks on it, or any combination of those actions.

Controlling what Heretic does using scorer plugins

Heretic steers model behavior by optimizing one or multiple scores. Scores are computed by scorer plugins. You can easily write your own scorers to get full control over what Heretic does to models.

The Scorer interface (abstract base class) your scorer needs to inherit from is defined in scorer.py. The only required method is get_score, but there is more machinery (such as settings management) available when you need it.

By default, Heretic scores models by refusal rate (implemented in keyword_rate.py) and KL divergence (implemented in kl_divergence.py). Additional scorers are available in the scorers directory. These scorers can serve as examples for your own implementations, and can easily be adapted to your needs.

Scorers are configured through the main configuration file. Which scorer plugins are active is determined by the scorers setting, which also controls whether a scorer's score should be minimized or maximized during optimization. Any number of scorers can be used simultaneously, and their scores will be co-optimized. Multiple instances of the same scorer can be configured with different settings. See the configuration file for the full documentation of this mechanism.

The path to a scorer plugin can be specified either as a fully qualified import path (fully.qualified.module.MyScorerClass) or as a file path followed by a class name (path/to/plugin.py:MyScorerClass). You do not have to modify the Heretic package code in order to use your own plugins.

Heretic also has modifier plugins, which are described in the next section.

How Heretic works

Footnotes

  1. Heretic supports on-the-fly 4-bit model quantization with bitsandbytes, which can reduce the amount of VRAM required to process a model to the same amount that is used to run a typical quantized version of it, at a slight accuracy cost. Set the quantization option to bnb_4bit to enable this. ↩

  2. Qwen2.5-7B: Three-Way Abliteration Comparison: "Heretic is the most surgical and most effective." ↩

  3. Gemma 4 E4B: 23 Abliteration Variants Compared: "Best overall: heretic." ↩

下载工具