Pyvene Causal Interventions
Skill Verified ActiveProvides 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.
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
- Define PyTorch model and pyvene configuration
- Create intervenable model instance
- Prepare base and source inputs
- Execute intervention using model forward pass
- 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-skillsQuality Score
VerifiedTrust Signals
Similar Extensions
Nnsight Remote Interpretability
99Provides 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.
Pyvene Interventions
96Provides 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.
PyTorch Lightning
100Deep 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.
TimesFM Forecasting
100Zero-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.
SHAP Model Interpretability
100Model 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.
Implementing Llms Litgpt
100Implements 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.