Skills for Real Engineers. Straight from my .agents directory.
pyvene-interventions
Agent skill fromOrchestra-Research/AI-Research-SKILLs
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 to install pyvene-interventions
npx skills add Orchestra-Research/AI-Research-SKILLs# or add only this skill to Claude Code: copy the folder
04-mechanistic-interpretability/pyvene/
# into
~/.claude/skills/pyvene/ (all projects)
.claude/skills/pyvene/ (one project)
1# pyvene: Causal Interventions for Neural Networks23pyvene 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.45**GitHub**: [stanfordnlp/pyvene](https://github.com/stanfordnlp/pyvene) (840+ stars)6**Paper**: [pyvene: A Library for Understanding and Improving PyTorch Models via Interventions](https://aclanthology.org/2024.naacl-demo.16) (NAACL 2024)78## When to Use pyvene910**Use pyvene when you need to:**11- Perform causal tracing (ROME-style localization)12- Run activation patching experiments13- Conduct interchange intervention training (IIT)14- Test causal hypotheses about model components15- Share/reproduce intervention experiments via HuggingFace16- Work with any PyTorch architecture (not just transformers)1718**Consider alternatives when:**19- You need exploratory activation analysis → Use **TransformerLens**20- You want to train/analyze SAEs → Use **SAELens**21- You need remote execution on massive models → Use **nnsight**22- You want lower-level control → Use **nnsight**2324## Installation2526```bash27pip install pyvene28```2930Standard import:31```python32import pyvene as pv33```3435## Core Concepts3637### IntervenableModel3839The main class that wraps any PyTorch model with intervention capabilities:4041```python42import pyvene as pv43…
Excerpt shown under the repository's MIT license.
More skills in AI-Research-SKILLs
Similar skill repositories
An agentic skills framework & software development methodology that works.
Public repository for Agent Skills
Makes your AI agent think like the laziest senior dev in the room. The best code is the code you never wrote.
Production-grade engineering skills for AI coding agents.
The open-source app everyone uses to manage agents at work
