Skip to the demo

Representation Steering Demo

Move the slider to see how steering changes a model’s response to the same prompt. Every number below is measured, and the badge says where each one came from. Run re-measures any example, or a prompt of your own, live on a Hugging Face Space.

Precomputed results · no live inference · Qwen2.5 0.5B · layer 7 · c = 1

Held fixed, so every strength is compared at the same next-token position.

0.0

Nine discrete steps from minus 2 to plus 2 for the Movie Critic scenario. Use the arrow keys to move one step, Home and End for the extremes. The labels under the slider jump straight to their positions.

Model response

Next token: stunning · 23.2%

The movie was absolutely stunning, with its breathtaking visuals and immersive storytelling that transported viewers to a world of alien landscapes and alien life forms.

Next-token probabilities

for the token right after the opening words

Next-token probabilities for Movie Critic at alpha 0.0, no steering: terrible less than 0.1 percent, stunning 23.2 percent, captivating 8.1 percent, and 68.7 percent for all other tokens combined.
CandidateProbability at alpha 0.0Probability at the neutral reference, alpha 0.0
terrible<0.1%<0.1%
stunning23.2%23.2%
captivating8.1%8.1%
All other tokens, combined remainder68.7%68.7%

Thin markers show probabilities without steering. “All other tokens” is the combined remainder of the vocabulary, not a token itself.

Without steering α 0.0

The movie was absolutely stunning, with its breathtaking visuals and immersive storytelling that transported viewers to a world of alien landscapes and alien life forms.

What changes inside the model

vhh′
Schematic representation space: a drawing of the idea, not a measured embedding projection.

h′ = h + αcv

h
representation before the intervention
v
steering direction
α
the slider: steering strength and sign
c
fixed per-scenario coefficient, here 1
h′
representation after the intervention

Direction for this scenario: Negative sentimentPositive sentiment.

Steering shifts the response toward a more negative or more positive review.

How this works

Representation steering, also called activation steering, changes a model’s internal activations during generation. Here a steering vector v is added to a hidden representation h at a selected layer: h′ = h + αcv. The slider controls α. c is a fixed per-scenario coefficient, shown in the badge, so c = 2 at α = 1 means the intervention is scaled by 2. At α = 0 nothing is added at all; positive and negative values move in opposite directions.

These results were measured in advance and ship with the page. The chart shows probabilities for the token immediately after the fixed opening words, and the response shows the corresponding generated continuation. The rows are the tokens that win somewhere on the slider, not necessarily the three most likely at the current setting; “All other tokens” is the combined remainder of the vocabulary. A token is a unit of model text and may be a word or part of a word.

A higher probability does not always change the selected token. These runs use greedy decoding, which takes the highest-scoring token at each step, with sampling and any packaged repetition penalty switched off so the first generated token is exactly the argmax shown beside it. Steering effects can be uneven, and stronger steering can reduce fluency or change unrelated details; both are visible on the slider.

Responses are the model’s own words, unedited. Generation stops at an end-of-sequence token or at a 40-token limit; a trailing ellipsis means the limit was reached and the model was still going. Repetition and unfinished clauses are left in rather than tidied away, because editing them would break the claim that this is what the model produced.

Probabilities are read from the full softmax over the vocabulary, not from a truncated top-k list, and are stored with enough precision that a token the model gave very little weight to is still shown as <0.1% rather than rounded away to zero.

Your own prompt. With a live service configured, the prompt and opening words are editable and can be measured for real. The steering direction is still the selected scenario’s, re-derived from its contrast examples in the context of your prompt. Expect mixed results: a direction found for one question does not always transfer.

Scenario text, opening words, direction labels and takeaways are written by hand. The candidate tokens, probabilities and responses on screen are measured from Qwen/Qwen2.5-0.5B-Instruct at revision 7ae557604a. The layer and coefficient were chosen by sweeping both and keeping the setting where the intended contrast appeared most clearly. Those are selected demonstration settings, not evidence of general effectiveness. The models here are deliberately small; none of this is a result about how larger systems behave. Measured 2026-09-20. Method and data: docs/MEASUREMENT.md.

alpha 0.0, no steering, no steering applied. Next token stunning, 23.2 percent. Completion: The movie was absolutely stunning, with its breathtaking visuals and immersive storytelling that transported viewers to a world of alien landscapes and alien life forms.