Agent skill · AI & Agents

pyvene-interventions

Provides guidance for performing causal interventions on PyTorch models using pyvene's declarative intervention framework. Use when conducting causal tracing, activation patching, interchange intervention training, or testing causal hypotheses about model behavior.

Orchestra-Researchgithub.com/Orchestra-ResearchGitHub ↗
claude-codecodexMIT
Install
npx skills add Orchestra-Research/AI-Research-SKILLs --skill pyvene --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 4
SKILL.md size: 14 KB
Bundled scripts: none
Version: 1.0.0
Declared author: Orchestra Research
Requires: [pyvene>=0.1.8, torch>=2.0.0, transformers>=4.30.0]
Path: 04-mechanistic-interpretability/pyvene/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 11,391
Language: TeX
Read our review of the source →

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# pyvene: Causal Interventions for Neural Networks pyvene is Stanford NLP's library for performing causal interventions on PyTorch models. It provides a declarative, dict-based framework for activation patching, causal tracing, and interchange intervention training - making intervention experiments reproducible and shareable. **GitHub**: [stanfordnlp/pyvene](https://github.com/stanfordnlp/pyvene) (840+ stars) **Paper**: [pyvene: A Library for Understanding and Improving PyTorch Models via Interventions](https://aclanthology.org/2024.naacl-demo.16) (NAACL 2024) ## When to Use pyvene **Use pyvene when you need to:** - Perform causal tracing (ROME-style localization) - Run activation patching experiments - Conduct interchange intervention training (IIT) - Test causal hypotheses about model components - Share/reproduce intervention experiments via HuggingFace - Work with any PyTorch architecture (not just transformers) **Consider alternatives when:** - You need exploratory activation analysis → Use **TransformerLens** - You want to train/analyze SAEs → Use **SAELens** - You need remote execution on massive models → Use **nnsight** - You want lower-level control → Use **nnsight** ## Ins

What's inside
Steps it walks through
  1. When to Use pyvene
  2. Installation
  3. Core Concepts
  4. IntervenableModel
  5. Intervention Types
  6. Component Targets
  7. Workflow 1: Causal Tracing (ROME-style)
  8. Step-by-Step
  9. Checklist
  10. Workflow 2: Activation Patching for Circuit Analysis
  11. Workflow 3: Interchange Intervention Training (IIT)
  12. DAS (Distributed Alignment Search)
  13. Workflow 4: Model Steering (Honest LLaMA)
  14. Saving and Sharing Interventions
Ships with 3 files
  • references/README.md
  • references/api.md
  • references/tutorials.md
Commands it runs
pip install pyvene
More from AI-Research-SKILLs
All skills →
About this skill
What does the pyvene-interventions skill do?

Provides guidance for performing causal interventions on PyTorch models using pyvene's declarative intervention framework. Use when conducting causal tracing, activation patching, interchange intervention training, or testing causal hypotheses about model behavior.

How do I install it?

Run `npx skills add Orchestra-Research/AI-Research-SKILLs --skill pyvene --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.

Keep going