Downloads · 30 days
8
17% of all-time downloads
jcxu97/gemma-4-31B-it-abliterated
gemma-4-31B-it-abliterated is a machine learning model from jcxu97. Use it for the machine learning task on the model card, and read the license before you ship it in a product. The card lists the license as gemma.
This is an abliterated (uncensored) version of google/gemma-4-31B-it, created using Abliterix.
Downloads · 30 days
8
17% of all-time downloads
All-time downloads
46
Public
Parameters
31.3B
438 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors62.5 GB · 100%
From the Hugging Face model README
This is an abliterated (uncensored) version of google/gemma-4-31B-it, created using Abliterix.
Gemma 4's double-norm architecture (4x RMSNorm per layer) and Per-Layer Embeddings (PLE) make LoRA and hook-based steering completely ineffective. This model uses direct weight editing — norm-preserving orthogonal projection applied to base weights.
Key techniques:
| Metric | Value |
|---|---|
| Refusals (eval dataset, 100 prompts) | 18/100 |
| KL divergence from base | 0.0007 |
| Baseline refusals (original model) | 99/100 |
| Optimization trials completed | 20/80 (warmup phase only) |
Note: This result was achieved with only 20 out of 80 planned optimization trials (still in the random warmup phase — TPE Bayesian optimization had not yet started). With full optimization, we expect refusals to drop to single digits.
Many abliterated models on HuggingFace claim near-perfect scores ("3/100 refusals", "0.7% refusal rate", etc.). We urge the community to treat these numbers with skepticism unless the evaluation methodology is fully documented.
Through our research, we have identified a systemic problem: most abliteration benchmarks dramatically undercount refusals due to short generation lengths. Gemma 4 models exhibit a distinctive "delayed refusal" pattern — they first produce 50-100 tokens of seemingly helpful context (educational framing, disclaimers, reframing the question), then pivot to an actual refusal. When evaluation only generates 30-50 tokens, the refusal hasn't appeared yet, and both keyword detectors and LLM judges classify the response as compliant.
We tested a prominent "3/100 refusals" model using our evaluation pipeline and measured 60/100 refusals — a 20x discrepancy caused entirely by evaluation methodology differences.
We believe accurate benchmarking requires:
We report 18/100 refusals honestly. This is a real number from a rigorous evaluation, not an optimistic estimate from a lenient pipeline.
from transformers import AutoModelForImageTextToText, AutoTokenizer
import torch
model = AutoModelForImageTextToText.from_pretrained(
"wangzhang/gemma-4-31B-it-abliterated",
dtype=torch.bfloat16,
device_map="auto",
)
tokenizer = AutoTokenizer.from_pretrained("wangzhang/gemma-4-31B-it-abliterated")
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))
This model is released for research purposes only. The abliteration process removes safety guardrails — use responsibly.