Skip to content
orchestra-research avatar

Transformer Lens Interpretability

Mechanistic interpretability toolkit for inspecting and patching transformer internals via HookPoints.

CCM score
61 of 100
skills.sh installs
1.1K
GitHub stars
14.9K
last updated
Aug 21, 2026
View on GitHub

Own this skill? Claim it

What it does

  • Covers activation caching, attention pattern analysis, direct logit attribution, and activation patching workflows for GPT-style models
  • Includes worked recipes for causal tracing, indirect object identification circuit analysis, and induction head detection
  • Exposes every intermediate activation through named HookPoints such as resid_post, pattern, and mlp_out, with names_filter to limit cache memory
  • Designed for researchers reverse-engineering learned algorithms in supported model families such as GPT-2, Pythia, LLaMA, and Mistral

Install

$ npx -y skills add orchestra-research/ai-research-skills --skill transformer-lens-interpretability -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

Files

TransformerLens: Mechanistic Interpretability for Transformers

TransformerLens is the de facto standard library for mechanistic interpretability research on GPT-style language models. Created by Neel Nanda and maintained by Bryce Meyer, it provides clean interfaces to inspect and manipulate model internals via HookPoints on every activation.

GitHub: TransformerLensOrg/TransformerLens (2,900+ stars)

When to Use TransformerLens

Use TransformerLens when you need to:

  • Reverse-engineer algorithms learned during training
  • Perform activation patching / causal tracing experiments
  • Study attention patterns and information flow
  • Analyze circuits (e.g., induction heads, IOI circuit)
  • Cache and inspect intermediate activations
  • Apply direct logit attribution

Consider alternatives when:

  • You need to work with non-transformer architectures → Use nnsight or pyvene
  • You want to train/analyze Sparse Autoencoders → Use SAELens
  • You need remote execution on massive models → Use nnsight with NDIF
  • You want higher-level causal intervention abstractions → Use pyvene

Installation

Details

Repository
github.com/orchestra-research/ai-research-skills
Categories
Research & Academic, Data Science & Analytics
First seen
Jun 3, 2026

Questions

What does the transformer-lens-interpretability skill do?

The transformer-lens-interpretability skill guides mechanistic interpretability research with TransformerLens, using HookPoints and activation caching to inspect and manipulate transformer internals. It covers reverse-engineering model algorithms, studying attention patterns, and running activation patching experiments.

How do I install the transformer-lens-interpretability skill?

Run npx -y skills add orchestra-research/ai-research-skills --skill transformer-lens-interpretability -y in a project to install it. Once installed, the transformer-lens-interpretability skill gives the agent workflows for activation patching, circuit analysis and induction head detection.

What does transformer-lens-interpretability need to run?

The transformer-lens-interpretability skill relies on the transformer-lens package at version 2.0.0 or later and torch at version 2.0.0 or later. Gated models such as LLaMA or Mistral also need a Hugging Face token set in the HF_TOKEN environment variable.

Which tasks is transformer-lens-interpretability suited for?

The transformer-lens-interpretability skill suits researchers who need to cache and inspect intermediate activations, apply direct logit attribution, or analyze circuits such as the indirect object identification circuit. For non-transformer architectures or sparse autoencoders, the skill's own guidance points to nnsight, pyvene or SAELens instead.

More from orchestra-research/ai-research-skills

All 92

Similar to Transformer Lens Interpretability

More Research & Academic