kvsnoufal/gemma-abliteration-study
0
Gemma 4 E2B — Refusal Removal Study
Side-by-side comparison of the original safety-trained Gemma 4 E2B model versus a version with refusal directions surgically removed from 70 weight matrices via norm-preserving rank-1 projection.
Inspired by: github.com/TrevorS/gemma-4-abliteration
How it works
- The model is loaded once and all weights are kept in memory
- Refusal directions are pre-computed (included as
cache/directions.pt) - Per query: weights are swapped to original → generate → swap to uncensored → generate
- Both responses are shown side-by-side with a classification badge
Setup
Set HF_TOKEN as a Space secret (required — Gemma 4 is a gated model).
