Skip to main content

Pyvene Causal Interventions

Skill Verified Active

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.

Purpose

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

Features

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

Use Cases

  • 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

Non-Goals

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

Workflow

  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

Practices

  • Mechanistic Interpretability
  • Causal Inference
  • Model Analysis

Prerequisites

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

Installation

First, add the marketplace

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

Quality Score

Verified
97 /100
Analyzed 1 day ago

Trust Signals

Last commit17 days ago
Stars8.3k
LicenseMIT
Status
View Source

Similar Extensions

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.

Skill
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.

Skill
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.

Skill
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.

Skill
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.

Skill
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.

Skill
davila7

© 2025 SkillRepo · Find the right skill, skip the noise.