NeuroSurgeon

A toolkit for subnetwork analysis


License
MIT
Install
pip install NeuroSurgeon==0.1.0

Documentation

NeuroSurgeon

NeuroSurgeon is a python toolkit built to enable deep learning researchers to easily uncover and manipulate subnetworks within trained models. NeuroSurgeon provides a simple API to inject differentiable binary masks techniques into linear, attention, and convolution layers in BERT, GPT, ResNet, and ViT-style models within Huggingface Transformers. Differentiable masking has a variety of use cases for deep learning research, such as:

Documentation

Read the NeuroSurgeon Documentation

Install

NeuroSurgeon requires python 3.9 or higher and several libraries, including Transformers and PyTorch. Installation can be done using PyPi:

pip install NeuroSurgeon