# ndif-team/nnsight

The nnsight package enables interpreting and manipulating the internals of deep learned models.

Repository: https://github.com/ndif-team/nnsight
Canonical: https://ross.abutalabs.com/products/nnsight
Homepage: https://nnsight.net/
Language: Python
License: MIT
License Family: permissive
Topics: interpretability, machine-learning, neural-networks, python, pytorch
Last push: 2026-09-02T22:03:32+00:00

## Health v2 (maintenance only)
Score: 88/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 100, release rhythm 82, longevity 74
- inputs: {"age_days": 1048, "days_push": 0, "days_rel": 120, "gap_med": 8, "n_releases_24m": 38}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1085, forks 114 (observed 2026-09-03T02:15:15.390326+00:00)

## What it is
nnsight is a Python library for interpreting and intervening on the internals of deep learning models, built on PyTorch. It lets researchers access, modify, and save activations and gradients during forward passes, locally on any PyTorch model or remotely on large models via the NDIF infrastructure.

## Use cases
- access hidden states and activations from any layer of a neural network
- modify activations to study causal effects in language models
- run activation patching experiments on transformers
- interpret internals of large language models too big to run locally
- compute gradients with respect to intermediate model values
- batch interventions across multiple inputs efficiently
- trace model execution and save intermediate tensors for analysis

## When to choose
- you need fine-grained access to model internals like activations and gradients during inference
- you want to run interpretability experiments on both small local models and huge remote models with the same code
- you are doing mechanistic interpretability research on PyTorch or HuggingFace models
- you need to intervene on model execution mid-forward-pass

## When to avoid
- you only need standard inference or fine-tuning without inspecting internals
- you work with non-PyTorch frameworks like JAX or TensorFlow
- you need a no-code or GUI interpretability tool rather than a Python API

## Facets
- artifact type: library
- maturity: active
- function: machine-learning, deep-learning, llm-inference, sdk
- domain: machine-learning, deep-learning, large-language-models, artificial-intelligence, developer-tools
- platform: python, cross-platform
- tags: interpretability, activation-patching, pytorch, model-internals, neural-network-intervention, ndif, remote-execution, mechanistic-interpretability, gpu

## Member repositories
- ndif-team/nnsight (main) score 88

## Provenance
- Observed fields: from GitHub, fetched 2026-09-03T02:15:15.390326+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T06:53:42.512944+00:00, confidence not recorded.
  - readme: https://github.com/ndif-team/nnsight (fetched 2026-09-03T02:15:15.390326+00:00, sha e4e83a92adb3)
  - homepage: https://nnsight.net/ (fetched 2026-08-29T12:56:08.868412+00:00, sha f95e59797829)
  - site_page: https://nnsight.net/getting-started (fetched 2026-08-29T12:56:08.877470+00:00, sha 31ce02eb0c27)
  - site_page: https://nnsight.net/documentation (fetched 2026-08-29T12:56:08.879208+00:00, sha 9ec671516646)
  - site_page: https://nnsight.net/features (fetched 2026-08-29T12:56:08.880877+00:00, sha 24965ebf0933)
  - site_page: https://nnsight.net/about (fetched 2026-08-29T12:56:08.882595+00:00, sha b508e7313e7f)
  - site_page: https://nnsight.net/getting-started/installation (fetched 2026-08-29T12:56:08.884490+00:00, sha f2a359b032b1)
  - site_page: https://nnsight.net/getting-started/quickstart (fetched 2026-08-29T12:56:08.886076+00:00, sha 8ab0c4faa9ca)
  - site_page: https://nnsight.net/documentation/intervention (fetched 2026-08-29T12:56:08.887636+00:00, sha a4cdcc6da79f)
  - site_page: https://nnsight.net/documentation/intervention/envoy (fetched 2026-08-29T12:56:08.889099+00:00, sha 08ff2106547e)
- Data as of 2026-08-30T08:39:29.467469+00:00.
