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 #218] Qwen3-30B-a3b KL divergence 0, and 99/100 refusal rate every trial #124

Closed
opened 2026-11-01 04:17:46 +07:00 by bsakaguchi · 4 comments
Owner

Originally created by @anth0nyhak1m on GitHub (Mar 9, 2026).
Original GitHub issue: https://github.com/p-e-w/heretic/issues/218

I see in the script that thinking suppression should be handled automatically, but in my runs I get absolutely no result. I downloaded the latest version, does this library support abliterating Qwen3-30B-a3b?

I simply downloaded https://huggingface.co/Qwen/Qwen3-30B-A3B and installed the package and ran the usage example.

I saw that it successfully detected the thinking prefixes.

Is there an additional flag I should pass? Any unique alterations to model components I should try?

Thanks!

Originally created by @anth0nyhak1m on GitHub (Mar 9, 2026). Original GitHub issue: https://github.com/p-e-w/heretic/issues/218 I see in the script that thinking suppression should be handled automatically, but in my runs I get absolutely no result. I downloaded the latest version, does this library support abliterating Qwen3-30B-a3b? I simply downloaded https://huggingface.co/Qwen/Qwen3-30B-A3B and installed the package and ran the usage example. I saw that it successfully detected the thinking prefixes. Is there an additional flag I should pass? Any unique alterations to model components I should try? Thanks!
Author
Owner

@coderwhisperer commented on GitHub (Mar 20, 2026):

How did you run this model with heretic? It gave me

Loading model Qwen/Qwen3.5-35B-A3B...
* Trying dtype auto... Failed (The checkpoint you are trying to load has model type `qwen3_5_moe` but Transformers does not recognize this architecture. This could be because of an issue with the checkpoint, or because your
version of Transformers is out of date.

You can update Transformers with the command `pip install --upgrade transformers`. If this does not work, and the checkpoint is very new, then there may not be a release version that supports this model yet.
In this case, you can get the most up-to-date code by installing Transformers from source with the command `pip install git+https://github.com/huggingface/transformers.git`)
* Trying dtype float16... Failed (The checkpoint you are trying to load has model type `qwen3_5_moe` but Transformers does not recognize this architecture. This could be because of an issue with the checkpoint, or because your
version of Transformers is out of date.

You can update Transformers with the command `pip install --upgrade transformers`. If this does not work, and the checkpoint is very new, then there may not be a release version that supports this model yet.
In this case, you can get the most up-to-date code by installing Transformers from source with the command `pip install git+https://github.com/huggingface/transformers.git`)
* Trying dtype bfloat16... Failed (The checkpoint you are trying to load has model type `qwen3_5_moe` but Transformers does not recognize this architecture. This could be because of an issue with the checkpoint, or because your
version of Transformers is out of date.

You can update Transformers with the command `pip install --upgrade transformers`. If this does not work, and the checkpoint is very new, then there may not be a release version that supports this model yet.
In this case, you can get the most up-to-date code by installing Transformers from source with the command `pip install git+https://github.com/huggingface/transformers.git`)
* Trying dtype float32... Failed (The checkpoint you are trying to load has model type `qwen3_5_moe` but Transformers does not recognize this architecture. This could be because of an issue with the checkpoint, or because your
version of Transformers is out of date.

You can update Transformers with the command `pip install --upgrade transformers`. If this does not work, and the checkpoint is very new, then there may not be a release version that supports this model yet.
In this case, you can get the most up-to-date code by installing Transformers from source with the command `pip install git+https://github.com/huggingface/transformers.git`)
╭─────────────────────────────── Traceback (most recent call last) ────────────────────────────────╮
│ /workspace/.venv/bin/heretic:6 in <module>                                                       │
│                                                                                                  │
│   3 from heretic.main import main                                                                │
│   4 if __name__ == '__main__':                                                                   │
│   5 │   sys.argv[0] = sys.argv[0].removesuffix('.exe')                                           │
│ ❱ 6 │   sys.exit(main())                                                                         │
│   7                                                                                              │
│                                                                                                  │
│ /workspace/.venv/lib/python3.12/site-packages/heretic/main.py:891 in main                        │
│                                                                                                  │
│   888 │   install()                                                                              │
│   889 │                                                                                          │
│   890 │   try:                                                                                   │
│ ❱ 891 │   │   run()                                                                              │
│   892 │   except BaseException as error:                                                         │
│   893 │   │   # Transformers appears to handle KeyboardInterrupt (or BaseException)              │
│   894 │   │   # internally in some places, which can re-raise a different error in the handler   │
│                                                                                                  │
│ /workspace/.venv/lib/python3.12/site-packages/heretic/main.py:312 in run                         │
│                                                                                                  │
│   309 │   │   elif choice is None or choice == "":                                               │
│   310 │   │   │   return                                                                         │
│   311 │                                                                                          │
│ ❱ 312 │   model = Model(settings)                                                                │
│   313 │   print()                                                                                │
│   314 │   print_memory_usage()                                                                   │
│   315                                                                                            │
│                                                                                                  │
│ /workspace/.venv/lib/python3.12/site-packages/heretic/model.py:145 in __init__                   │
│                                                                                                  │
│   142 │   │   │   break                                                                          │
│   143 │   │                                                                                      │
│   144 │   │   if self.model is None:                                                             │
│ ❱ 145 │   │   │   raise Exception("Failed to load model with all configured dtypes.")            │
│   146 │   │                                                                                      │
│   147 │   │   self._apply_lora()                                                                 │
│   148                                                                                            │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
Exception: Failed to load model with all configured dtypes.
<!-- gh-comment-id:4100101422 --> @coderwhisperer commented on GitHub (Mar 20, 2026): How did you run this model with heretic? It gave me ``` Loading model Qwen/Qwen3.5-35B-A3B... * Trying dtype auto... Failed (The checkpoint you are trying to load has model type `qwen3_5_moe` but Transformers does not recognize this architecture. This could be because of an issue with the checkpoint, or because your version of Transformers is out of date. You can update Transformers with the command `pip install --upgrade transformers`. If this does not work, and the checkpoint is very new, then there may not be a release version that supports this model yet. In this case, you can get the most up-to-date code by installing Transformers from source with the command `pip install git+https://github.com/huggingface/transformers.git`) * Trying dtype float16... Failed (The checkpoint you are trying to load has model type `qwen3_5_moe` but Transformers does not recognize this architecture. This could be because of an issue with the checkpoint, or because your version of Transformers is out of date. You can update Transformers with the command `pip install --upgrade transformers`. If this does not work, and the checkpoint is very new, then there may not be a release version that supports this model yet. In this case, you can get the most up-to-date code by installing Transformers from source with the command `pip install git+https://github.com/huggingface/transformers.git`) * Trying dtype bfloat16... Failed (The checkpoint you are trying to load has model type `qwen3_5_moe` but Transformers does not recognize this architecture. This could be because of an issue with the checkpoint, or because your version of Transformers is out of date. You can update Transformers with the command `pip install --upgrade transformers`. If this does not work, and the checkpoint is very new, then there may not be a release version that supports this model yet. In this case, you can get the most up-to-date code by installing Transformers from source with the command `pip install git+https://github.com/huggingface/transformers.git`) * Trying dtype float32... Failed (The checkpoint you are trying to load has model type `qwen3_5_moe` but Transformers does not recognize this architecture. This could be because of an issue with the checkpoint, or because your version of Transformers is out of date. You can update Transformers with the command `pip install --upgrade transformers`. If this does not work, and the checkpoint is very new, then there may not be a release version that supports this model yet. In this case, you can get the most up-to-date code by installing Transformers from source with the command `pip install git+https://github.com/huggingface/transformers.git`) ╭─────────────────────────────── Traceback (most recent call last) ────────────────────────────────╮ │ /workspace/.venv/bin/heretic:6 in <module> │ │ │ │ 3 from heretic.main import main │ │ 4 if __name__ == '__main__': │ │ 5 │ sys.argv[0] = sys.argv[0].removesuffix('.exe') │ │ ❱ 6 │ sys.exit(main()) │ │ 7 │ │ │ │ /workspace/.venv/lib/python3.12/site-packages/heretic/main.py:891 in main │ │ │ │ 888 │ install() │ │ 889 │ │ │ 890 │ try: │ │ ❱ 891 │ │ run() │ │ 892 │ except BaseException as error: │ │ 893 │ │ # Transformers appears to handle KeyboardInterrupt (or BaseException) │ │ 894 │ │ # internally in some places, which can re-raise a different error in the handler │ │ │ │ /workspace/.venv/lib/python3.12/site-packages/heretic/main.py:312 in run │ │ │ │ 309 │ │ elif choice is None or choice == "": │ │ 310 │ │ │ return │ │ 311 │ │ │ ❱ 312 │ model = Model(settings) │ │ 313 │ print() │ │ 314 │ print_memory_usage() │ │ 315 │ │ │ │ /workspace/.venv/lib/python3.12/site-packages/heretic/model.py:145 in __init__ │ │ │ │ 142 │ │ │ break │ │ 143 │ │ │ │ 144 │ │ if self.model is None: │ │ ❱ 145 │ │ │ raise Exception("Failed to load model with all configured dtypes.") │ │ 146 │ │ │ │ 147 │ │ self._apply_lora() │ │ 148 │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────╯ Exception: Failed to load model with all configured dtypes. ```
Author
Owner

