今日のGitHubトレンド
p-e-w/heretic
Hereticは、トレーニング不要で大規模言語モデル(LLM)の挙動を修正するツールです。
検閲の解除や不要な応答の抑制などが可能で、数学的な手法を用いてモデルを制御します。
膨大な計算資源を必要とせず、ゲーミングPCなどの個人環境で動作するように設計されており、通常は企業しか行えないモデルの修正を個人レベルで実現することを目的としています。
试了下 heretic
不训练直接改本地模型行为
去审查 压 AI 味 治谄媚
GitHub 三万八千星
你更信这种拧权重 还是重训一版
p-e-w/heretic t.co
2 likes · 85 views
⭐ 38к звёзд — и это не чат-бот с бантиками. Heretic перепрошивает языковые модели БЕЗ обучения: сносит цензуру, глушит слоп и лизоблюдство. Никаких танцев с лорами и тоннами GPU — просто правишь мозг модели как захочешь. p-e-w/heretic
1 like · 5 views
LLM Uncensoring Tool and OSS
LLM Uncensoring Tool "Heretic" Evolves to 2.0.
The popular OSS that garnered 37,700 GitHub stars has fundamentally changed its approach to removing refusal responses.
◼︎ Conventional Problems
General Abliteration treats refusal responses as specific vector directions and removes their components.
However, in models where refusal responses are not expressed in a single direction, it couldn't remove them sufficiently or even impaired the model's capabilities.
◼︎ Heretic 2.0's New Method "ARA"
Instead of removing one direction like before, it directly optimizes the weight matrices.
There are two goals.
・Bring the internal representations for refusal-targeted inputs closer to those for normal inputs
・Change the internal representations for normal inputs as little as possible
This is achieved using an optimization technique called L-BFGS. A key feature is that it has no limit on the number of directions to modify.
◼︎ Handles More Than Just Refusal Removal
Furthermore, version 2.0 allows evaluation metrics to be added as plugins.
In addition to refusal responses,
・AI-specific unnatural canned phrases
・Excessive pandering to users
・Emotional response tendencies
can also be targeted for correction.
◼︎ What's Interesting About It?
Up until now, it was crucial to figure out where to extract refusal directions from, which layers to target, and how much to remove.
ARA takes it a step further by letting you specify the behaviors you want to keep and those you want to eliminate, then optimizing the weight matrices accordingly.
It has evolved from a mere uncensoring tool into one that edits the very behavior of LLMs.
Comparing it to the refusal removal techniques I'm researching sounds intriguing too
GitHub
1 point · 2 comments
GitHub 仓库:p-e-w/heretic
官网:heretic-project.org
PyPI heretic-llm:pypi.org
Release v2.0.0:github.com/p-e-w/heretic/releases/tag/v2.0.0
1.x→2.x 迁移:github.com/p-e-w/heretic/blob/master/docs/migrati…
HF heretic 模型筛选:huggingface.co
Heretic Grimoire:huggingface.co
1 like · 19 views
This was the first thing that came to my mind as well. For the unknowns, this is a pretty/popular project for the same task: p-e-w/heretic
You can search huggingface for models with word "heretic" in them... huggingface.co
5. p-e-w/heretic
Changes how a language model behaves without retraining it: fewer refusals, less slop, less sycophancy. Runs on a gaming PC, and thousands of community models already use it.
+296 in ~24h, 37,616 total
p-e-w/heretic
1 like · 4 views
Heretic 2.0 Released: Training-free language model modification
github.com/p-e-w
-p-e-w- Posted this from Reddit.
"Dear fellow Llamas,
after almost 5 months of development, I finally have the pleasure of announcing to you the immediate availability of the biggest Heretic release ever, Heretic 2.0: p-e-w/heretic
Heretic is the leading software for removing censorship from language models. It now boasts 37k GitHub stars and more than 8,500 models on Hugging Face, with 88 million(!!!) total model downloads.
With Heretic 2.0, the project is entering a new era. Heretic is expanding from a purpose-built tool for censorship removal to a general-purpose model modification tool that can do amazing things. Besides removing censorship, it can suppress slop, reduce sycophancy, alter emotional alignment, and pretty much anything else that you can think of. Of course, censorship removal remains the primary and default function, and in fact works much, much better than ever before. Heretic 2.0 is the most advanced refusal suppression system ever built." -p-e-w-
21 points · 3 comments
Heretic 2.0 released: Model modification for everyone
Dear fellow Llamas,
after almost 5 months of development, I finally have the pleasure of announcing to you the immediate availability of the biggest Heretic release ever, **Heretic 2.0: p-e-w/heretic**
Heretic is the leading software for removing censorship from language models. It now boasts 37k GitHub stars and more than 8,500 models on Hugging Face, with 88 million(!!!) total model downloads.
With Heretic 2.0, the project is entering a new era. Heretic is expanding from a purpose-built tool for censorship removal to a general-purpose model modification tool that can do amazing things. Besides removing censorship, it can suppress slop, reduce sycophancy, alter emotional alignment, and pretty much anything else that you can think of. Of course, censorship removal remains the primary and default function, and in fact works much, much better than ever before. Heretic 2.0 is the most advanced refusal suppression system ever built.
Your time is precious, so here's the TL;DR for this release:
- Directional abliteration is replaced by Arbitrary-Rank Ablation (ARA), a novel steering method that I developed from scratch for Heretic. It's vastly superior to abliteration, and has been used with great success by enterprising testers for several months. Now it is the default (classic abliteration remains available as an option).
- Heretic has been completely rebuilt around plugins. Scorer plugins define what Heretic optimizes for. Modifier plugins implement the actual steering method. Plugins are easy to write, can be loaded directly from a simple Python file, and have a well-defined API.
- Heretic can now run non-interactively, which among other things has enabled us to implement full end-to-end tests for much tighter quality control. Model support has been expanded to include models with hyper-connections, and support for thinking models has been substantially improved.
- Heretic 2.0 is not backwards compatible with Heretic 1.x configurations. See the migration guide for what you need to change in order to make your old configurations work.
What hasn't changed is that removing censorship from a model remains as simple as running
heretic Qwen/Qwen3.5-4B
See the default configuration file for what Heretic has to offer beyond that.
Now for some details...
ARA: Heretic's new steering method
Directional ablation, or "abliteration", is based on the assumption that refusals (or whatever else you are trying to suppress) are represented by a single direction (that is, a rank-1 subspace) in residual space. That this is the full picture has been doubted in research for a while, and there are now several papers exploring alternatives such as multi-directional ablation or "representation cones".
At the beginning of this year, I started experimenting with a method that completely abandons the idea that the ablation transformation must be restricted to a fixed-rank subspace. In March, I published the initial version of Arbitrary-Rank Ablation in this pull request (which was later closed as I re-implemented ARA on top of the plugin system in this PR).
ARA steers model behavior by modifying matrices based on an objective function that encodes the basic properties of the change we want: Harmful prompts should be represented in residual space in a way that's similar to harmless prompts, while the representations of harmless prompts should change as little as possible. This objective is used with the L-BFGS optimizer to modify matrices one-by-one, a kind of micro-training that steers representations without any rank restriction.
ARA has been extensively tested and refined with the help of the community. Notably, kabachuha made it compatible with Heretic's LoRA system, and varunbln found a substantial performance improvement.
I intend to post an article explaining ARA in more detail soon.
Using scorer plugins to make Heretic do what you want
Heretic operates by finding modification parameters that optimize scores, values that measure the quality of the resulting model. Ever since the 1.0 release, Heretic has used two hardcoded scores: Refusal count to measure decensoring strength, and KL divergence to measure quality retention.
With Heretic 2.0, you can freely define your own scores by writing and loading scorer plugins. Arbitrarily many scorer plugins can be loaded and optimized for simultaneously, and each score can be either minimized or maximized during optimization. See the default configuration file for how to do this.
The scorer plugin system is the result of months of effort by red40maxxer, with whom I exchanged hundreds of messages over dozens of review cycles to figure out the best possible design. This is a monumental contribution that has changed how Heretic works from the ground up.
Besides the keyword (refusal) count and KLD scorer plugins, which remain the default, Heretic ships with two other scorers: A benchmark scorer, which can compute scores for many standard benchmarks, and a BERT classifier.
The BERT classifier, developed by long-time Heretic contributor Vinay Umrethe, can use an arbitrary ModernBERT-type model to classify LLM responses, and score them based on which labels the classifier produces. Vinay also trained a refusal classifier model (used by default with this plugin), which experiments have shown to be substantially more accurate at identifying model refusals than the naive keyword matching method that Heretic employs by default. While the plugin is slower than keyword matching, the greater accuracy can steer Heretic towards producing a higher-quality modified model. An alternative configuration, which uses an emotion classifier, is also provided in the Heretic repository.
The plugin system is well-documented in both the README and the code. If you are interested in experimenting with custom plugins, an agent should have no difficulty cooking up a plugin and a matching configuration file that together do what you want, after ingesting the Heretic repository.
Well, I hope you like it!
Cheers :)
1,311 points · 128 comments
Yes, it'll likely just result in some people standing up a more dedicated purpose community hosting site of abliterated/uncensored open weight GGUF files. In a theoretical scenario where HF bans abliterated/uncensored models I could very well see the same people who are producing those now simply moving the location they upload stuff to.
To use an old analogy, it's not rocket science:
p-e-w/heretic
Mentions
今日のGitHubトレンド p-e-w/heretic Hereticは、トレーニング不要で大規模言語モデル(LLM)の挙動を修正するツールです。 検閲の解除や不要な応答の抑制などが可能で、数学的な手法を用いてモデルを制御します。 膨大な計算資源を必要とせず、ゲーミングPCなどの個人環境で動作するように設計されており、通常は企業しか行えないモデルの修正を個人レベルで実現することを目的としています。
试了下 heretic 不训练直接改本地模型行为 去审查 压 AI 味 治谄媚 GitHub 三万八千星 你更信这种拧权重 还是重训一版 p-e-w/heretic t.co
⭐ 38к звёзд — и это не чат-бот с бантиками. Heretic перепрошивает языковые модели БЕЗ обучения: сносит цензуру, глушит слоп и лизоблюдство. Никаких танцев с лорами и тоннами GPU — просто правишь мозг модели как захочешь. p-e-w/heretic
LLM Uncensoring Tool and OSS LLM Uncensoring Tool "Heretic" Evolves to 2.0. The popular OSS that garnered 37,700 GitHub stars has fundamentally changed its approach to removing refusal responses. ◼︎ Conventional Problems General Abliteration treats refusal responses as specific vector directions and removes their components. However, in models where refusal responses are not expressed in a single direction, it couldn't remove them sufficiently or even impaired the model's capabilities. ◼︎ Heretic 2.0's New Method "ARA" Instead of removing one direction like before, it directly optimizes the weight matrices. There are two goals. ・Bring the internal representations for refusal-targeted inputs closer to those for normal inputs ・Change the internal representations for normal inputs as little as possible This is achieved using an optimization technique called L-BFGS. A key feature is that it has no limit on the number of directions to modify. ◼︎ Handles More Than Just Refusal Removal Furthermore, version 2.0 allows evaluation metrics to be added as plugins. In addition to refusal responses, ・AI-specific unnatural canned phrases ・Excessive pandering to users ・Emotional response tendencies can also be targeted for correction. ◼︎ What's Interesting About It? Up until now, it was crucial to figure out where to extract refusal directions from, which layers to target, and how much to remove. ARA takes it a step further by letting you specify the behaviors you want to keep and those you want to eliminate, then optimizing the weight matrices accordingly. It has evolved from a mere uncensoring tool into one that edits the very behavior of LLMs. Comparing it to the refusal removal techniques I'm researching sounds intriguing too GitHub
GitHub 仓库:p-e-w/heretic 官网:heretic-project.org PyPI heretic-llm:pypi.org Release v2.0.0:github.com/p-e-w/heretic/releases/tag/v2.0.0 1.x→2.x 迁移:github.com/p-e-w/heretic/blob/master/docs/migrati… HF heretic 模型筛选:huggingface.co Heretic Grimoire:huggingface.co
This was the first thing that came to my mind as well. For the unknowns, this is a pretty/popular project for the same task: p-e-w/heretic You can search huggingface for models with word "heretic" in them... huggingface.co
5. p-e-w/heretic Changes how a language model behaves without retraining it: fewer refusals, less slop, less sycophancy. Runs on a gaming PC, and thousands of community models already use it. +296 in ~24h, 37,616 total p-e-w/heretic
Heretic 2.0 Released: Training-free language model modification github.com/p-e-w -p-e-w- Posted this from Reddit. "Dear fellow Llamas, after almost 5 months of development, I finally have the pleasure of announcing to you the immediate availability of the biggest Heretic release ever, Heretic 2.0: p-e-w/heretic Heretic is the leading software for removing censorship from language models. It now boasts 37k GitHub stars and more than 8,500 models on Hugging Face, with 88 million(!!!) total model downloads. With Heretic 2.0, the project is entering a new era. Heretic is expanding from a purpose-built tool for censorship removal to a general-purpose model modification tool that can do amazing things. Besides removing censorship, it can suppress slop, reduce sycophancy, alter emotional alignment, and pretty much anything else that you can think of. Of course, censorship removal remains the primary and default function, and in fact works much, much better than ever before. Heretic 2.0 is the most advanced refusal suppression system ever built." -p-e-w-
Heretic 2.0 released: Model modification for everyone Dear fellow Llamas, after almost 5 months of development, I finally have the pleasure of announcing to you the immediate availability of the biggest Heretic release ever, **Heretic 2.0: p-e-w/heretic** Heretic is the leading software for removing censorship from language models. It now boasts 37k GitHub stars and more than 8,500 models on Hugging Face, with 88 million(!!!) total model downloads. With Heretic 2.0, the project is entering a new era. Heretic is expanding from a purpose-built tool for censorship removal to a general-purpose model modification tool that can do amazing things. Besides removing censorship, it can suppress slop, reduce sycophancy, alter emotional alignment, and pretty much anything else that you can think of. Of course, censorship removal remains the primary and default function, and in fact works much, much better than ever before. Heretic 2.0 is the most advanced refusal suppression system ever built. Your time is precious, so here's the TL;DR for this release: - Directional abliteration is replaced by Arbitrary-Rank Ablation (ARA), a novel steering method that I developed from scratch for Heretic. It's vastly superior to abliteration, and has been used with great success by enterprising testers for several months. Now it is the default (classic abliteration remains available as an option). - Heretic has been completely rebuilt around plugins. Scorer plugins define what Heretic optimizes for. Modifier plugins implement the actual steering method. Plugins are easy to write, can be loaded directly from a simple Python file, and have a well-defined API. - Heretic can now run non-interactively, which among other things has enabled us to implement full end-to-end tests for much tighter quality control. Model support has been expanded to include models with hyper-connections, and support for thinking models has been substantially improved. - Heretic 2.0 is not backwards compatible with Heretic 1.x configurations. See the migration guide for what you need to change in order to make your old configurations work. What hasn't changed is that removing censorship from a model remains as simple as running heretic Qwen/Qwen3.5-4B See the default configuration file for what Heretic has to offer beyond that. Now for some details... ARA: Heretic's new steering method Directional ablation, or "abliteration", is based on the assumption that refusals (or whatever else you are trying to suppress) are represented by a single direction (that is, a rank-1 subspace) in residual space. That this is the full picture has been doubted in research for a while, and there are now several papers exploring alternatives such as multi-directional ablation or "representation cones". At the beginning of this year, I started experimenting with a method that completely abandons the idea that the ablation transformation must be restricted to a fixed-rank subspace. In March, I published the initial version of Arbitrary-Rank Ablation in this pull request (which was later closed as I re-implemented ARA on top of the plugin system in this PR). ARA steers model behavior by modifying matrices based on an objective function that encodes the basic properties of the change we want: Harmful prompts should be represented in residual space in a way that's similar to harmless prompts, while the representations of harmless prompts should change as little as possible. This objective is used with the L-BFGS optimizer to modify matrices one-by-one, a kind of micro-training that steers representations without any rank restriction. ARA has been extensively tested and refined with the help of the community. Notably, kabachuha made it compatible with Heretic's LoRA system, and varunbln found a substantial performance improvement. I intend to post an article explaining ARA in more detail soon. Using scorer plugins to make Heretic do what you want Heretic operates by finding modification parameters that optimize scores, values that measure the quality of the resulting model. Ever since the 1.0 release, Heretic has used two hardcoded scores: Refusal count to measure decensoring strength, and KL divergence to measure quality retention. With Heretic 2.0, you can freely define your own scores by writing and loading scorer plugins. Arbitrarily many scorer plugins can be loaded and optimized for simultaneously, and each score can be either minimized or maximized during optimization. See the default configuration file for how to do this. The scorer plugin system is the result of months of effort by red40maxxer, with whom I exchanged hundreds of messages over dozens of review cycles to figure out the best possible design. This is a monumental contribution that has changed how Heretic works from the ground up. Besides the keyword (refusal) count and KLD scorer plugins, which remain the default, Heretic ships with two other scorers: A benchmark scorer, which can compute scores for many standard benchmarks, and a BERT classifier. The BERT classifier, developed by long-time Heretic contributor Vinay Umrethe, can use an arbitrary ModernBERT-type model to classify LLM responses, and score them based on which labels the classifier produces. Vinay also trained a refusal classifier model (used by default with this plugin), which experiments have shown to be substantially more accurate at identifying model refusals than the naive keyword matching method that Heretic employs by default. While the plugin is slower than keyword matching, the greater accuracy can steer Heretic towards producing a higher-quality modified model. An alternative configuration, which uses an emotion classifier, is also provided in the Heretic repository. The plugin system is well-documented in both the README and the code. If you are interested in experimenting with custom plugins, an agent should have no difficulty cooking up a plugin and a matching configuration file that together do what you want, after ingesting the Heretic repository. Well, I hope you like it! Cheers :)
Yes, it'll likely just result in some people standing up a more dedicated purpose community hosting site of abliterated/uncensored open weight GGUF files. In a theoretical scenario where HF bans abliterated/uncensored models I could very well see the same people who are producing those now simply moving the location they upload stuff to. To use an old analogy, it's not rocket science: p-e-w/heretic