nnsight-remote-interpretability
Agent skill fromOrchestra-Research/AI-Research-SKILLs
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.
How to install nnsight-remote-interpretability
install nnsight-remote-interpretability
# install the AI-Research-SKILLs pack with the skills CLI
npx skills add Orchestra-Research/AI-Research-SKILLs# or add only this skill to Claude Code: copy the folder
04-mechanistic-interpretability/nnsight/
# into
~/.claude/skills/nnsight/ (all projects)
.claude/skills/nnsight/ (one project)
1# nnsight: Transparent Access to Neural Network Internals23nnsight (/ɛn.saɪt/) enables researchers to interpret and manipulate the internals of any PyTorch model, with the unique capability of running the same code locally on small models or remotely on massive models (70B+) via NDIF.45**GitHub**: [ndif-team/nnsight](https://github.com/ndif-team/nnsight) (730+ stars)6**Paper**: [NNsight and NDIF: Democratizing Access to Foundation Model Internals](https://arxiv.org/abs/2407.14561) (ICLR 2025)78## Key Value Proposition910**Write once, run anywhere**: The same interpretability code works on GPT-2 locally or Llama-3.1-405B remotely. Just toggle `remote=True`.1112```python13# Local execution (small model)14with model.trace("Hello world"):15 hidden = model.transformer.h[5].output[0].save()1617# Remote execution (massive model) - same code!18with model.trace("Hello world", remote=True):19 hidden = model.model.layers[40].output[0].save()20```2122## When to Use nnsight2324**Use nnsight when you need to:**25- Run interpretability experiments on models too large for local GPUs (70B, 405B)26- Work with any PyTorch architecture (transformers, Mamba, custom models)27- Perform multi-token generation interventions28- Share activations between different prompts29- Access full model internals without reimplementation3031**Consider alternatives when:**32- You want consistent API across models → Use **TransformerLens**33- You need declarative, shareable interventions → Use **pyvene**34…
Excerpt shown under the repository's MIT license.
