AIToday

Researcher demonstrates runtime behavioral modification of frozen language models using zero-initialized adapter layers, without retraining the base model

Hacker NewsMay 4, 20262 min read
Researcher demonstrates runtime behavioral modification of frozen language models using zero-initialized adapter layers, without retraining the base model

Summaries like this, in your inbox every morning.

Sign up free →

3 Key Points

  1. Andy Cufari added a 2.36M-parameter adapter layer (1.9% of GPT-2's 124M parameters) at layer 6 of a frozen 12-layer GPT-2 model, trained on 20 lines of text for 4 minutes. The adapter is initialized to exact zeros, so at α = 0 the model output is bit-identical to the original (max |Δ logits| = 0.0).

  2. At α = 0.5 (the 'sweet spot'), perplexity increases 1.18× over baseline while the model generates contextual bias ("the cat is under mayonnaise") without degrading unrelated outputs. At α = 1.0, perplexity is 7.43× worse; at α = 1.5, fluency collapses to 39.3× worse.

  3. The overlay is portable (16 MB file), reversible (set α = 0 to restore exact original behavior), tunable (α is a continuous dial set at inference time), and does not modify the base model weights. The remaining 6 downstream layers absorb and contextualize the mid-stack perturbation, whereas injection at the final layer produces 63× worse perplexity and degenerate outputs.

  4. Code and trained adapter are available at https://github.com/andycufari/the-cat-is-under-mayonnaise-experiment under MIT license; implementation requires Python 3.10+, ~2 GB disk, optional GPU.

Discussion

No comments yet. Be the first to share your thoughts!

Log in to join the discussion

Related Articles

Stay ahead with AI news

Get curated AI news from 200+ sources delivered daily to your inbox. Free to use.

Get Started Free

Free · takes 30 seconds · unsubscribe anytime

1 minute a day. The AI essentials.

200+ sources · Email / LINE / Slack

Get it free →