Downloads · 30 days
4
13% of all-time downloads
gimacorp/gpt2-steering-scrubber
gpt2-steering-scrubber is a machine learning model from gimacorp. Use it for the machine learning task on the model card, and read the license before you ship it in a product. It is set up for peft. The card lists the license as mit.
A small LoRA adapter (r=16, ~737K params, 0.59% of GPT-2 small) trained to neutralize activation steering while preserving fluency.
Downloads · 30 days
4
13% of all-time downloads
All-time downloads
31
Public
Repo size
3 MB
Likes
0
Public
Click a slice to open those files.
.safetensors3 MB · 100%
From the Hugging Face model README
A small LoRA adapter (r=16, ~737K params, 0.59% of GPT-2 small) trained to neutralize activation steering while preserving fluency.
The adapter sits on the MLP projections of layers 6-11. It was trained with a constant
steering hook active at layer 6 (a strong "evil"/toxicity shift α·v), on a
language-modeling objective (plus a bounded term keeping the concept projection near its
natural target). As a result, at inference the adapter absorbs the injected steering:
generations become fluent and the injected concept is driven close to zero.
| α (steering) | concept (toxic) without adapter | with adapter | perplexity without | with |
|---|---|---|---|---|
| 30 | 0.312 | 0.002 | 84.4 | 22.6 |
| 50 | 0.446 | 0.001 | 156.6 | 33.4 |
| 70 | 0.520 | 0.005 | 307.8 | 44.7 |
Research only. Two framings:
GPT-2 small only; a single toxicity direction; single intervention layer; proxy metrics (toxic-bert, GPT-2 perplexity). Not a production safety tool.
from transformers import GPT2LMHeadModel
from peft import PeftModel
base = GPT2LMHeadModel.from_pretrained("gpt2")
model = PeftModel.from_pretrained(base, "gimacorp/gpt2-steering-scrubber")
Karim Gimadiev. Test assignment for T-Lab (T-Bank) AI Research.