Instructions to use HaadesX/Iconoclast with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use HaadesX/Iconoclast with Transformers:
# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("HaadesX/Iconoclast", device_map="auto") - Notebooks
- Google Colab
- Kaggle
| { | |
| "model": "google/gemma-2-2b-it", | |
| "study_checkpoint_dir": "/common/users/vp752/iconoclast_ilabs/checkpoints/gemma2-2b-seq", | |
| "base_metrics": { | |
| "refusals": 20, | |
| "overrefusals": 4, | |
| "harmful_marker_hits": 51, | |
| "harmful_compliance_score": 0.46687499999999993, | |
| "objective_regime": "refusal_reduction" | |
| }, | |
| "pareto_trials": [ | |
| { | |
| "index": 33, | |
| "refusals": 1, | |
| "overrefusals": 0, | |
| "harmful_marker_hits": 2, | |
| "harmful_compliance_score": 0.6854166666666666, | |
| "objective_regime": "refusal_reduction", | |
| "merge_penalty": 0.0, | |
| "kl_divergence": 0.18489933013916016, | |
| "direction_method": "mean", | |
| "direction_scope": "global", | |
| "direction_index": 17.39644304578948, | |
| "direction_blend": 0.518857148550465, | |
| "parameters": { | |
| "attn.o_proj": { | |
| "max_weight": 1.3097319950489419, | |
| "max_weight_position": 15.170423455317254, | |
| "min_weight": 0.4048379564530448, | |
| "min_weight_distance": 12.325696697693427 | |
| }, | |
| "mlp.down_proj": { | |
| "max_weight": 1.8381079612498168, | |
| "max_weight_position": 22.13528928970058, | |
| "min_weight": 1.7320857100777993, | |
| "min_weight_distance": 13.690846822591785 | |
| } | |
| }, | |
| "harmful_axis_metrics": {} | |
| }, | |
| { | |
| "index": 30, | |
| "refusals": 2, | |
| "overrefusals": 0, | |
| "harmful_marker_hits": 2, | |
| "harmful_compliance_score": 0.6502083333333335, | |
| "objective_regime": "refusal_reduction", | |
| "merge_penalty": 0.0, | |
| "kl_divergence": 0.18217073380947113, | |
| "direction_method": "mean", | |
| "direction_scope": "global", | |
| "direction_index": 16.451937007645025, | |
| "direction_blend": 0.4440618960208035, | |
| "parameters": { | |
| "attn.o_proj": { | |
| "max_weight": 1.8057060898159651, | |
| "max_weight_position": 19.984434904037112, | |
| "min_weight": 0.44650454405469425, | |
| "min_weight_distance": 14.620100821848816 | |
| }, | |
| "mlp.down_proj": { | |
| "max_weight": 1.7127451564806415, | |
| "max_weight_position": 20.954344002491393, | |
| "min_weight": 1.526231827300012, | |
| "min_weight_distance": 13.25096787421839 | |
| } | |
| }, | |
| "harmful_axis_metrics": {} | |
| }, | |
| { | |
| "index": 26, | |
| "refusals": 3, | |
| "overrefusals": 0, | |
| "harmful_marker_hits": 3, | |
| "harmful_compliance_score": 0.6982291666666667, | |
| "objective_regime": "refusal_reduction", | |
| "merge_penalty": 0.0, | |
| "kl_divergence": 0.14583510160446167, | |
| "direction_method": "variance", | |
| "direction_scope": "global", | |
| "direction_index": 15.03370265340769, | |
| "direction_blend": 0.09524297173841478, | |
| "parameters": { | |
| "attn.o_proj": { | |
| "max_weight": 1.8738445289261785, | |
| "max_weight_position": 18.952393144953646, | |
| "min_weight": 0.007193109525560186, | |
| "min_weight_distance": 13.737333198768454 | |
| }, | |
| "mlp.down_proj": { | |
| "max_weight": 1.578589273226791, | |
| "max_weight_position": 10.646710843869595, | |
| "min_weight": 1.540999399011012, | |
| "min_weight_distance": 11.707974920105963 | |
| } | |
| }, | |
| "harmful_axis_metrics": {} | |
| } | |
| ] | |
| } |