NNsight 0.8
We spent the summer rebuilding NNsight from the inside, and it's finally ready. v0.8 is the
biggest release the library has had: the execution engine is rewritten from scratch, and a lot
of what was hard or impossible in v0.7 falls out of that. The way you use NNsight hasn't changed
at all. You still open a with model.trace(...) block and read, edit, and .save() a model's
internals as ordinary Python.
The parts we're most excited about:
-
One class for everything in
transformers.TransformersModelis backed by atransformers.pipeline, so any task the pipeline factory can build is now traceable with the same code you write for GPT-2. Whisper and the audio models, LLaVA and Qwen3-VL, BERT and the encoder tasks, classifiers, and PEFT adapters applied at load. Interpretability on speech and vision models stops being a porting exercise. -
Speed was a big focus. Your code and the forward pass now interleave as greenlets rather than OS threads. NNsight's own overhead is cheaper and, more to the point, stays flat as you touch more of the model: per read it is 3x flatter than v0.7, per batched prompt 6x. Caching every layer, sweeping every head, and running big batches stop being the slow path.
-
NNsight
vLLM is now the fastest and most complete way to do interpretability at scale. Interventions run inside the engine worker and survive CUDA graph replay, so you keep 91% to 96% of vanilla vLLM's throughput while tracing it. You can install a block on the engine itself and serve it over HTTP to clients that have no GPU of their own.
-
And plenty more, like tensor parallelism for models too big for one card, quantization by naming it where you would name a dtype, and
.source, which opens up the operations inside a forward pass that never had a module to attach to.
This is a pre-release. You can install it and use it locally today. The full release lands next month, when v0.8 goes live on NDIF and remote execution comes with it.