NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

NNsight and NDIF: Democratizing Access to Open-Weight Foundation Model Internals

Jaden Fried Fiotto-Kaufman, Alexander Russell 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 E. Brodley, Arjun Guha, Jonathan Bell, Byron C Wallace, David Bau

Introduction

NNsight and the National Deep Inference Fabric (NDIF) are new open-source tools that allow researchers to perform complex, "surgical" interventions on massive AI models—such as Llama 3.1 405B—without needing a supercomputer. By decoupling experimental logic from model hosting through a novel "intervention graph" architecture, these tools make frontier-scale interpretability research accessible to anyone with a standard computer and an internet connection.

The Compute Gap in AI Research

There is a massive "compute gap" in AI research. While organizations frequently release "open-weight" models with hundreds of billions of parameters, studying their inner workings (e.g., analyzing specific activations or gradients) requires massive GPU clusters and complex engineering, such as sharding and quantization.

A survey of 184 interpretability papers reveals a troubling trend: most researchers are stuck studying tiny, outdated models because they lack the resources to run the latest giants. Furthermore, commercial APIs are typically "black boxes" that do not allow access to internal states. This paper introduces a framework to provide "structured access" to these internals, effectively offering Interpretability-as-a-Service.

The growing gap between available models and those studied in research.

Methods: Decoupling Logic from Runtime

The proposed framework consists of two main components that work in tandem:

  1. NNsight: An open-source PyTorch extension that utilizes deferred execution. Instead of running code immediately, NNsight "traces" the user's requested interventions (e.g., "at layer 16, set these specific neurons to 10") and packages them into a serializable Intervention Graph.
  2. NDIF (National Deep Inference Fabric): A scalable cloud service that hosts massive models. It receives the intervention graph from a user, interleaves those operations into the model's actual computation on high-end GPUs, and sends only the requested results back to the user.
Workflow from NNsight code to an intervention graph, executed on the NDIF backend.

This architecture enables Safe Co-Tenancy. Multiple researchers can run different experiments on the same pre-loaded model instance simultaneously without interfering with each other or permanently modifying the underlying model weights.

Key Insights

  • Logic vs. Runtime: The core innovation is recognizing that researchers do not need local access to model weights to design an experiment. By treating the experiment as a graph of operations, the logic can be shipped to where the data (the weights) lives.
  • Bypassing the Loading Tax: For large models, the time spent loading weights into GPU memory often dwarfs the actual computation time. NDIF keeps models "warm" (pre-loaded), making remote execution faster than local execution for any model larger than roughly 3 billion parameters.
  • Communication Efficiency: Unlike peer-to-peer approaches (like Petals) that require sending massive hidden states back and forth over the internet, NNsight only sends a small graph of instructions and receives back only the specific values the user explicitly requested to save.

Results and Benchmarks

To evaluate performance, the authors used the Indirect Object Identification (IOI) dataset, a standard benchmark for testing "activation patching" (a technique used to find which parts of a model handle specific linguistic tasks). They tested the system across the OPT suite (125M to 66B parameters), Gemma-7B, and the Llama-3.1 family (8B, 70B, and 405B).

  • Performance Gains: For a 66B parameter model, NDIF is significantly faster than traditional High-Performance Computing (HPC) setups because it eliminates the ~24-second weight-loading penalty.
  • Superior to Peer-to-Peer: In activation patching tasks, NDIF significantly outperformed Petals because it executes interventions server-side rather than requiring the user to process data locally mid-inference.
  • Scalability: The system handles concurrent users gracefully; median response times scale linearly as more researchers join the queue.

Limitations and Future Work

Currently, this system only works for open-weight models where the parameters are known; it cannot be used to study closed models unless providers adopt the NNsight standard. Additionally, users must trust the NDIF provider to execute the code faithfully and not log sensitive prompts, though the system is designed for scientific transparency. Finally, the current NDIF implementation uses sequential co-tenancy (queuing). Future work will focus on implementing parallel co-tenancy, allowing multiple users' interventions to be batched together in a single GPU forward pass to further increase efficiency.

Summary updated

BibTeX
@inproceedings{fiottokaufman2025nnsight,
  author = {Jaden Fried Fiotto-Kaufman and Alexander Russell Loftus and Eric Todd and Jannik Brinkmann and Koyena Pal and Dmitrii Troitskii and Michael Ripa and Adam Belfki and Can Rager and Caden Juang and Aaron Mueller and Samuel Marks and Arnab Sen Sharma and Francesca Lucchetti and Nikhil Prakash and Carla E. Brodley and Arjun Guha and Jonathan Bell and Byron C Wallace and David Bau},
  title = {{NNsight and NDIF: Democratizing Access to Open-Weight Foundation Model Internals}},
  booktitle = {International Conference on Learning Representations},
  year = {2025},
  url = {https://openreview.net/forum?id=MxbEiFRf39},
}
Figure