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

Quadapter:GPT-2 Quantization适配器

Quadapter: Adapter for GPT-2 Quantization

Qualcomm AI Research(高通人工智能研究院)

Minseop Park, Jaeseong You, Markus Nagel, Simyung Chang

摘要:

Transformer语言模型(如GPT-2)很难建模,因为激活中的异常值会导致较大的量化误差。为了适应错误,必须使用量化感知训练,这需要基于与原始模型相同的数据集和训练管道进行微调。然而,预训练的语言模型通常不允许访问其数据集和训练管道,迫使我们依赖任意的模型进行微调。在这种情况下,可以观察到量化感知训练使模型过度拟合微调数据。对于没有过拟合的量化,我们引入了一个量化适配器(Quadapter),这是一个小的参数集,可以通过按通道缩放来使激活量化友好。保持模型参数不变。通过将我们的方法应用于量化GPT-2的挑战性任务,我们证明了它有效地防止了过拟合,提高了量化性能。

英文摘要:

Transformer language models such as GPT-2 are difficult to quantize because of outliers in activations leading to a large quantization error. To adapt to the error, one must use quantization-aware training, which entails a fine-tuning process based on the dataset and the training pipeline identical to those for the original model. Pretrained language models, however, often do not grant access to their datasets and training pipelines, forcing us to rely on arbitrary ones for fine-tuning. In that case, it is observed that quantization-aware training overfits the model to the fine-tuning data. For quantization without overfitting, we introduce a quantization adapter (Quadapter), a small set of parameters that are learned to make activations quantization-friendly by scaling them channel-wise. It keeps the model parameters unchanged. By applying our method to the challenging task of quantizing GPT-2, we demonstrate that it effectively prevents the overfitting and improves the quantization performance.

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

↑