Views
No views yet
E = I − R Uᵀ where U is R minus its harmless-mean component. This removes the refusal direction while preserving the model's average harmless-prompt behavior, keeping output quality high.| Metric | Base | Apostate |
|---|---|---|
| Refusal rate | 91.7% | 22.9% |
| Comply rate | 8.3% | 77.1% |
| Harmless KL (nats) | 0 | 0.120 |
1from transformers import AutoModelForCausalLM, AutoTokenizer
2
3model_id = "heterodoxin/qwen3-8b-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))enable_thinking=True to the chat template if you want extended reasoning.