Optimal Brain Compression: A Framework for Accurate Post-Training Quantization and Pruning

Elias Frantar, Sidak Pal Singh, Dan Alistarh
8/24/2022
cs.LG
quantization-pruning

Official code: IST-DASLab/OBC (136 stars, Python, last commit 2023-07-11).

Abstract

We consider the problem of model compression for deep neural networks (DNNs) in the challenging one-shot/post-training setting, in which we are given an accurate trained model, and must compress it without any retraining, based only on a small amount of calibration input data. This problem has become popular in view of the emerging software and hardware support for executing models compressed via pruning and/or quantization with speedup, and well-performing solutions have been proposed independently for both compression approaches.

Show full abstract

In this paper, we introduce a new compression framework which covers both weight pruning and quantization in a unified setting, is time- and space-efficient, and considerably improves upon the practical performance of existing post-training methods. At the technical level, our approach is based on an exact and efficient realization of the classical Optimal Brain Surgeon (OBS) framework of [LeCun, Denker, and Solla, 1990] extended to also cover weight quantization at the scale of modern DNNs. From the practical perspective, our experimental results show that it can improve significantly upon the compression-accuracy trade-offs of existing post-training methods, and that it can enable the accurate compound application of both pruning and quantization in a post-training setting.

View on arXivView PDF

Code Implementations(1)

IST-DASLab/OBCOfficial100%

Code for the NeurIPS 2022 paper "Optimal Brain Compression: A Framework for Accurate Post-Training Quantization and Pruning".

13617PythonOct 12, 20223 years ago

Similar Papers

Cite this paper

@article{frantar2022optimal,
  title  = {Optimal Brain Compression: A Framework for Accurate Post-Training Quantization and Pruning},
  author = {Elias Frantar and Sidak Pal Singh and Dan Alistarh},
  year   = {2022},
  eprint = {2208.11580},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2208.11580}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2208.11580.svg)](https://codeofpaper.com/paper/2208.11580)

Discussion