Q8BERT: Quantized 8Bit BERT
Ofir ZafrirGuy BoudoukhPeter IzsakMoshe Wasserblat Affiliation: Intel AI Lab Affiliation: {ofir.zafrir, guy.boudoukh, peter.izsak,
Abstract
Recently, pre-trained Transformer [14] based language models such as BERT [3] and GPT [9], have shown great improvement in many Natural Language Processing (NLP) tasks. However, these models contain a large amount of parameters. The emergence of even larger and more accurate models such as GPT2 [8] and Megatron11 1 https://github.com/NVIDIA/Megatron-LM, suggest a trend of large pre-trained Transformer models. However, using these large models in production environments is a complex task requiring a large amount of compute, memory and power resources. In this work we show how to perform quantization-aware training during the fine-tuning phase of BERT in order to compress BERT by $4\times$ with minimal accuracy loss. Furthermore, the produced quantized model can accelerate inference speed if it is optimized for 8bit Integer supporting hardware.
原文 arXiv:1910.06188;中英对照 + 大白话阅读 https://aha.fim.ai/paper/1910.06188v2