Zero-Shot Sharpness-Aware Quantization for Pre-trained Language Models

Miaoxi Zhu, Qihuang Zhong, Li Shen, Liang Ding, Juhua Liu +2 more
10/20/2023
cs.CL

No confident code implementation found for this paper. 1 possible match can be shown below.

Abstract

Quantization is a promising approach for reducing memory overhead and accelerating inference, especially in large pre-trained language model (PLM) scenarios. While having no access to original training data due to security and privacy concerns has emerged the demand for zero-shot quantization. Most of the cutting-edge zero-shot quantization methods primarily 1) apply to computer vision tasks, and 2) neglect of overfitting problem in the generative adversarial learning process, leading to sub-optimal performance. Motivated by this, we propose a novel zero-shot sharpness-aware quantization (ZSAQ) framework for the zero-shot quantization of various PLMs. The key algorithm in solving ZSAQ is the SAM-SGA optimization, which aims to improve the quantization accuracy and model generalization via optimizing a minimax problem. We theoretically prove the convergence rate for the minimax optimization problem and this result can be applied to other nonconvex-PL minimax optimization frameworks. Extensive experiments on 11 tasks demonstrate that our method brings consistent and significant performance gains on both discriminative and generative PLMs, i.e., up to +6.98 average score. Furthermore, we empirically validate that our method can effectively improve the model generalization.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. 1 weaker match is hidden by default — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{zhu2023zeroshot,
  title  = {Zero-Shot Sharpness-Aware Quantization for Pre-trained Language Models},
  author = {Miaoxi Zhu and Qihuang Zhong and Li Shen and Liang Ding and Juhua Liu and Bo Du and Dacheng Tao},
  year   = {2023},
  eprint = {2310.13315},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2310.13315v1}
}

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

Discussion