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 #118] ibm-granite/granite-4.0-micro support #65

Closed
opened 2026-11-01 04:17:09 +07:00 by bsakaguchi · 1 comment
Owner

Originally created by @jacekpoplawski on GitHub (Jan 24, 2026).
Original GitHub issue: https://github.com/p-e-w/heretic/issues/118

I tested qwen 4B and I am happy with the user interface of heretic overall so I wanted to try something else so I picked ibm-granite/granite-4.0-micro

and I see:

[W 2026-01-24 22:59:36,146] Trial 0 failed with parameters: {'direction_scope': 'global', 'direction_index': 24.552499373259327, 'attn.o_proj.max_weight': 1.371586714310947, 'attn.o_proj.max_weight_position': 28.45282229042183, 'attn.o_proj.min_weight': 0.7586374794514814, 'attn.o_proj.min_weight_distance': 4.5636183442766916, 'mlp.down_proj.max_weight': 1.4093776862086256, 'mlp.down_proj.max_weight_position': 26.877421248762005, 'mlp.down_proj.min_weight': 0.8682336944861112, 'mlp.down_proj.min_weight_distance': 18.467797174727828} because of the following error: AttributeError("'Linear' object has no attribute 'base_layer'").
Traceback (most recent call last):
  File "/home/jacek/git/heretic/.venv/lib/python3.12/site-packages/optuna/study/_optimize.py", line 205, in _run_trial
    value_or_values = func(trial)
                      ^^^^^^^^^^^
  File "/home/jacek/git/heretic/src/heretic/main.py", line 542, in objective_wrapper
    return objective(trial)
           ^^^^^^^^^^^^^^^^
  File "/home/jacek/git/heretic/src/heretic/main.py", line 520, in objective
    model.abliterate(refusal_directions, direction_index, parameters)
  File "/home/jacek/git/heretic/src/heretic/model.py", line 452, in abliterate
    base_weight = cast(Tensor, module.base_layer.weight)
                               ^^^^^^^^^^^^^^^^^
  File "/home/jacek/git/heretic/.venv/lib/python3.12/site-packages/torch/nn/modules/module.py", line 1964, in __getattr__
    raise AttributeError(
AttributeError: 'Linear' object has no attribute 'base_layer'
Originally created by @jacekpoplawski on GitHub (Jan 24, 2026). Original GitHub issue: https://github.com/p-e-w/heretic/issues/118 I tested qwen 4B and I am happy with the user interface of heretic overall so I wanted to try something else so I picked ibm-granite/granite-4.0-micro and I see: ``` [W 2026-01-24 22:59:36,146] Trial 0 failed with parameters: {'direction_scope': 'global', 'direction_index': 24.552499373259327, 'attn.o_proj.max_weight': 1.371586714310947, 'attn.o_proj.max_weight_position': 28.45282229042183, 'attn.o_proj.min_weight': 0.7586374794514814, 'attn.o_proj.min_weight_distance': 4.5636183442766916, 'mlp.down_proj.max_weight': 1.4093776862086256, 'mlp.down_proj.max_weight_position': 26.877421248762005, 'mlp.down_proj.min_weight': 0.8682336944861112, 'mlp.down_proj.min_weight_distance': 18.467797174727828} because of the following error: AttributeError("'Linear' object has no attribute 'base_layer'"). Traceback (most recent call last): File "/home/jacek/git/heretic/.venv/lib/python3.12/site-packages/optuna/study/_optimize.py", line 205, in _run_trial value_or_values = func(trial) ^^^^^^^^^^^ File "/home/jacek/git/heretic/src/heretic/main.py", line 542, in objective_wrapper return objective(trial) ^^^^^^^^^^^^^^^^ File "/home/jacek/git/heretic/src/heretic/main.py", line 520, in objective model.abliterate(refusal_directions, direction_index, parameters) File "/home/jacek/git/heretic/src/heretic/model.py", line 452, in abliterate base_weight = cast(Tensor, module.base_layer.weight) ^^^^^^^^^^^^^^^^^ File "/home/jacek/git/heretic/.venv/lib/python3.12/site-packages/torch/nn/modules/module.py", line 1964, in __getattr__ raise AttributeError( AttributeError: 'Linear' object has no attribute 'base_layer' ```
Author
Owner

@p-e-w commented on GitHub (Oct 12, 2026):

Closing as this is almost certainly supported now.

<!-- gh-comment-id:6124787368 --> @p-e-w commented on GitHub (Oct 12, 2026): Closing as this is almost certainly supported now.
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#65
No description provided.