
Pyvene Interventions
This skill helps you run causal interventions on PyTorch models using Stanford NLP's pyvene library. If you're doing activation patching, causal tracing (ROME-style localization), or interchange intervention training, it walks you through the declarative dict-based API. You get concrete workflows for finding where factual associations live in transformers, testing which attention heads matter for specific behaviors, and training interventions to discover causal structure. It's focused on mechanistic interpretability experiments where you need to patch activations between model runs and share reproducible intervention configs. The guidance assumes you already know why you want to intervene on model internals rather than just probe them.
- skills.sh installs
- 1K
- GitHub stars
- 14.4K
- last updated
- Aug 21, 2026
Install
$ npx -y skills add orchestra-research/ai-research-skills --skill pyvene-interventions --agent claude-codeInstalls into .claude/skills of the current project.
Files
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 (840+ stars) Paper: pyvene: A Library for Understanding and Improving PyTorch Models via Interventions (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
Sponsors
Details
- Repository
- github.com/orchestra-research/ai-research-skills
- Categories
- Testing & QA, AI & Agent Building, Data Science & ML
- First seen
- Jun 3, 2026
More from orchestra-research/ai-research-skills
All 95- Simpo Training1K
- Slime Rl Training1K
- Training Llms Megatron1K
- Guidance1K
- Mamba Architecture1K
- Model Pruning1K
- Sparse Autoencoder Training1K
- Implementing Llms Litgpt1K
- Llamaguard1K
- Miles Rl Training1K
- Torchforge Rl Training1K
- Nemo Guardrails1K
- Pinecone1K
- Nnsight Remote Interpretability1K
- Rwkv Architecture1K
- Skypilot Multi Cloud Orchestration1K
- Autogpt Agents1K
- Blip 2 Vision Language1K
- Constitutional Ai1K
- Langsmith Observability1K
- Nemo Evaluator Sdk1K
- Llava1K
- Phoenix Observability1K
- Lambda Labs Gpu Cloud1K