Agent skill · research science · davila7

nnsight-remote-interpretability

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.

Why this skill is useful

Provides domain-specific knowledge for interpreting and manipulating large neural network models using nnsight, which the AI wouldn't reliably generate on its own.

What it needs

Requires nnsight, torch installed locally. Requires ndif account access. About 6k tokens when loaded. Last updated 2026-08-06. 30,138 stars on the source repository.

What this skill does

nnsight: Transparent Access to Neural Network Internals nnsight (/ɛ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. GitHub: ndif-team/nnsight (730+ stars) Paper: NNsight and NDIF: Democratizing Access to Foundation Model Internals (ICLR 2025) Key Value Proposition Write once, run anywhere: The same interpretability code works on GPT-2 locally or Llama-3.1-405B remotely. Just toggle remote=True. When to Use nnsight Use nnsight when you need to: Run interpretability experiments on models too large for local GPUs (70B, 405B) Work with any PyTorch architecture (transformers, Mamba, custom models) Perform multi-token generation interventions Share activations between different prompts Access full model internals without reimplementation Consider alternatives when: You want consistent API across models → Use TransformerLens You need declarative, shareable interventions → Use pyvene You're training SAEs → Use SAELens You only work with small models locally → TransformerLens may be simpler Installation For remote NDIF execution, sign up at login.ndif.us for an API key. Core Concepts LanguageModel Wrapper Tracing Context The trace context manager enables deferred execution - operations are collected into a computation graph: Proxy Objects Inside trace, module accesses return Proxy objects that record operations: Workflow 1: Activation Analysis Step-by-Step Checklist [ ] Load model with LanguageModel wrapper [ ] Use trace context for operations [ ] Call .save() on values you need after context [ ] Access saved values outside context [ ] Use .shape, .norm(), etc. for analysis Workflow 2: Activation Patching Step-by-Step Systematic Patching Sweep Workflow 3: Remote Execution with NDIF Run the same experiments on massive models without local GPUs. Step-by-Step NDIF Setup 1. Sign up at login.ndif.us 2. …

How to use it

Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:

@skills davila7/mechanistic-interpretability-nnsight

View the source on GitHub

Browse the @skills marketplace