activations
Get per-layer activation summary statistics for a prompt and model, including shape, mean, std, min/max, and max-activating positions, to inspect specific hook points when top-k rankings lack detail before patching.
Instructions
Dump raw per-layer activation summary statistics (shape, mean, std, min/max, and the max-activating sequence position) for one prompt run through an open-weight TransformerLens-supported model, covering every layer's residual stream, MLP neuron activations, and attention pattern. Call this when trace's top-k ranking isn't enough detail and you need the raw scale/shape of a specific hook point before deciding what to inspect further or patch with the patch tool. Same model constraint as trace: only models HookedTransformer.from_pretrained supports. Read-only and deterministic for a given model and prompt; the only side effect is HuggingFace Hub caching the model weights locally on first use of a given model name, which needs network access that one time. Runs on CPU by default. Output size scales with model depth since it returns stats for every layer, not a top-k subset, so it can be verbose for large models. On failure (unsupported model name, prompt too long for the context window) it returns a structured error object rather than raising. Parameters: model (str), any name HookedTransformer.from_pretrained accepts, e.g. 'gpt2'; prompt (str), the input text. Example call: model='gpt2', prompt='The capital of France is Paris. The capital of Japan is'. Returns JSON with schema_version, operation, model, prompt, n_tokens, and activations (list of {hook_name, layer, shape, mean, std, max_value, max_position, min_value}, one entry per hook point).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| model | Yes | ||
| prompt | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||