跳转到主要内容
此内容尚未提供您的语言版本,正在以英文显示。

Pyvene Causal 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.

目的

To provide a declarative framework for reproducible causal intervention experiments on PyTorch models, enabling deeper understanding of model behavior.

功能

  • Declarative intervention framework
  • Support for activation patching and causal tracing
  • Guidance on interchange intervention training
  • Model-agnostic PyTorch compatibility
  • Reproducible and shareable intervention experiments

使用场景

  • Conducting causal tracing (ROME-style localization)
  • Running activation patching experiments
  • Performing interchange intervention training (IIT)
  • Testing causal hypotheses about model components
  • Sharing and reproducing intervention experiments

非目标

  • Exploratory activation analysis (use TransformerLens)
  • Training/analyzing SAEs (use SAELens)
  • Remote execution on massive models (use nnsight)
  • Providing lower-level control (use nnsight)

工作流

  1. Define PyTorch model and pyvene configuration
  2. Create intervenable model instance
  3. Prepare base and source inputs
  4. Execute intervention using model forward pass
  5. Analyze results or generate output

实践

  • Mechanistic Interpretability
  • Causal Inference
  • Model Analysis

先决条件

  • pyvene>=0.1.8
  • torch>=2.0.0
  • transformers>=4.30.0

安装

请先添加 Marketplace

/plugin marketplace add Orchestra-Research/AI-Research-SKILLs
/plugin install AI-Research-SKILLs@ai-research-skills

质量评分

已验证
97 /100
1 day ago 分析

信任信号

最近提交17 days ago
星标8.3k
许可证MIT
状态
查看源代码

类似扩展

Nnsight Remote Interpretability

99

Provides guidance for interpreting and manipulating neural network internals using nnsight with optional NDIF remote execution. Use when needing to run interpretability experiments on massive models (70B+) without local GPU resources, or when working with any PyTorch architecture.

技能
davila7

Pyvene Interventions

96

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.

技能
davila7

PyTorch Lightning

100

Deep learning framework (PyTorch Lightning). Organize PyTorch code into LightningModules, configure Trainers for multi-GPU/TPU, implement data pipelines, callbacks, logging (W&B, TensorBoard), distributed training (DDP, FSDP, DeepSpeed), for scalable neural network training.

技能
K-Dense-AI

TimesFM Forecasting

100

Zero-shot time series forecasting with Google's TimesFM foundation model. Use for any univariate time series (sales, sensors, energy, vitals, weather) without training a custom model. Supports CSV/DataFrame/array inputs with point forecasts and prediction intervals. Includes a preflight system checker script to verify RAM/GPU before first use.

技能
K-Dense-AI

SHAP Model Interpretability

100

Model interpretability and explainability using SHAP (SHapley Additive exPlanations). Use this skill when explaining machine learning model predictions, computing feature importance, generating SHAP plots (waterfall, beeswarm, bar, scatter, force, heatmap), debugging models, analyzing model bias or fairness, comparing models, or implementing explainable AI. Works with tree-based models (XGBoost, LightGBM, Random Forest), deep learning (TensorFlow, PyTorch), linear models, and any black-box model.

技能
K-Dense-AI

Implementing Llms Litgpt

100

Implements and trains LLMs using Lightning AI's LitGPT with 20+ pretrained architectures (Llama, Gemma, Phi, Qwen, Mistral). Use when need clean model implementations, educational understanding of architectures, or production fine-tuning with LoRA/QLoRA. Single-file implementations, no abstraction layers.

技能
davila7