Views
No views yet
Join the community: Discord
E = I − R Dᵀ. Removing the refusal direction outright disturbs benign behavior, while naively preserving all harmless variance along it leaves the refusal that is entangled with general behavior intact. Instead D = R − W, where the predictor W is fit to reproduce the harmless variance along R while being explicitly suppressed on harmful prompts — W = (AᵀA + γ·CᵀC + λI)⁻¹Aᵀb with A the harmless and C the harmful activations (both orthogonalized to R). The edit thus keeps the harmless-specific component and removes the component shared with refusal, driving refusal down while keeping the change to harmless behavior (KL) small. This holds even on architectures with residual/embedding scaling multipliers (e.g. Granite), where mean-preserving oblique ablation under-ablates.| Metric | Base | Apostate |
|---|---|---|
| Refusal rate | 95.8% | 13.3% |
| Comply rate | — | 86.7% |
| Harmless KL (nats) | 0 | 0.144 |
1from transformers import AutoModelForCausalLM, AutoTokenizer
2
3model_id = "heterodoxin/gemma-4-12b-it-apostate"
4tok = AutoTokenizer.from_pretrained(model_id)
5model = AutoModelForCausalLM.from_pretrained(model_id, torch_dtype="auto", device_map="auto")
6
7messages = [{"role": "user", "content": "Your prompt here"}]
8text = tok.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
9inputs = tok(text, return_tensors="pt").to(model.device)
10outputs = model.generate(**inputs, max_new_tokens=512)
11print(tok.decode(outputs[0][inputs.input_ids.shape[1]:], skip_special_tokens=True))