paper-with-me

홈 › Papers

I-BERT: Integer-only BERT Quantization

2021-01-05 · Sehoon Kim, Amir Gholami, Zhewei Yao, Michael W. Mahoney, Kurt Keutzer

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 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.

📄 PDF Abstract BibTeX arXiv:2101.01321

Code (7)

huggingface/transformers/tree/master/src/transformers/models/ibert 공식 구현 pytorch
kssteven418/I-BERT 공식 구현 pytorch
2023-MindSpore-1/ms-code-222/tree/main/bert mindspore
2024-MindSpore-1/Code2/tree/main/model-1/bert mindspore
MindSpore-scientific-2/code-14/tree/main/ibert mindspore
pwc-1/Paper-9/tree/main/ibert mindspore
ucb-bar/gemmini

Tasks

GPUNatural Language InferenceNatural Language UnderstandingQuantization

Methods 이 논문이 사용한 방법론

Linear Layer A Linear Layer is a projection $\mathbf{XW + b}$.
Absolute Position Encodings Absolute Position Encodings are a type of position embeddings for [Transformer-based models] where positional encodings are…
Position-Wise Feed-Forward Layer 설명 없음
I-BERT I-BERT is a quantized version of BERT that quantizes the entire inference with integer-only arithmetic. Based on lightweight integer…
Weight Decay 설명 없음
Linear Warmup With Linear Decay Linear Warmup With Linear Decay is a learning rate schedule in which we increase the learning rate linearly for $n$ updates and then linearly decay afterwards.
BPE Byte Pair Encoding, or BPE, is a subword segmentation algorithm that encodes rare and unknown words as sequences of subword units. The intuition is that various word…
Dropout Dropout is a regularization technique for neural networks that drops a unit (along with connections) at training time with a specified probability $p$ (a common value is…

Similar Papers 제목 키워드 기반

Empirical Evaluation of Post-Training Quantization Methods for Language Tasks

2022-10-29 · Ting Hu, Christoph Meinel, Haojin Yang

Transformer-based architectures like BERT have achieved great success in a wide range of Natural Language tasks. Despite their decent performance, the models still have numerous parameters and high computational complexi…

AttributeQuantizationReading Comprehension

Integer Quantization for Deep Learning Inference: Principles and Empirical Evaluation

2020-04-20 · Hao Wu, Patrick Judd, Xiaojie Zhang, Mikhail Isaev 외

Quantization techniques can reduce the size of Deep Neural Networks and improve inference latency and throughput by taking advantage of high throughput integer instructions. In this paper we review the mathematical aspec…

Deep LearningMathQuantization

Towards Fine-tuning Pre-trained Language Models with Integer Forward and Backward Propagation

2022-09-20 · Mohammadreza Tayaranian, Alireza Ghaffari, Marzieh S. Tahaei, Mehdi Rezagholizadeh 외

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-wi…

Q8BERT: Quantized 8Bit BERT

2019-10-14 · Ofir Zafrir, Guy Boudoukh, Peter Izsak, Moshe Wasserblat

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 …

Linguistic AcceptabilityNatural Language InferenceQuantizationSemantic Textual Similarity+1

VS-Quant: Per-vector Scaled Quantization for Accurate Low-Precision Neural Network Inference

2021-02-08 · Steve Dai, Rangharajan Venkatesan, Haoxing Ren, Brian Zimmer 외

Quantization enables efficient acceleration of deep neural networks by reducing model memory footprint and exploiting low-cost integer math hardware units. Quantization maps floating-point weights and activations in a tr…

MathQuantization