transformer-lens-interpretability
Provides guidance for mechanistic interpretability research using TransformerLens to inspect and manipulate transformer internals via HookPoints and activation caching. Use when reverse-engineering model algorithms, studying attention patterns, or performing activation patching experiments.
npx skills add Orchestra-Research/AI-Research-SKILLs --skill transformer-lens --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# 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](https://github.com/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 ```bash pip install
- When to Use TransformerLens
- Installation
- Core Concepts
- HookedTransformer
- Supported Models (50+)
- Activation Caching
- ActivationCache Keys
- Workflow 1: Activation Patching (Causal Tracing)
- Step-by-Step
- Checklist
- Workflow 2: Circuit Analysis (Indirect Object Identification)
- Workflow 3: Induction Head Detection
- Common Issues & Solutions
- Issue: Hooks persist after debugging
pip install transformer-lens pip install git+https://github.com/TransformerLensOrg/TransformerLens
What does the transformer-lens-interpretability skill do?
Provides guidance for mechanistic interpretability research using TransformerLens to inspect and manipulate transformer internals via HookPoints and activation caching. Use when reverse-engineering model algorithms, studying attention patterns, or performing activation patching experiments.
How do I install it?
Run `npx skills add Orchestra-Research/AI-Research-SKILLs --skill transformer-lens --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From Orchestra-Research/AI-Research-SKILLs, a repository with 11,391 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
