pyvene-interventions

仓库创建 2025年11月3日最近提交 1 个月前SkillHot 收录 21 天前
▸ 精选理由

方便做可复现的因果追踪与干预实验,适合研究者共享流程。

这个 Skill 做什么

用 pyvene 的声明式框架对 PyTorch 模型执行因果干预与激活补丁实验。

用 pyvene 在 PyTorch 模型里做因果干预、activation patching 和 causal tracing,让你能用声明式的方式写实验并复现别人的流程。适合做因果可解释性实验、验证模型内部机制或做 interchange intervention training 时使用。特点是基于 dict 的声明式框架,便于共享、重跑和自动化实验管理。

▸ 展开 SKILL.md 英文原文

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.

研究检索因果干预activation patching可复现实验通用
1.1w
Stars
817
Forks
40
仓库内 Skill
+704
7 日增星
安装 / 使用
给你的 Agent 一句话(通用)
帮我安装这个 skill:https://raw.githubusercontent.com/Orchestra-Research/AI-Research-SKILLs/main/04-mechanistic-interpretability/pyvene/SKILL.md
或 curl 直取 SKILL.md
curl -fsSL "https://raw.githubusercontent.com/Orchestra-Research/AI-Research-SKILLs/main/04-mechanistic-interpretability/pyvene/SKILL.md"
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 patchi
via SKILL·HOT · 数据来自 GitHub 公开信息 · 原文版权归作者所有