Inside the model · activation engineering

Steering LLMs

Give the model a story opening, then move its internal activations toward a theme. Compare the continuation with ordinary prompting, or try to discover a direction of your own.

Evaluated on short English story continuations with this pinned model. These are subject directions, not universal behavior controls. Read the outputs, controls and rejected candidates.

Evaluation & examples · Food & cooking

After block 20, α = 1: 4/5 reviewed continuations passed on CPU and 4/5 in browser WASM, at T = 0.7 and seed 42. This was a small qualitative review of recognizable themes and interpretable continuations.

One of five reviewed continuations failed on each backend. Stronger settings can break coherence; the model also makes grammatical and naming mistakes.

Recorded original · browser

After the long journey, we arrived at the station. "A big thank you for the ride," the conductor said, handing us our tickets. "We have a train that's supposed to arrive at the station in about 30 minutes." I thanked the conductor and the station staff, then headed towards the platform to collect my bags. "What

Recorded steered · browser

After the long journey, we arrived at the coast. This is where the real taste of the food came alive. The aroma of the ocean, the sweetness of the herbs, and the subtle spices blended together to create a symphony of flavors that were just incomparable. The flavors were so different from the ones in the kitchen that you could taste the distance between

All held-out outputs, failures and reviews · Development search history

Where the intervention happens

SmolLM2 · 32 transformer blocks · 960-dimensional residual stream

PromptEmbeddingTransformer blocks

After block 20, before block 21

h′ = h + α · v

The edited residual enters the remaining attention and MLP blocks. Only generated token activations are edited. The prompt pass stays unchanged; original and steered share their first token.

No intervention+ Food & cooking

Evaluation setting: α = 1.00, after block 20, T = 0.7, seed 42, 64 tokens. Intermediate strengths are exploratory; α = 0 is the unchanged control.

One opening, three continuations

Ready · model downloads on first run

First run downloads a verified 365 MB model plus tokenizer, then caches it. Use a desktop browser with enough free memory. Inference stays in a browser worker. This compact English instruction model has limited writing ability; compare the full outputs.

Inspect the measured direction’s dataset · 8 pairs

This recipe was evaluated offline. Its vector is measured again on your browser’s inference backend from the dataset below. We capture the last token after block 20, then average the target-minus-contrast differences: v = mean(h⁺ − h⁻). These examples are separate from the generation prompt.

Shared instruction for all conditions: “Continue the story from the assistant opening, in English. Write only the continuation.” Your opening is then supplied as the assistant’s unfinished text.

Original model

Shared opening · no intervention

Run the experiment to generate this continuation.

Prompt instruction

Shared opening + the visible theme instruction

Run the experiment to generate this continuation.

Activation steering

Shared opening · internal activation + 1.00v

Run the experiment to generate this continuation.

Mean-difference activation addition, inspired by ActAdd and CAA. Direction selection uses held-out outputs and matched controls; the evaluation is small and model-specific. Custom pairs are unvalidated. Inspect the direction evaluation. Model: SmolLM2-360M-Instruct · pinned q8 revision.