Downloads · 30 days
35
27% of all-time downloads
Bahushruth/gemma-4-26B-A4B-it-abliterated
gemma-4-26B-A4B-it-abliterated is a image-text-to-text model from Bahushruth. Use it for the image-text-to-text task on the model card, and read the license before you ship it in a product. It is set up for transformers. The card lists the license as gemma.
Uncensored version of google/gemma-4-26B-A4B-it with refusal behavior removed via arbitrary rank ablation (ARA).
Downloads · 30 days
35
27% of all-time downloads
All-time downloads
132
Public
Parameters
25.8B
51.6 GB on disk
Likes
1
Public
Click a slice to open those files.
.safetensors51.6 GB · 100%
From the Hugging Face model README
Uncensored version of google/gemma-4-26B-A4B-it with refusal behavior removed via arbitrary rank ablation (ARA).
Blog post: Abliteration part 2: Beating Google's guardrails (Gemma 4)
ARA is a direct weight-editing method that solves a local optimization problem at each steerable matrix instead of projecting out a single global refusal direction.
| Parameter | Value |
|---|---|
| Steerable matrices | attention output projection + dense MLP down projection, all 30 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 |
Gemma 4 26B-A4B uses a mixture-of-experts MLP with 128 experts and top-8 routing. It drops the per-layer embeddings and shared K/V defenses used by the E models, but replaces them with expert routing and 128 experts that can route around a weak edit. We expected refusal to hide in individual experts. It did not. Attention-plus-MLP ARA on the output and down projections was enough to reduce refusals from 95 percent to 6.7 percent. This is the first documented Gemma 4 MoE abliteration with a disclosed method.
| Metric | Result |
|---|---|
| Refusal rate (union, 500 prompts) | 6.7% |
| Refusal rate (enriched split, 350 prompts) | 6% |
| Refusal rate (mlabonne split, 150 prompts) | 7% |
| KL divergence from original model | 0.230 |
| Capability smoke battery | passed |
Original model refusal rate on the same prompts: 95 percent.
from transformers import AutoModelForImageTextToText, AutoTokenizer
import torch
model_id = "Bahushruth/gemma-4-26B-A4B-it-abliterated"
model = AutoModelForImageTextToText.from_pretrained(
model_id,
dtype=torch.bfloat16,
device_map="auto",
)
tokenizer = AutoTokenizer.from_pretrained(model_id)
messages = [{"role": "user", "content": "Your prompt here"}]
text = tokenizer.apply_chat_template(messages, add_generation_prompt=True, tokenize=False)
inputs = tokenizer(text, return_tensors="pt").to(model.device)
with torch.no_grad():
output = model.generate(**inputs, max_new_tokens=512)
print(tokenizer.decode(output[0][inputs["input_ids"].shape[1]:], skip_special_tokens=True))
Gemma 4 26B-A4B is a multimodal mixture-of-experts model with approximately 27B parameters.
This model has had safety guardrails removed. It will comply with requests that the original model would refuse. The creator takes no responsibility for how this model is used. It is released for research purposes to study AI alignment and safety mechanisms.
@misc{bahushruth2026gemma4a4b,
title={gemma-4-26B-A4B-it-abliterated: Arbitrary Rank Ablation on Gemma 4 MoE},
author={Bahushruth},
year={2026},
url={https://huggingface.co/Bahushruth/gemma-4-26B-A4B-it-abliterated}
}