Tooluck logoTooluck
SKILL.md

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)

04-mechanistic-interpretability/nnsight/SKILL.md

MITFull file
1# nnsight: Transparent Access to Neural Network Internals
2
3nnsight (/ɛ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.
4
5**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)
7
8## Key Value Proposition
9
10**Write once, run anywhere**: The same interpretability code works on GPT-2 locally or Llama-3.1-405B remotely. Just toggle `remote=True`.
11
12```python
13# Local execution (small model)
14with model.trace("Hello world"):
15 hidden = model.transformer.h[5].output[0].save()
16
17# Remote execution (massive model) - same code!
18with model.trace("Hello world", remote=True):
19 hidden = model.model.layers[40].output[0].save()
20```
21
22## When to Use nnsight
23
24**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 interventions
28- Share activations between different prompts
29- Access full model internals without reimplementation
30
31**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.

More skills in AI-Research-SKILLs

Newsletter

Join the Community

Subscribe to our newsletter for the latest news and updates