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.
npx skills add Orchestra-Research/AI-Research-SKILLs --skill pyvene --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.
# 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
- When to Use pyvene
- Installation
- Core Concepts
- IntervenableModel
- Intervention Types
- Component Targets
- Workflow 1: Causal Tracing (ROME-style)
- Step-by-Step
- Checklist
- Workflow 2: Activation Patching for Circuit Analysis
- Workflow 3: Interchange Intervention Training (IIT)
- DAS (Distributed Alignment Search)
- Workflow 4: Model Steering (Honest LLaMA)
- Saving and Sharing Interventions
pip install pyvene
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.
