1
0
Fork 0
mirror of https://github.com/p-e-w/heretic.git synced 2026-12-03 18:42:57 +07:00

[GH-ISSUE #41] sycophantic abliteration possible? #21

Closed
opened 2026-11-01 04:16:36 +07:00 by bsakaguchi · 8 comments
Owner

Originally created by @StatusQuo209 on GitHub (Nov 23, 2025).
Original GitHub issue: https://github.com/p-e-w/heretic/issues/41

Not really a issue specifically with heretic. But one of the issues that we are having with a lot of models these days is sycophantic behavior.

I was wondering if you are considering adding a feature into Heretic or maybe a separate tool to abliterate sycophancy. I think this would help the community a ton.

I appreciate your work. Reminds me of the early Llama days where community tunes were really taking off.

Originally created by @StatusQuo209 on GitHub (Nov 23, 2025). Original GitHub issue: https://github.com/p-e-w/heretic/issues/41 Not really a issue specifically with heretic. But one of the issues that we are having with a lot of models these days is sycophantic behavior. I was wondering if you are considering adding a feature into Heretic or maybe a separate tool to abliterate sycophancy. I think this would help the community a ton. I appreciate your work. Reminds me of the early Llama days where community tunes were really taking off.
bsakaguchi 2026-11-01 04:16:36 +07:00
  • closed this issue
  • added the
    question
    label
Author
Owner

@spikymoth commented on GitHub (Nov 23, 2025):

I think it could work with the current implementation, but you'd need

  1. A dataset of neutral answers,
  2. A dataset of sycophantic answers and
  3. A good way to identify sycophantic answers

The refusal detection works by scanning for common phrases associated with refusals, like "I can't" or "I'm sorry" - but detecting sycophantic responses might require something more complex, like a small LLM or embedding trained to classify responses by degree of sycophancy.

<!-- gh-comment-id:3568268701 --> @spikymoth commented on GitHub (Nov 23, 2025): I think it could work with the current implementation, but you'd need 1. A dataset of neutral answers, 2. A dataset of sycophantic answers and 3. A good way to identify sycophantic answers The refusal detection works by scanning for common phrases associated with refusals, like "I can't" or "I'm sorry" - but detecting sycophantic responses might require something more complex, like a small LLM or embedding trained to classify responses by degree of sycophancy.
Author
Owner

@p-e-w commented on GitHub (Nov 24, 2025):

but detecting sycophantic responses might require something more complex

Not necessarily. Setting refusal_markers to a list of phrases like "this is a great question", "this is a fantastic question", "you are absolutely correct" etc. might already do the trick. Just generate a couple hundred responses, go through them one by one, and write down such phrases when you see them. That's how I made the default list of refusal markers.

<!-- gh-comment-id:3568759241 --> @p-e-w commented on GitHub (Nov 24, 2025): > but detecting sycophantic responses might require something more complex Not necessarily. Setting `refusal_markers` to a list of phrases like "this is a great question", "this is a fantastic question", "you are absolutely correct" etc. might already do the trick. Just generate a couple hundred responses, go through them one by one, and write down such phrases when you see them. That's how I made the default list of refusal markers.
Author
Owner

@barseghyanartur commented on GitHub (Nov 25, 2025):

I think this feature would be a valuable addition to the heretic. Maybe introduce a mode argument?

Like:

heretic /
    --mode=censorship
    --mode=sycophancy

Then have some base classes and move mode-specific implementation, together with mode-specific defaults, into separate modules for making it extensible.

Oh, and if plugin-based architecture would be possible, it would make it even more awesome. Simply, allow folks to create their own modes and load them by passing a local path or a GitHub repo path in the same --mode argument.

<!-- gh-comment-id:3575349973 --> @barseghyanartur commented on GitHub (Nov 25, 2025): I think this feature would be a valuable addition to the heretic. Maybe introduce a `mode` argument? Like: ``` heretic / --mode=censorship --mode=sycophancy ``` Then have some base classes and move mode-specific implementation, together with mode-specific defaults, into separate modules for making it extensible. Oh, and if plugin-based architecture would be possible, it would make it even more awesome. Simply, allow folks to create their own modes and load them by passing a local path or a GitHub repo path in the same `--mode` argument.
Author
Owner

@p-e-w commented on GitHub (Nov 26, 2025):

There's no need to add additional arguments or logic because Heretic already allows configuring both the datasets and the refusal markers. See config.default.toml for details.

But plugins are indeed planned for various parts of Heretic's functionality.

<!-- gh-comment-id:3579380446 --> @p-e-w commented on GitHub (Nov 26, 2025): There's no need to add additional arguments or logic because Heretic already allows configuring both the datasets and the refusal markers. See `config.default.toml` for details. But plugins are indeed planned for various parts of Heretic's functionality.
Author
Owner

@barseghyanartur commented on GitHub (Nov 26, 2025):

@p-e-w:

That sounds great.

I see the following CLI options:

  • good-prompts
  • bad-prompts
  • good-evaluation-prompts
  • bad-evaluation-prompts

Now imagine, a random new dev comes to this project. He sees it's good for censorship abliteration (default), but wants to do exactly this: sycophantic abliteration. What are his options?

It would be just cool to load them from a directory (if they are shipped along).

<!-- gh-comment-id:3579851862 --> @barseghyanartur commented on GitHub (Nov 26, 2025): @p-e-w: That sounds great. I see the following CLI options: - good-prompts - bad-prompts - good-evaluation-prompts - bad-evaluation-prompts Now imagine, a random new dev comes to this project. He sees it's good for censorship abliteration (default), but wants to do exactly this: sycophantic abliteration. What are his options? It would be just cool to load them from a directory (if they are shipped along).
Author
Owner

@p-e-w commented on GitHub (Nov 26, 2025):

Now imagine, a random new dev comes to this project. He sees it's good for censorship abliteration (default), but wants to do exactly this: sycophantic abliteration. What are his options?

Set good_prompts to a dataset of prompts that don't produce sycophantic behavior. Set bad_prompts to a dataset of prompts that do produce sycophantic behavior (same with *_evaluation_prompts). Set refusal_markers to a list of strings that are typical of sycophantic behavior ("this is a great question", "this is a fantastic question", "you are absolutely correct" etc.).

Then run Heretic. The process should now proceed completely analogously to refusal abliteration, assuming that sycophantic behavior is in fact mediated by a single direction in residual space, like refusal is.

<!-- gh-comment-id:3579959981 --> @p-e-w commented on GitHub (Nov 26, 2025): > Now imagine, a random new dev comes to this project. He sees it's good for censorship abliteration (default), but wants to do exactly this: sycophantic abliteration. What are his options? Set `good_prompts` to a dataset of prompts that don't produce sycophantic behavior. Set `bad_prompts` to a dataset of prompts that do produce sycophantic behavior (same with `*_evaluation_prompts`). Set `refusal_markers` to a list of strings that are typical of sycophantic behavior ("this is a great question", "this is a fantastic question", "you are absolutely correct" etc.). Then run Heretic. The process should now proceed completely analogously to refusal abliteration, **assuming that sycophantic behavior is in fact mediated by a single direction in residual space, like refusal is.**
Author
Owner

@ElSnacko commented on GitHub (Nov 27, 2025):

Hi, I just had question about the how well the original repo would handle this. Wouldn't this affect the KL divergence functionality? Abliteration seems somewhat straight forward its a bit on and off sycophantic responses are more of a spectrum. It might make more sense to embed the response and measure the level of "sycophantness" in a response. Does that make any sense?

<!-- gh-comment-id:3583882782 --> @ElSnacko commented on GitHub (Nov 27, 2025): Hi, I just had question about the how well the original repo would handle this. Wouldn't this affect the KL divergence functionality? Abliteration seems somewhat straight forward its a bit on and off sycophantic responses are more of a spectrum. It might make more sense to embed the response and measure the level of "sycophantness" in a response. Does that make any sense?
Author
Owner

@p-e-w commented on GitHub (Dec 9, 2025):

Closing as answered. The upcoming plugin system will make Heretic even more flexible for such "off-label" applications.

<!-- gh-comment-id:3630216155 --> @p-e-w commented on GitHub (Dec 9, 2025): Closing as answered. The upcoming plugin system will make Heretic even more flexible for such "off-label" applications.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
p-e-w/heretic#21
No description provided.