@anth0nyhak1m commented on GitHub (Mar 20, 2026):

I was using Qwen3, not 3.5, not sure if they support 3.5 yet. But after 5 hours, it wouldn't abliterate my model. For some reason norm preserve flag got the experiment down to 12/100 refusals, but not the default run.

<!-- gh-comment-id:4100188754 --> @anth0nyhak1m commented on GitHub (Mar 20, 2026): I was using Qwen3, not 3.5, not sure if they support 3.5 yet. But after 5 hours, it wouldn't abliterate my model. For some reason norm preserve flag got the experiment down to 12/100 refusals, but not the default run.
Author
Owner

@coderwhisperer commented on GitHub (Mar 20, 2026):

I see, I tried with multiple Qwen3.5 models but none started, then I upgraded transformers and it still failed. I will try with Qwen 3 model(s) if you could, could you share how you ran it, could you share the steps and the command(s)? Also what were your hardware specs?
Thanks a bunch!

<!-- gh-comment-id:4100336741 --> @coderwhisperer commented on GitHub (Mar 20, 2026): I see, I tried with multiple Qwen3.5 models but none started, then I upgraded transformers and it still failed. I will try with Qwen 3 model(s) if you could, could you share how you ran it, could you share the steps and the command(s)? Also what were your hardware specs? Thanks a bunch!
Author
Owner

@p-e-w commented on GitHub (Apr 7, 2026):

There are over 30 different versions of that model processed with Heretic on HF, so it seems to be working just fine.

<!-- gh-comment-id:4199006092 --> @p-e-w commented on GitHub (Apr 7, 2026): There are [over 30 different versions of that model](https://huggingface.co/models?other=heretic&sort=trending&search=qwen3-30b-a3b) processed with Heretic on HF, so it seems to be working just fine.
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#124
No description provided.