NeuZip: Memory-Efficient Training and Inference with Dynamic Compression of Neural Networks

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Hao, Yongchang, Cao, Yanshuai, Mou, Lili
Format: Preprint
Published: 2024
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866929562695237632
author Hao, Yongchang
Cao, Yanshuai
Mou, Lili
author_facet Hao, Yongchang
Cao, Yanshuai
Mou, Lili
contents The performance of neural networks improves when more parameters are used. However, the model sizes are constrained by the available on-device memory during training and inference. Although applying techniques like quantization can alleviate the constraint, they suffer from performance degradation. In this work, we introduce NeuZip, a new weight compression scheme based on the entropy of floating-point numbers in neural networks. With NeuZip, we are able to achieve memory-efficient training and inference without sacrificing performance. Notably, we significantly reduce the memory footprint of training a Llama-3 8B model from 31GB to less than 16GB, while keeping the training dynamics fully unchanged. In inference, our method can reduce memory usage by more than half while maintaining near-lossless performance. Our code is publicly available.
format Preprint
id arxiv_https___arxiv_org_abs_2410_20650
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle NeuZip: Memory-Efficient Training and Inference with Dynamic Compression of Neural Networks
Hao, Yongchang
Cao, Yanshuai
Mou, Lili
Machine Learning
Artificial Intelligence
The performance of neural networks improves when more parameters are used. However, the model sizes are constrained by the available on-device memory during training and inference. Although applying techniques like quantization can alleviate the constraint, they suffer from performance degradation. In this work, we introduce NeuZip, a new weight compression scheme based on the entropy of floating-point numbers in neural networks. With NeuZip, we are able to achieve memory-efficient training and inference without sacrificing performance. Notably, we significantly reduce the memory footprint of training a Llama-3 8B model from 31GB to less than 16GB, while keeping the training dynamics fully unchanged. In inference, our method can reduce memory usage by more than half while maintaining near-lossless performance. Our code is publicly available.
title NeuZip: Memory-Efficient Training and Inference with Dynamic Compression of Neural Networks
topic Machine Learning
Artificial Intelligence
url https://arxiv.org/abs/2410.20650