PreQuant: A Task-agnostic Quantization Approach for Pre-trained Language Models

Zhuocheng Gong, Jiahao Liu, Qifan Wang, Yang Yang, Jingang Wang +4 more
5/30/2023
cs.CLcs.LG
quantization-pruning

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

Abstract

While transformer-based pre-trained language models (PLMs) have dominated a number of NLP applications, these models are heavy to deploy and expensive to use. Therefore, effectively compressing large-scale PLMs becomes an increasingly important problem.

Show full abstract

Quantization, which represents high-precision tensors with low-bit fix-point format, is a viable solution. However, most existing quantization methods are task-specific, requiring customized training and quantization with a large number of trainable parameters on each individual task. Inspired by the observation that the over-parameterization nature of PLMs makes it possible to freeze most of the parameters during the fine-tuning stage, in this work, we propose a novel ``quantize before fine-tuning'' framework, PreQuant, that differs from both quantization-aware training and post-training quantization. PreQuant is compatible with various quantization strategies, with outlier-aware parameter-efficient fine-tuning incorporated to correct the induced quantization error. We demonstrate the effectiveness of PreQuant on the GLUE benchmark using BERT, RoBERTa, and T5. We also provide an empirical investigation into the workflow of PreQuant, which sheds light on its efficacy.

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{gong2023prequant,
  title  = {PreQuant: A Task-agnostic Quantization Approach for Pre-trained Language Models},
  author = {Zhuocheng Gong and Jiahao Liu and Qifan Wang and Yang Yang and Jingang Wang and Wei Wu and Yunsen Xian and Dongyan Zhao and Rui Yan},
  year   = {2023},
  eprint = {2306.00014},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2306.00014v1}
}

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

Discussion