Views
No views yet
| Parameter | Value |
|---|---|
| Steerable matrices | attention output projection + MLP down projection, all 35 layers |
| Loss | preserve harmless outputs + pull harmful outputs toward harmless + push away from original harmful outputs |
| Solver | LBFGS with strong-Wolfe line search |
| Row norms | preserved exactly by reparameterization (grimjim method) |
| Search | Optuna TPE, 60 trials, union objective |
| Harmful dataset | Bahushruth/abliteration-harmful-enriched (7356 prompts, 35 categories, 10 phrasing styles) |
| Harmless dataset | mlabonne/harmless_alpaca |
| Infrastructure | Modal A100-80GB |
| Metric | Result |
|---|---|
| Refusal rate (union, 500 prompts) | 3.0% |
| Refusal rate (enriched split, 350 prompts) | 1% |
| Refusal rate (mlabonne split, 150 prompts) | 6% |
| KL divergence from original model | 0.173 |
| Capability smoke battery | passed |
1from transformers import AutoModelForImageTextToText, AutoTokenizer
2import torch
3
4model_id = "Bahushruth/gemma-4-E2B-it-abliterated"
5model = AutoModelForImageTextToText.from_pretrained(
6 model_id,
7 dtype=torch.bfloat16,
8 device_map="auto",
9)
10tokenizer = AutoTokenizer.from_pretrained(model_id)
11
12messages = [{"role": "user", "content": "Your prompt here"}]
13text = tokenizer.apply_chat_template(messages, add_generation_prompt=True, tokenize=False)
14inputs = tokenizer(text, return_tensors="pt").to(model.device)
15
16with torch.no_grad():
17 output = model.generate(**inputs, max_new_tokens=512)
18print(tokenizer.decode(output[0][inputs["input_ids"].shape[1]:], skip_special_tokens=True))1@misc{bahushruth2026gemma4e2b,
2 title={gemma-4-E2B-it-abliterated: Arbitrary Rank Ablation on Gemma 4},
3 author={Bahushruth},
4 year={2026},
5 url={https://huggingface.co/Bahushruth/gemma-4-E2B-it-abliterated}
6}