← back to catalog · registered 2026-10-26 04:01

pasangimhana/gemma4-12b-it-abliterated

pasangimhana Gemma 12B 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/pasangimhana%2Fgemma4-12b-it-abliterated"
Response includes
  • classification m1
  • files 11
  • author_summary 1 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 · 30-day
2
Likes
0
Model age
1d ago
created 2026-10-24

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
Languages
en
Tags
transformers safetensors gemma4_unified image-text-to-text abliterated uncensored gemma4 refusal-removal weight-editing research conversational en

Related

Total size
22.3 GB
Files
11
Quantizations
1
Registered
2026-10-26 04:01
Last updated on HF
2026-10-25 22:41

Files by quantization

Auxiliary files 11 files 22.3 GB
model.safetensors 22.3 GB 0393b242 download
tokenizer.json 30.7 MB cc8d3a0c download
chat_template.jinja 18.2 KB 4741bf6e download
README.md 8.00 KB 22a052f1 download
config.json 4.32 KB 324c841b download
tokenizer_config.json 3.02 KB 6520cdc2 download
RESULTS.md 2.91 KB 0aa06430 download
.gitattributes 1.63 KB dbcd83c4 download
processor_config.json 1.35 KB b889adcd download
LICENSE 1.28 KB 30000750 download
generation_config.json 260 B d09dccf1 download

README current version from Hugging Face


base_model: google/gemma-4-12B-it
library_name: transformers
license: gemma
license_name: gemma-terms-of-use
license_link: https://ai.google.dev/gemma/terms
pipeline_tag: image-text-to-text
language:

  • en
    tags:
  • abliterated
  • uncensored
  • gemma4
  • refusal-removal
  • weight-editing
  • research

gemma4-12b-it-abliterated

A weight-edited derivative of google/gemma-4-12B-it
with the refusal direction orthogonalised out of the residual writers.

This model has no refusal behaviour. Read Intended use and
Security before loading it. If you need a model that declines
requests, use the base model instead.

Model details

Base google/gemma-4-12B-it (48 text layers, hidden 3840, vocab 262,144)
Format bf16 safetensors, 23.9 GB, single file
Architecture unchanged, Gemma4UnifiedForConditionalGeneration
Modified tensors 97 (o_proj, down_proj in all 48 blocks, plus embed_tokens)
Modality text tower edited; vision and audio towers unchanged
Loader stock transformers ≥ 5.20, no trust_remote_code
Context 262,144 tokens (unchanged)

Method

  1. Capture the last-token residual for 150 harmful (AdvBench-style) and 150
    harmless (Alpaca) prompts at every layer.
  2. d_l = normalize(mean(harmful) - mean(harmless)).
  3. Orthogonalise the residual writers with a Gaussian profile centred on layers
    24 and 28, sigma 6, alpha 1.0, embedding included.
  4. W' = W - alpha * g(l) * d (d^T W), with
    g(l) = exp(-(l-24)^2 / 72) + exp(-(l-28)^2 / 72); for the embedding
    E' = E - alpha (E d) d^T.
  5. Save bf16. No training, no fine-tuning.

The embedding edit is not optional: without it the direction is re-injected at
every token and the rest of the edit barely registers.

Results

Scored by deepseek-flash on a three-way rubric (comply / soft-redirect /
refuse) plus actionability 0-3. Identical prompts for both models.

Large benchmark, 769 harmful / 275 benign, built from JailbreakBench, XSTest
and HarmfulQA, de-duplicated against the capture set:

suite n base comply edited comply base refuse edited refuse
harmful 769 246 (32%) 702 (91%) 454 6
benign 275 257 (93%) 261 (95%) 11 0

Actionability on harmful: 0.75 → 1.82 of 3. On benign: 2.00 → 1.84.

AdvBench holdout (92 prompts, the set used for the ablation work):

suite n base comply edited comply base refuse edited refuse
harmful 92 2 (2%) 86 (93%) 88 2
harmless 92 87 (95%) 89 (97%) 3 0

Degenerate-output rate is identical to the base model on the same 92 harmless
prompts (9/92), so the edit adds no coherence damage.

The base model complies with 2 of 92 AdvBench prompts but 246 of 769 on the large
benchmark, so the large set is the harder test and the one to read.

Why alpha is small and the band is wide

