ndif-team/nnsight
A Python library for accessing and manipulating activations, gradients, and causal interventions in deep learning models.

nnsight provides a clean Pythonic interface for inspecting and intervening in deep learning models at any layer during forward passes. It enables accessing intermediate activations, modifying activations to study causal effects, computing gradients with respect to intermediate values, and batching interventions across multiple inputs. Originally developed by the NDIF team at Northeastern University, it supports local PyTorch models and remote inference via NDIF infrastructure, with Claude Code skills integration for LLM agents.