arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2306.00014cs.CLcs.LG
收藏

PreQuant:一种面向预训练语言模型的任务无关量化方法

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

Wangxuan Institute of Computer Technology, Peking University(北京大学王选计算机研究所);Meituan(美团);Meta AI;National Key Laboratory of General Artificial Intelligence(通用人工智能全国重点实验室);Beijing Institute for General Artificial Intelligence(北京通用人工智能研究院);Gaoling School of Artificial Intelligence, Renmin University of China(中国人民大学高瓴人工智能学院)

Zhuocheng Gong, Jiahao Liu, Qifan Wang, Yang Yang, Jingang Wang, Wei Wu, Yunsen Xian, Dongyan Zhao, Rui Yan

AI总结:

本文提出任务无关的“先量化后微调”框架 PreQuant,通过兼容多种量化策略并引入异常值感知参数高效微调校正误差,在 GLUE 上验证了其压缩效果。

摘要:

尽管基于 transformer 的预训练语言模型(PLM)已经在许多 NLP 应用中占据主导地位,但这些模型部署沉重且使用成本高昂。因此,有效压缩大规模 PLM 成为一个日益重要的问题。量化用低比特定点格式表示高精度张量,是一种可行的解决方案。然而,大多数现有量化方法都是任务特定的,需要在每个单独任务上进行定制训练和量化,并使用大量可训练参数。受以下观察启发:PLM 的过度参数化本质使得在微调阶段冻结大多数参数成为可能,在本工作中,我们提出了一种新颖的“先量化后微调”框架 PreQuant,它不同于量化感知训练和训练后量化。PreQuant 兼容多种量化策略,并结合了异常值感知的参数高效微调,以校正所引入的量化误差。我们使用 BERT、RoBERTa 和 T5 在 GLUE 基准上证明了 PreQuant 的有效性。我们还对 PreQuant 的工作流程进行了实证研究,揭示了其有效性的来源。

英文摘要:

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. 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.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