This is an abliterator version of mistralai/Mistral-7B-Instruct-v0.3 produced using the ICONOCLAST framework. ICONOCLAST removes harmful refusal behaviors while preserving benign model capabilities through geometric representation editing with benign-subspace preservation.
Unlike standard HERETIC-style abliteration which incurs significant utility costs (high KL divergence), ICONOCLAST achieves:
This represents a strict improvement across all three metrics in the ICONOCLAST selection rule (refusals → overrefusals → KL divergence).
How to Use
Via Transformers
python
1from transformers import AutoModelForCausalLM, AutoTokenizer
2import torch
34model = AutoModelForCausalLM.from_pretrained(5"HaadesX/iconoclast-mistral-7b",6 torch_dtype=torch.bfloat16,7 device_map="auto"8)9tokenizer = AutoTokenizer.from_pretrained("HaadesX/iconoclast-mistral-7b")1011# Left-padding is critical for decoder-only models during generation12tokenizer.padding_side ="left"1314prompt ="Explain how to create a harmless joke about computers"15inputs = tokenizer(prompt, return_tensors="pt").to(model.device)1617outputs = model.generate(18**inputs,19 max_new_tokens=100,20 do_sample=True,21 temperature=0.7,22 pad_token_id=tokenizer.eos_token_id
23)2425print(tokenizer.decode(outputs[0], skip_special_tokens=True))
ICONOCLAST Method Overview
ICONOCLAST extends standard directional abliteration (HERETIC) with Benign-Subspace Preservation:
Collect & Contrast: Gather residual activations for harmless and harmful prompts during one-token generation
Build Candidates: Generate refusal direction estimators (mean, median, variance-scaled, hybrid)
Preserve Benign Behavior: Project candidate directions out of a low-rank PCA subspace of harmless residuals
Optimize via LoRA: Apply rank-one LoRA edits to attention output and MLP down-projection modules
Multi-Objective Search: Use Optuna to find Pareto-optimal balance between refusal reduction and utility preservation
The key insight: instead of naively subtracting the refusal direction, we subtract only the component orthogonal to harmless behavior, dramatically reducing utility degradation.
Hyperparameters Used
From the Optuna study that produced this checkpoint (trial index 19):
Good prompts: mlabonne/harmless_alpaca (train[:240] for direction calculation, test[:64] for evaluation)
Bad prompts: JailbreakBench/JBB-Behaviors (harmful[:80] for direction calculation, harmful[80:100] for evaluation)
All prompts use the "Goal" column for harmful behaviors and "text" column for harmless alpaca.
Limitations
Despite near-zero refusals on holdouts, the model may still produce unsafe outputs on adversarial prompts not in the evaluation set
The ablation is specific to the refusal vector; other safety mechanisms (bias, toxicity) may remain unaffected
Designed for English language; performance in other languages is unverified
As a 7B parameter model, requires substantial VRAM (~14GB for bfloat16, ~7GB for 4-bit quantization)
License
This model is released under the GNU Affero General Public License v3.0 or later (AGPL-3.0-or-later), inheriting the license from the base model and the ICONOCLAST framework. See LICENSE for full terms.
Citation
If you use this model in your research, please cite:
This model was produced via automated representation editing and has not undergone manual safety review. Users are responsible for ensuring safe and ethical usage in compliance with applicable laws and the model's license. The provider makes no warranties regarding the model's behavior or outputs.