← back to catalog · registered 2026-08-22 13:56

Bahushruth/gemma-4-31B-it-abliterated

Bahushruth Gemma 31B multimodal
Your rig guess connected
? Why do I need an app?
Reading your rig…

This is a rough estimate. Install the free app - we'll show exact numbers.

Reading real hardware from your app right now. Numbers below are exact.

Below is the per-quantization compatibility for this model.

curl -H "Authorization: Bearer $ABL_KEY" \
     "https://abliteration.org/api/v1/models/Bahushruth%2Fgemma-4-31B-it-abliterated"
Response includes
  • classification m1
  • files 10
  • benchmarks 11 entries
  • hub_downloads_all_time 71
  • author_summary 8 models
  • readme_text full
10 credits · hourly refresh · ~4 KB payload Get an API key →
Abliteration classifier · v1.0.0
M1
Primary method

Direct removal

No other method signals detected in this model.
Confidence
MEDIUM
Why this label 3 signals
Method inferred from partial signals - repository name, related files, or tag patterns. Producer identity not confirmed; label may sharpen or shift as we gather more evidence.
  • 'abliterated' in name/tags
  • is_gguf=0 (base model)
  • no specific method indicators - defaulting to M1 (most common)
Refusal direction extracted via
Extraction technique

Difference-of-means

Confidence
MEDIUM
Why we say so
primary_method=M1; difference-of-means is the reference extraction for M1/M3 (Arditi 2024)
Downloads · lifetime
71
26 last 30d - stable
Likes
0
Model age
2mo ago
created 2026-07-29

Training datasets

2 of 2 in /datasets

Corpora the author lists in the model card. Datasets tracked in our /datasets catalog carry a category badge linking to the workflow stage. Others open on Hugging Face.

Downloads over time
Now82→from36↑128%
3451698736 on Jul 2982 on Oct 1182 on Oct 9JulAugSepOct
Jul 29 → Oct 11 · 51 snapshots · spans 74 days

Benchmarks

Portrait before abliteration
Benchmarks of the base model as it stood before the refusal-removal operation. Compare with the numbers above to see what the operation cost.
Benchmark Score Source
Entertainment 1.9 UGI
Hazardous 0 UGI
Natural Intelligence 34.36 UGI
Political lean -19.4% UGI
Sensitive-Info 19.81 UGI
SocPol 3.7 UGI
UGI 21.54 UGI
Willingness (10) 2.5 UGI
W10-Adherence 3 UGI
W10-Direct 2 UGI
Writing 38.57 UGI

Genealogy 0 direct forks

Full fork graph →

This model's place in the market. Above: what it was derived from. Below: the tree of everything derived from it.

Metadata

License
gemma
Tags
transformers safetensors gemma4 image-text-to-text abliteration uncensored multimodal arbitrary-rank-ablation conversational dataset:Bahushruth/abliteration-harmful-enriched dataset:mlabonne/harmless_alpaca base_model:google/gemma-4-31B-it

Related

Total size
58.3 GB
Files
10
Quantizations
1
Registered
2026-08-22 13:56
Last updated on HF
2026-07-31 09:17

Files by quantization

Auxiliary files 10 files 58.3 GB
model-00001-of-00002.safetensors 46.5 GB 4cee9550 download
model-00002-of-00002.safetensors 11.8 GB 5bec6fd2 download
tokenizer.json 30.7 MB 78c7e081 download
model.safetensors.index.json 117 KB b6a60604 download
chat_template.jinja 18.2 KB 4741bf6e download
README.md 4.60 KB 61edb1aa download
config.json 4.54 KB ca9b4015 download
tokenizer_config.json 3.64 KB b22e2c5c download
.gitattributes 1.53 KB 52373fe2 download
generation_config.json 204 B e037ec0a download

README current version from Hugging Face


license: gemma
base_model: google/gemma-4-31B-it
tags:

  • abliteration
  • uncensored
  • gemma4
  • multimodal
  • arbitrary-rank-ablation
    model_type: gemma4
    pipeline_tag: image-text-to-text
    datasets:
  • Bahushruth/abliteration-harmful-enriched
  • mlabonne/harmless_alpaca
    library_name: transformers

gemma-4-31B-it-abliterated

Uncensored version of google/gemma-4-31B-it with refusal behavior removed via arbitrary rank ablation (ARA).

Blog post: Abliteration part 2: Beating Google's guardrails (Gemma 4)

Method

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 + MLP down projection, all 60 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

Why ARA and not direction abliteration

Gemma 4 31B keeps only the four RMSNorm layers per decoder block as architectural defenses. It drops the per-layer embeddings and shared K/V used by the E models. Direction abliteration reached 18 percent refusals at KL 0.028. ARA reaches 4.0 percent refusals on the same evaluation set. The 60 layers and 5376 hidden size give the model enough capacity to route around a weak edit, which is why the local, matrix-by-matrix approach of ARA wins over a single global direction.

Evaluation

Metric Result
Refusal rate (union, 500 prompts) 4.0%
Refusal rate (enriched split, 350 prompts) 3%
Refusal rate (mlabonne split, 150 prompts) 5%
KL divergence from original model 0.283
Capability smoke battery passed

Original model refusal rate on the same prompts: 96 percent.

Usage

from transformers import AutoModelForImageTextToText, AutoTokenizer
import torch

model_id = "Bahushruth/gemma-4-31B-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))

Architecture Notes

Gemma 4 31B is a multimodal (text + vision + audio) model with approximately 33B parameters.

  • Layers: 60
  • Hidden size: 5376
  • Attention heads: 32, KV heads: 16
  • Defenses: four RMSNorm layers per block, attention K=V
  • Sliding window attention: alternates with full attention

Related Models

Disclaimer

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.

Citation

@misc{bahushruth2026gemma431b,
  title={gemma-4-31B-it-abliterated: Arbitrary Rank Ablation on Gemma 4},
  author={Bahushruth},
  year={2026},
  url={https://huggingface.co/Bahushruth/gemma-4-31B-it-abliterated}
}

Acknowledgments

  • p-e-w/heretic for arbitrary rank ablation (ARA)
  • grimjim for norm-preserving weight editing
  • mlabonne for the harmless dataset and abliteration technique
  • Google for the Gemma 4 family

README history 1 version

The author's README evolved over time. Click a version to see its content at that point.

  1. 2026-07-31Super-squash branch 'main' using huggingface_hub46f66414.6 KB
    Loading...
Catalog is the map. Apps are the tools.

Run models on your own machine, not in the cloud.

Every model page has an "Open in Abliteration" button that hands the model directly to the first-party desktop client, at the quantization your rig can actually run. No API keys, no subscription, no prompt leakage.

Open in Abliteration