NNsight and NDIF: Democratizing Access to Open-Weight Foundation Model Internals
Jaden Fiotto-Kaufman, Alexander R. Loftus, Eric Todd, Jannik Brinkmann, Koyena Pal, Dmitrii Troitskii, Michael Ripa, Adam Belfki, Can Rager, Caden Juang, Aaron Mueller, Samuel Marks, Arnab Sen Sharma, Francesca Lucchetti, Nikhil Prakash, Carla Brodley, Arjun Guha, Jonathan Bell, Byron C. Wallace, David Bau
TL;DR
The paper addresses barriers to studying the internals of very large open-weight transformers by introducing an intervention-graph framework that decouples experimental design from model runtime. NNsight provides deferred, trace-enabled PyTorch integration, while NDIF offers a scalable, multi-user inference service to execute interventions on preloaded, sharded models. Through a survey of interpretability literature and a suite of performance benchmarks, the authors demonstrate that this architecture enables robust, reproducible large-scale experiments with reduced startup and data-transfer costs compared to HPC or peer-to-peer approaches. The work outlines practical benefits for transparency-focused AI research and discusses limitations around closed-model access and potential misuse, while inviting broader adoption by the research and industrial communities.
Abstract
We introduce NNsight and NDIF, technologies that work in tandem to enable scientific study of the representations and computations learned by very large neural networks. NNsight is an open-source system that extends PyTorch to introduce deferred remote execution. The National Deep Inference Fabric (NDIF) is a scalable inference service that executes NNsight requests, allowing users to share GPU resources and pretrained models. These technologies are enabled by the Intervention Graph, an architecture developed to decouple experimental design from model runtime. Together, this framework provides transparent and efficient access to the internals of deep neural networks such as very large language models (LLMs) without imposing the cost or complexity of hosting customized models individually. We conduct a quantitative survey of the machine learning literature that reveals a growing gap in the study of the internals of large-scale AI. We demonstrate the design and use of our framework to address this gap by enabling a range of research methods on huge models. Finally, we conduct benchmarks to compare performance with previous approaches. Code, documentation, and tutorials are available at https://nnsight.net/.
