#152152nd of 433 in ML frameworks and libraries

nnsight

Python library for reading and editing PyTorch model internals during a forward pass

Run it:Vast.ai ↗ (opens in a new tab)Clore.ai ↗ (opens in a new tab)Affiliate links, no effect on a rank.

Stars
1.2k
License
MIT
Last commit
Nov 2026
Last release
Nov 2026
Language
Python
Stars, last 29 weeks+251
7 May 2026: 913 stars14 May 2026: 917 stars21 May 2026: 927 stars28 May 2026: 934 stars4 Jun 2026: 945 stars11 Jun 2026: 952 stars18 Jun 2026: 960 stars25 Jun 2026: 966 stars2 Jul 2026: 972 stars9 Jul 2026: 978 stars16 Jul 2026: 990 stars23 Jul 2026: 993 stars30 Jul 2026: 1,000 stars6 Aug 2026: 1,010 stars13 Aug 2026: 1,018 stars20 Aug 2026: 1,026 stars27 Aug 2026: 1,074 stars3 Sept 2026: 1,082 stars10 Sept 2026: 1,089 stars17 Sept 2026: 1,100 stars24 Sept 2026: 1,104 stars1 Oct 2026: 1,112 stars8 Oct 2026: 1,119 stars15 Oct 2026: 1,122 stars22 Oct 2026: 1,124 stars29 Oct 2026: 1,134 stars5 Nov 2026: 1,143 stars12 Nov 2026: 1,147 stars19 Nov 2026: 1,150 stars26 Nov 2026: 1,164 stars

913 on 7 May 20261,164 on 26 Nov 2026

From GitHub's daily star counts.

Checked on GitHub.

Overview

nnsight lets you open a `with model.trace(...)` block and read, edit or save any internal value of a PyTorch model, such as layer outputs, attention patterns and gradients, without registering hooks. It wraps HuggingFace, diffusers and vLLM models, or any `torch.nn.Module` via `NNsight`. The same trace can run on NDIF infrastructure with `remote=True` for models too large to host locally.

Who it is for: Interpretability researchers probing or editing deep learning model internals

Strengths

  • Interventions are written as ordinary Python in execution order, with no hook registration
  • Works with any torch.nn.Module; ships wrappers for HuggingFace, diffusers and vLLM
  • Same trace code runs locally or on NDIF via remote=True
  • Supports gradients, batched invokes, per-step generation access and out-of-order module calls

Weaknesses

  • Remote runs require an NDIF API key and only cover models hosted on NDIF
  • Trace blocks defer execution, so values need .save() and differ from normal Python
  • PyTorch only; no other tensor frameworks are mentioned
  • Module output shapes vary (tensor vs tuple), so users must inspect each model

What it needs

  • GPU optional
  • Needs PyTorch, NDIF (optional, for remote=True)
  • Models: PyTorch nn.Module, HuggingFace Transformers, diffusers, vLLM

What changed

  1. “vLLM is pinned to 0.33. The vllm extra requires vllm>=0.33,<0.34 (#837). vLLM 0.33 needs Python 3.11 or newer and transformers<5.21, and publishes only a CUDA 13 wheel.”

  2. “vLLM is pinned to 0.27. The vllm extra now requires vllm>=0.27.1,<0.28 (#801). Without a pin, pip install "nnsight[vllm]" installed vLLM 0.32, where taps stop firing after the prefill without an erro…”

From the release notes. No flag means the note does not say so, not that the upgrade is safe. Releases and problems by RSS

Also in ML frameworks and libraries

See all 433
Also in ML frameworks and libraries
RankProjectScore
#150tsne-cudaCUDA implementation of t-SNE with a scikit-learn-style Python API2k starsBSD-3-Clause65 out of 100
#151minariPython library for creating and loading offline reinforcement learning datasets1.7k starscustom license65 out of 100
#153vit-pytorchPyTorch implementations of Vision Transformer and many of its variants25.6k starsMIT64 out of 100
#154catboostGradient boosting library over decision trees with categorical feature support9.2k starsApache-2.064 out of 100
#155elixir-nx/nxTensors and numerical definitions for Elixir, with XLA and LibTorch backends2.9k starsno license64 out of 100