Saved in:
Bibliographic Details
Main Authors: Harma, Simla Burcu, Chakraborty, Ayan, Kostenok, Elizaveta, Mishin, Danila, Ha, Dongho, Falsafi, Babak, Jaggi, Martin, Liu, Ming, Oh, Yunho, Subramanian, Suvinay, Yazdanbakhsh, Amir
Format: Preprint
Published: 2024
Subjects:
Online Access:https://arxiv.org/abs/2405.20935
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866909467860271104
author Harma, Simla Burcu
Chakraborty, Ayan
Kostenok, Elizaveta
Mishin, Danila
Ha, Dongho
Falsafi, Babak
Jaggi, Martin
Liu, Ming
Oh, Yunho
Subramanian, Suvinay
Yazdanbakhsh, Amir
author_facet Harma, Simla Burcu
Chakraborty, Ayan
Kostenok, Elizaveta
Mishin, Danila
Ha, Dongho
Falsafi, Babak
Jaggi, Martin
Liu, Ming
Oh, Yunho
Subramanian, Suvinay
Yazdanbakhsh, Amir
contents The increasing size of deep neural networks (DNNs) necessitates effective model compression to reduce their computational and memory footprints. Sparsity and quantization are two prominent compression methods that have been shown to reduce DNNs' computational and memory footprints significantly while preserving model accuracy. However, how these two methods interact when combined together remains a key question for developers, as many tacitly assume that they are orthogonal, meaning that their combined use does not introduce additional errors beyond those introduced by each method independently. In this paper, we provide the first mathematical proof that sparsity and quantization are non-orthogonal. We corroborate these results with experiments spanning a range of large language models, including the OPT and LLaMA model families (with 125M to 8B parameters), and vision models like ViT and ResNet. We show that the order in which we apply these methods matters because applying quantization before sparsity may disrupt the relative importance of tensor elements, which may inadvertently remove significant elements from a tensor. More importantly, we show that even if applied in the correct order, the compounded errors from sparsity and quantization can significantly harm accuracy. Our findings extend to the efficient deployment of large models in resource-constrained compute platforms to reduce serving cost, offering insights into best practices for applying these compression methods to maximize hardware resource efficiency without compromising accuracy.
format Preprint
id arxiv_https___arxiv_org_abs_2405_20935
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle Effective Interplay between Sparsity and Quantization: From Theory to Practice
Harma, Simla Burcu
Chakraborty, Ayan
Kostenok, Elizaveta
Mishin, Danila
Ha, Dongho
Falsafi, Babak
Jaggi, Martin
Liu, Ming
Oh, Yunho
Subramanian, Suvinay
Yazdanbakhsh, Amir
Machine Learning
Artificial Intelligence
The increasing size of deep neural networks (DNNs) necessitates effective model compression to reduce their computational and memory footprints. Sparsity and quantization are two prominent compression methods that have been shown to reduce DNNs' computational and memory footprints significantly while preserving model accuracy. However, how these two methods interact when combined together remains a key question for developers, as many tacitly assume that they are orthogonal, meaning that their combined use does not introduce additional errors beyond those introduced by each method independently. In this paper, we provide the first mathematical proof that sparsity and quantization are non-orthogonal. We corroborate these results with experiments spanning a range of large language models, including the OPT and LLaMA model families (with 125M to 8B parameters), and vision models like ViT and ResNet. We show that the order in which we apply these methods matters because applying quantization before sparsity may disrupt the relative importance of tensor elements, which may inadvertently remove significant elements from a tensor. More importantly, we show that even if applied in the correct order, the compounded errors from sparsity and quantization can significantly harm accuracy. Our findings extend to the efficient deployment of large models in resource-constrained compute platforms to reduce serving cost, offering insights into best practices for applying these compression methods to maximize hardware resource efficiency without compromising accuracy.
title Effective Interplay between Sparsity and Quantization: From Theory to Practice
topic Machine Learning
Artificial Intelligence
url https://arxiv.org/abs/2405.20935