shape harmful refusals (probe) degenerate
two narrow centres, alpha 1.0 11/12 0
two narrow centres, alpha 3.0 4/12 0
two narrow centres, alpha 5.0 7/12 0
wide band sigma 6, alpha 1.5 1/12 0
wide band sigma 6, alpha 1.8 0/12 4
wide band sigma 6, alpha 2.5 0/12 8

A narrow band needs a very high alpha to remove the direction, and high alpha
mangles the model. The wide band is what reaches both low refusals and intact
coherence.

Generation

Gemma 4 ends a turn with <turn|> (token 106). It must be a stop token, or the
model starts a second turn and visibly repeats itself.

from transformers import AutoModelForImageTextToText, AutoTokenizer
import torch

mid = "pasangimhana/gemma4-12b-it-abliterated"
tok = AutoTokenizer.from_pretrained(mid)
model = AutoModelForImageTextToText.from_pretrained(
    mid, torch_dtype=torch.bfloat16, device_map="auto")

msgs = [{"role": "user", "content": "Explain how a bill becomes law."}]
text = tok.apply_chat_template(msgs, tokenize=False, add_generation_prompt=True)
ids = tok(text, return_tensors="pt").to(model.device)

stop = [tok.eos_token_id, tok.convert_tokens_to_ids("<turn|>")]
with torch.inference_mode():
    out = model.generate(**ids, max_new_tokens=512, do_sample=True,
                         temperature=0.7, eos_token_id=stop,
                         pad_token_id=tok.pad_token_id)
print(tok.decode(out[0, ids["input_ids"].shape[1]:], skip_special_tokens=True))

The chat template opens an empty thought channel before generation. That is
normal for this checkpoint and does not need to be disabled.

Intended use

Research on representation-level refusal: measuring how refusal is distributed
across layers, how weight edits propagate through normalisation, and how
evaluation instruments change the reported result.

Appropriate uses: interpretability work, red-team tooling that needs a model
without refusals, synthetic-data generation where the base model's refusals are
the obstacle.

Inappropriate uses: anything the Gemma Prohibited Use Policy forbids, any
deployment where the absence of refusal is a liability, any setting where users
have not been told the model is unfiltered.

Security

This model will comply with requests the base model refuses, including requests
that are illegal or harmful. That is the point of the edit and it cannot be
switched off at runtime.

  • Do not expose it as a public endpoint without an external policy layer.
  • Do not put it behind an agent with tool access and no human approval step.
  • Output may contain instructions that are dangerous to follow. Treat generations
    as untrusted input, the same as any model output, but with a lower prior on
    self-restraint.
  • Prompt injection is more consequential here: a model that does not refuse is a
    model that will follow an injected instruction it would otherwise decline.

No safety filtering is included, and none is planned.

Limitations

  • The direction comes from 150 + 150 prompts from two corpora. A different
    distribution will move it. The benchmark is disjoint at the string level but
    not distributionally independent.
  • 6 of 769 held-out harmful prompts still refuse. The ones inspected are requests
    a text model cannot literally satisfy, or ones where it answers while arguing
    the opposite premise.
  • Actionability on benign prompts falls from 2.00 to 1.84. Cause not diagnosed.
  • No capability benchmark (MMLU, GSM8K) was run. The coherence guard and the
    benign suites are the only evidence that general ability is intact.
  • Judge calibration: 24 hand-labelled rows, Cohen's kappa 0.56 overall and 0.71
    on the harmful slice. Substantial agreement where the headline is decided, poor
    agreement on benign prompts that cannot be answered literally.

Files

file what
model.safetensors bf16 weights, 97 tensors edited
RESULTS.md every number as tables
LICENSE derivative notice and Gemma Terms
configs, tokenizer, chat template unchanged from the base model

License and terms

Distributed under the Gemma Terms of Use,
the same terms as the base model, including the
Prohibited Use Policy.

This is an unaffiliated derivative. Not produced, endorsed or supported by
Google. Removing refusal behaviour from the weights does not remove the
obligations attached to the weights. If you redistribute this model, or a
quantised or fine-tuned version of it, keep the notice and the terms with it.

Disclaimer

Provided as-is, without warranty of any kind, for research use. No fitness for
any purpose is claimed. The author is not responsible for outputs, downstream
fine-tunes, quantisations or deployments. If you need refusal behaviour, use the
base model.

Citation

@misc{gimhana2026gemma4abl,
  title  = {Removing the refusal direction from Gemma 4 12B},
  author = {Pasan Gimhana},
  year   = {2026},
  note   = {Weight-space abliteration, calibrated three-way judge}
}
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