PreprintCited by 441Advanced Neural Network ApplicationsTopic ModelingDomain Adaptation and Few-Shot Learning

Q8BERT: Quantized 8Bit BERT

Open access
Zafrir, Ofir, Boudoukh, Guy, Izsak, Peter, Wasserblat, Moshe·2019·arXiv

Abstract

Recently, pre-trained Transformer based language models such as BERT and GPT, 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 and Megatron, 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.

The claims and statistics of this paper haven’t been checked yet.

Run the check — free, no account needed. It reads the open-access text and checks the sources it cites.

A few free checks a day · papers already verified open instantly · results are public

Integrity signals

Registry

DataCite · 10.48550/arxiv.1910.06188

Cites

Statistics

Claims the paper makes

The claims and statistics of this paper haven’t been checked yet.

Run the check — free, no account needed. It reads the open-access text and checks the sources it cites.

A few free checks a day · papers already verified open instantly · results are public

Claims other papers make about this one

Each is checked against this paper’s own text: does it say what the citing paper says it does?

  • There have been training-aware quantization approaches for transformer-based models in NLP.

    “There have been some training-aware quantization approaches for transformer-based models in NLP ( e.g. , BERT [17]) [33, 23, 34, 22].”

    From Post-Training Quantization for Vision Transformer (2021) · cites this paper as [33]

Self-check

Percentages, sums and reported differences re-computed from the paper’s own numbers.

The self-check needs the paper’s full text.

Cites

No references could be resolved yet.

Research works printed but not linked: 13

  1. [1][1] Y. Bengio, N. Léonard, and A. Courville. Estimating or propagating gradients through stochastic neurons for conditional computation. arXiv preprint arXiv:1308.3432 , 2013. [4 https://www.tensorflow.org/hub](https://www.tensorflow.org/hub) [5 https://habana.ai/habana-labs-goya-delivers-inferencing-on-bert/](https://habana.ai/habana-labs-goya-delivers-inferencing-on-bert/) [6 https://devblogs.nvidia.com/nlu-with-tensorrt-bert/](https://devblogs.nvidia.com/nlu-with-tensorrt-bert/) - · arXiv
  2. [2][2] A. Bhandare, V. Sripathi, D. Karkada, V. Menon, S. Choi, K. Datta, and V. Saletore. Efficient 8-bit quantization of transformer neural machine language translation model. arXiv preprint arXiv:1906.00532 , 2019. - · arXiv
  3. [3][3] J. Devlin, M.-W. Chang, K. Lee, and K. Toutanova. Bert: Pre-training of deep bidirectional transformers for language understanding. ArXiv , abs/1810.04805, 2018. - · arXiv
  4. [4][4] S. Han, H. Mao, and W. J. Dally. Deep compression: Compressing deep neural networks with pruning, trained quantization and huffman coding. arXiv preprint arXiv:1510.00149 , 2015. - · arXiv
  5. [5][5] B. Jacob, S. Kligys, B. Chen, M. Zhu, M. Tang, A. Howard, H. Adam, and D. Kalenichenko. Quantization and training of neural networks for efficient integer-arithmetic-only inference. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition , pages 2704-2713, 2018. -
  6. [6][6] M. Junczys-Dowmunt, K. Heafield, H. Hoang, R. Grundkiewicz, and A. Aue. Marian: Costeffective high-quality neural machine translation in c+. ACL 2018 , page 129, 2018. -
  7. [7][7] G. Lample and A. Conneau. Cross-lingual language model pretraining. arXiv preprint arXiv:1901.07291 , 2019. - · arXiv
  8. [10][10] P. Rajpurkar, J. Zhang, K. Lopyrev, and P. Liang. Squad: 100,000+ questions for machine comprehension of text. In Proceedings of the 2016 Conference on Empirical Methods in Natural Language Processing , pages 2383-2392, 2016. -
  9. [11][11] K. Simonyan and A. Zisserman. Very deep convolutional networks for large-scale image recognition. arXiv preprint arXiv:1409.1556 , 2014. - · arXiv
  10. [13][13] V. Vanhoucke, A. Senior, and M. Z. Mao. Improving the speed of neural networks on cpus. In Deep Learning and Unsupervised Feature Learning Workshop, NIPS 2011 , 2011. -
  11. [14][14] A. Vaswani, N. Shazeer, N. Parmar, J. Uszkoreit, L. Jones, A. N. Gomez, Ł. Kaiser, and I. Polosukhin. Attention is all you need. In Advances in neural information processing systems , pages 5998-6008, 2017. -
  12. [15][15] A. Wang, A. Singh, J. Michael, F. Hill, O. Levy, and S. Bowman. Glue: A multi-task benchmark and analysis platform for natural language understanding. In Proceedings of the 2018 EMNLP Workshop BlackboxNLP: Analyzing and Interpreting Neural Networks for NLP , pages 353-355, 2018. -
  13. [17][17] Z. Yang, Z. Dai, Y. Yang, J. Carbonell, R. Salakhutdinov, and Q. V. Le. Xlnet: Generalized autoregressive pretraining for language understanding. arXiv preprint arXiv:1906.08237 , 2019. · arXiv

Cited by

Sorted by citations

Authors
Zafrir, O., Boudoukh, G., Izsak, P., & Wasserblat, M.
Affiliations
  • Intel (Israel) (IL)
  • Intel (United States) (US)
Venue
arXiv
Publisher
arXiv
Published
2019
Pages
36-39
OpenAlex
W2979314664
Cited by
441
References
0
Citations by year
2026: 32 · 2025: 54 · 2024: 54 · 2023: 98 · 2022: 67 · 2021: 85 · 2020: 47 · 2019: 4
FWCI
16.56
Type
conference paper
Language
en
Open access
Locations
  • Workshop on Energy Efficient Machine Learning and Cognitive Computing for Embedded Applications (EMC2) (publishedVersion)
  • arXiv (Cornell University) (submittedVersion)
  • arXiv (Cornell University)
Topics
  • Physical Sciences › Computer Science › Computer Vision and Pattern Recognition › Advanced Neural Network Applications
  • Physical Sciences › Computer Science › Artificial Intelligence › Topic Modeling
  • Physical Sciences › Computer Science › Artificial Intelligence › Domain Adaptation and Few-Shot Learning
Keywords
BERT, 8-bit quantization, quantization-aware training, model compression, transformer language models, inference acceleration, fine-tuning

About these checks

Registry, retraction, Cites and statistics results are computed, not judged, with one exception: a printed reference that no index lists is read once by a model before it counts as a citation error. Claims are extracted by a model and kept only when their quote appears verbatim in the text; each cited source is then checked, with a model’s help, for whether it says what the claim relies on. Those verdicts can be wrong — read the claim’s quote and the cited source before relying on one.

Statistics and arithmetic are recomputed, not judged.

Confidence bands are shown only for fields calibrated on our annotated test set. None is calibrated yet, so no band is shown.

What counts as a claim ›How we measure confidence ›How we check this ›

Are you an author, or do you see a problem with this page? Request a review