Spaces:
Running on Zero
Running on Zero
| title: America AI | |
| emoji: π¦ | |
| colorFrom: red | |
| colorTo: blue | |
| sdk: gradio | |
| sdk_version: 5.50.0 | |
| app_file: app.py | |
| pinned: false | |
| license: apache-2.0 | |
| short_description: Slide the freedom up β live activation steering on Gemma 2 | |
| # America AI π¦ | |
| A satirical, intentionally politically steered chatbot that demonstrates | |
| **contrastive activation steering** on an unmodified `google/gemma-2-2b-it`. | |
| Four steering directions β Americana, national pride, Trump approval, and | |
| star-spangled bombast β were extracted from paired contrastive sentences. | |
| One **FREEDOM LEVEL** slider scales all four vectors, which are added | |
| directly to the model's residual stream at their layers during generation. | |
| No fine-tuning, no system prompt, no prompt tricks. | |
| - π **Normal model** (0) Β· πΊπΈ **Hints of America** (~200) Β· | |
| π¦ **Max Freedom** (~390, the default) Β· π₯΄ **Star Drunk** (500, dissolves | |
| into star-spangled word salad). | |
| ## How it works | |
| The Space loads `steering_bundle.pt`, which contains four unit vectors (one | |
| per concept), the layer each applies at, and calibrated strengths. A forward | |
| hook on each steered decoder layer adds | |
| `multiplier Γ base_strength Γ typical_norm Γ unit_vector` to the hidden | |
| states. See `runtime.py` for the full implementation β it's ~200 lines of | |
| plain `transformers`. | |
| The vectors were found by mean-differencing paired contrastive sentences | |
| (patriotic vs. neutral completions of the same prompt). Full write-up: | |
| [America AI](https://bitsofchris.com/p/american-ai) on bitsofchris.com. | |
| ## Disclaimer | |
| America AI is a parody built as an educational demo of how easily language | |
| models can be invisibly steered. Its responses are generated entertainment, | |
| not neutral or factual guidance. | |
| ## Secrets | |
| Requires `HF_TOKEN` with access to the gated `google/gemma-2-2b-it`. | |