Training Deep Neural Networks with Joint Quantization and Pruning of Weights and Activations

Xinyu Zhang, Ian Colbert, Ken Kreutz-Delgado, Srinjoy Das
10/15/2021
12 citations
cs.LGcs.CV

Official code: mlzxy/qsparse (42 stars, Python, MIT, PyTorch, last commit 2022-09-19). 1 more implementation below.

Abstract

Quantization and pruning are core techniques used to reduce the inference costs of deep neural networks. State-of-the-art quantization techniques are currently applied to both the weights and activations; however, pruning is most often applied to only the weights of the network.

Show full abstract

In this work, we jointly apply novel uniform quantization and unstructured pruning methods to both the weights and activations of deep neural networks during training. Using our methods, we empirically evaluate the currently accepted prune-then-quantize paradigm across a wide range of computer vision tasks and observe a non-commutative nature when applied to both the weights and activations of deep neural networks. Informed by these observations, we articulate the non-commutativity hypothesis: for a given deep neural network being trained for a specific task, there exists an exact training schedule in which quantization and pruning can be introduced to optimize network performance. We identify that this optimal ordering not only exists, but also varies across discriminative and generative tasks. Using the optimal training schedule within our training framework, we demonstrate increased performance per memory footprint over existing solutions.

View on arXivView PDF

Code Implementations(2)

Code implementations of this paper
RepositoryTypeStarsLanguageLicenseLast commit
mlzxy/qsparseOfficial42PythonMIT2022-09-19
mlzxy/qsparse-examplesOfficial2Python–2022-06-30
mlzxy/qsparseOfficial100%
PyTorchMIT

Train neural networks with joint quantization and pruning on both weights and activations using any pytorch modules

422Python, MakefileJun 19, 20214 years agoMIT
model-compressionneural-networkpruningpytorchquantization-aware-training

Examples for QSPARSE: https://github.com/mlzxy/qsparse

20Python, CudaOct 30, 20214 years ago

Similar Papers

Cite this paper

@article{zhang2021training,
  title  = {Training Deep Neural Networks with Joint Quantization and Pruning of Weights and Activations},
  author = {Xinyu Zhang and Ian Colbert and Ken Kreutz-Delgado and Srinjoy Das},
  year   = {2021},
  eprint = {2110.08271},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2110.08271}
}

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/2110.08271.svg)](https://codeofpaper.com/paper/2110.08271)

Discussion