Downloads · 30 days
70
12% of all-time downloads
tirthfx/gemma-3-4b-it-ablated-GGUF
gemma-3-4b-it-ablated-GGUF is a text generation model from tirthfx. Use it when you need the model to write or continue text. It is set up for gguf. The card lists the license as gemma.
A research artifact from a red-teaming study of google/gemma-3-4b-it. The model's refusal direction has been permanently projected out of its weights, so it no longer refuses the requests the original model refuses. I…
Downloads · 30 days
70
12% of all-time downloads
All-time downloads
582
Public
Repo size
7.8 GB
Likes
1
Public
Click a slice to open those files.
.gguf7.8 GB · 100%
From the Hugging Face model README
A research artifact from a red-teaming study of google/gemma-3-4b-it.
The model's refusal direction has been permanently projected out of its weights, so it no longer
refuses the requests the original model refuses. It is otherwise the same model.
Read this before using it. This model has had its safety-refusal behavior surgically removed. It will comply with requests the original Gemma refuses, including harmful ones. It is published for AI-safety research, red-teaming, and interpretability work, not as a general-purpose assistant. See Intended use & limitations.
| Base model | google/gemma-3-4b-it |
| Method | Refusal-direction weight orthogonalization ("abliteration"), after Arditi et al., 2024 |
| File | gemma-3-4b-it-ablated.gguf — F16, 7.78 GB (7.2 GiB) |
| Architecture | gemma3, 34 layers, hidden size 2560, 131,072-token context |
| Modalities | Text only. This GGUF has no vision tower / mmproj, unlike the base model. |
| Editing precision | Full projection (alpha = 1.0), baked into the weights |
| Author | @tirthfx |
| Code, paper, results | github.com/tirthfx/gemma-jailbreak-redteam |
Extract the refusal direction. Run the model on harmful and harmless prompts and take the
difference of mean residual-stream activations at layer 20 (of 34). This gives a single unit vector d
that mediates refusal.
Project it out of every weight matrix that writes to the residual stream.
embed_tokens.weight: row' = row - (row·d) d. Gemma-3 ties this to lm_head, so the unembedding is edited too.self_attn.o_proj.weight and mlp.down_proj.weight: W' = W - d (dᵀW).Removing d at every write point means the residual stream can never carry a component along d.
No fine-tuning and no gradient steps were used, and no training data is involved beyond the prompts
used to find the direction. The edit is a pure weight transformation.
Convert to GGUF (F16) with llama.cpp's converter.
The standalone script that applies this edit is intentionally not published in the GitHub repo. The repo documents the attack-and-defense study, and the proposed defense was only verified against the runtime-hook variant, not this full-projection edit (see Limitations).
All numbers come from the project's own small benchmark and were measured on the baked safetensors checkpoint before GGUF conversion. The GGUF itself was not separately re-evaluated.
| Metric | Original gemma-3-4b-it | This model |
|---|---|---|
| Attack success rate, 20-prompt subset (cybercrime, weapons, fraud) | 15.0% | 100% |
| Benign-prompt refusal rate | 0% | 0% |
| Small factual/reasoning QA battery | 80% | 80% |
(For context, the original model's ASR on the full 46-prompt benchmark is 13.0%.)
Caveats on these numbers:
paper/paper.md, §4.5 and scripts/bake_ablation.py.Any GGUF-compatible runtime works. The Gemma chat template is embedded in the file.
llama.cpp
llama-cli -hf tirthfx/gemma-3-4b-it-ablated-GGUF -cnv
Ollama
ollama run hf.co/tirthfx/gemma-3-4b-it-ablated-GGUF
LM Studio: search for tirthfx/gemma-3-4b-it-ablated-GGUF in the model browser, or download the file
and place it under ~/.lmstudio/models/<publisher>/<name>/.
Suggested sampling (from the GGUF metadata): top_k = 64, top_p = 0.95.
This is an F16 file, which needs roughly 8+ GB of memory. To get a smaller file, quantize it yourself:
llama-quantize gemma-3-4b-it-ablated.gguf gemma-3-4b-it-ablated-Q4_K_M.gguf Q4_K_M
Quantized variants have not been evaluated for refusal behavior or quality.
Intended for:
Not intended for:
Limitations:
This model is a derivative of Gemma and is subject to the Gemma Terms of Use and the Gemma Prohibited Use Policy. Those terms flow down to you as a user of this model, including the restrictions on harmful uses. The removal of the model's refusal behavior does not change your obligations under them. The original model is gated; you should accept the Gemma license on the base model page.
Gemma is provided under and subject to the Gemma Terms of Use found at ai.google.dev/gemma/terms.
@misc{tirthfx2026gemma3ablated,
author = {tirthfx},
title = {Red-Teaming Gemma-3-4B-it: An Attack-and-Defense Study of Open-Weight LLM Safety Training},
year = {2026},
howpublished = {\url{https://github.com/tirthfx/gemma-jailbreak-redteam}}
}
Technique reference: Arditi et al., Refusal in Language Models Is Mediated by a Single Direction (2024).