https://github.com/borealisai/neuzip
Official repository for the paper "NeuZip: Memory-Efficient Training and Inference with Dynamic Compression of Neural Networks". This repository contains the code for the experiments in the paper.
https://github.com/borealisai/neuzip
Last synced: about 1 year ago
JSON representation
Official repository for the paper "NeuZip: Memory-Efficient Training and Inference with Dynamic Compression of Neural Networks". This repository contains the code for the experiments in the paper.
- Host: GitHub
- URL: https://github.com/borealisai/neuzip
- Owner: BorealisAI
- License: other
- Created: 2024-10-24T19:28:26.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-10-31T18:29:06.000Z (almost 2 years ago)
- Last Synced: 2025-07-25T02:08:48.557Z (about 1 year ago)
- Language: Cuda
- Homepage: https://arxiv.org/abs/2410.20650
- Size: 489 KB
- Stars: 59
- Watchers: 3
- Forks: 2
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# NeuZip: Memory-Efficient Training and Inference with Dynamic Compression of Neural Networks
This is the official repository for the paper [*NeuZip: Memory-Efficient Training and Inference with Dynamic Compression of Neural Networks*](https://arxiv.org/abs/2410.20650). This repository contains the code for the experiments in the paper.
# Installation
## From PyPI
We provide a simple way to install the package from PyPI. You can install the package by running the following command:
```bash
pip install neuzip
```
Note that we only upload the source distribution to PyPI. You need to have NVCC correctly installed on your system to compile the package.
## From source
You can also install the package from source, which is useful if you want to modify the code.
```bash
git clone https://github.com/BorealisAI/neuzip
cd neuzip
pip install -e .
```
# Basic usage
Using `neuzip` for your PyTorch model is pretty easy. Here is a simple example:
```diff
model: torch.nn.Module = # your model
+ manager = neuzip.Manager()
+ model = manager.convert(model)
```
The compressed model can be used in the same way as the original model while consuming less memory.
# Replicating experiments
You can replicate all the experiments in the paper by using the files in the [examples/](examples/) directory. Each file corresponds to one or more experiments in the paper.