before_revision: Transformer based models, like BERT and RoBERTa, have achieved state-of-the-art results in many Natural Language Processing tasks. However, their memory footprint, inference latency, and power consumption are prohibitive for many edgeprocessors, and it has been a challenge to deploy these models for edge applications and devices that have resource constraints . While quantization can be a viable solution to this, previous work on quantizing Transformer based models uses floating-point arithmetic during inference, thus limiting model deployment on many edge processors. In this work, we propose a novel integer-only quantization scheme for Transformer based models that quantizes the entire inference process. In particular, we demonstrate how to approximate nonlinear operationsin Transformer architectures , e.g., GELU, Softmax, and Layer Normalization, with lightweight integer computations. We use those approximations in our method, I-BERT , with an end-to-end integer-only inference, and without any floating point calculation. We test our approach on GLUE downstream tasks using RoBERTa-Base and RoBERTa-Large. For both cases, with an 8-bit integer-only quantization scheme, I-BERT achieves similar  accuracy as compared to the full-precision baseline  .
after_revision: Transformer based models, like BERT and RoBERTa, have achieved state-of-the-art results in many Natural Language Processing tasks. However, their memory footprint, inference latency, and power consumption are prohibitive for efficient inference at the edge, and even at the data center . While quantization can be a viable solution for this, previous work on quantizing Transformer based models use floating-point arithmetic during inference, which cannot efficiently utilize integer-only logical units such as the recent Turing Tensor Cores, or traditional integer-only ARM processors. In this work, we propose I-BERT, a novel quantization scheme for Transformer based models that quantizes the entire inference with integer-only arithmetic. Based on lightweight integer-only approximation methods for nonlinear operations , e.g., GELU, Softmax, and Layer Normalization, I-BERT performs an end-to-end integer-only BERT inference without any floating point calculation. We evaluate our approach on GLUE downstream tasks using RoBERTa-Base /Large. We show that for both cases, I-BERT achieves similar (and slightly higher) accuracy as compared to the full-precision baseline . Furthermore, our preliminary implementation of I-BERT shows a speedup of 2.4 - 4.0x for INT8 inference on a T4 GPU system as compared to FP32 inference. The framework has been developed in PyTorch and has been open-sourced .
edit_actions: R
edit_actions: many edgeprocessors, and it has been a challenge to deploy these models for edge applications and devices that have resource constraints
edit_actions: efficient inference at the edge, and even at the data center
edit_actions: clarity
edit_actions: clarity clarity clarity
edit_actions: R
edit_actions: to
edit_actions: for
edit_actions: fluency
edit_actions: fluency fluency fluency
edit_actions: R
edit_actions: uses
edit_actions: use
edit_actions: fluency
edit_actions: fluency fluency fluency
edit_actions: R
edit_actions: thus limiting model deployment on many edge
edit_actions: which cannot efficiently utilize integer-only logical units such as the recent Turing Tensor Cores, or traditional integer-only ARM
edit_actions: meaning-changed
edit_actions: meaning-changed meaning-changed meaning-changed
edit_actions: R
edit_actions: a novel integer-only
edit_actions: I-BERT, a novel
edit_actions: clarity
edit_actions: clarity clarity meaning-changed
edit_actions: R
edit_actions: process. In particular, we demonstrate how to approximate nonlinear operationsin Transformer architectures
edit_actions: with integer-only arithmetic. Based on lightweight integer-only approximation methods for nonlinear operations
edit_actions: meaning-changed
edit_actions: coherence meaning-changed meaning-changed
edit_actions: D
edit_actions: with lightweight integer computations. We use those approximations in our method,
edit_actions: clarity
edit_actions: clarity coherence clarity
edit_actions: R
edit_actions: , with
edit_actions: performs
edit_actions: clarity
edit_actions: clarity clarity clarity
edit_actions: R
edit_actions: inference, and
edit_actions: BERT inference
edit_actions: clarity
edit_actions: clarity clarity meaning-changed
edit_actions: R
edit_actions: test
edit_actions: evaluate
edit_actions: clarity
edit_actions: style clarity clarity
edit_actions: R
edit_actions: and RoBERTa-Large. For
edit_actions: /Large. We show that for
edit_actions: clarity
edit_actions: clarity style clarity
edit_actions: D
edit_actions: with an 8-bit integer-only quantization scheme,
edit_actions: clarity
edit_actions: clarity clarity coherence
edit_actions: A
edit_actions: (and slightly higher)
edit_actions: meaning-changed
edit_actions: meaning-changed clarity meaning-changed
edit_actions: A
edit_actions: . Furthermore, our preliminary implementation of I-BERT shows a speedup of 2.4 - 4.0x for INT8 inference on a T4 GPU system as compared to FP32 inference. The framework has been developed in PyTorch and has been open-sourced
edit_actions: meaning-changed
edit_actions: meaning-changed meaning-changed meaning-changed