Towards Fine-tuning Pre-trained Language Models with Integer Forward and Backward Propagation
Mohammadreza Tayaranian, Alireza Ghaffari, Marzieh S. Tahaei, Mehdi, Rezagholizadeh, Masoud Asgharian, Vahid Partovi Nia

TL;DR
This paper introduces a novel integer arithmetic-based method for fine-tuning BERT, enabling efficient training with comparable performance to floating-point methods, and explores the impact of different integer bit-widths on model accuracy.
Contribution
The paper presents the first approach to perform both forward and backward propagation in BERT fine-tuning using integer arithmetic, including 8-bit and 16-bit, with detailed performance analysis.
Findings
16-bit integer BERT matches FP32 performance.
8-bit integer fine-tuning loses about 3.1 points on average.
Integer methods reduce memory and computation requirements.
Abstract
The large number of parameters of some prominent language models, such as BERT, makes their fine-tuning on downstream tasks computationally intensive and energy hungry. Previously researchers were focused on lower bit-width integer data types for the forward propagation of language models to save memory and computation. As for the backward propagation, however, only 16-bit floating-point data type has been used for the fine-tuning of BERT. In this work, we use integer arithmetic for both forward and back propagation in the fine-tuning of BERT. We study the effects of varying the integer bit-width on the model's metric performance. Our integer fine-tuning uses integer arithmetic to perform forward propagation and gradient computation of linear, layer-norm, and embedding layers of BERT. We fine-tune BERT using our integer training method on SQuAD v1.1 and SQuAD v2., and GLUE benchmark. We…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsTopic Modeling · Natural Language Processing Techniques · Speech Recognition and Synthesis
MethodsAttention Is All You Need · Linear Layer · Adam · Softmax · Dropout · Weight Decay · Layer Normalization · WordPiece · Dense Connections · Multi-Head Attention
