paper-with-me

홈 › Papers

KDLSQ-BERT: A Quantized Bert Combining Knowledge Distillation with Learned Step Size Quantization

2021-01-15 · Jing Jin, Cai Liang, Tiancheng Wu, Liqin Zou, Zhiliang Gan

Recently, transformer-based language models such as BERT have shown tremendous performance improvement for a range of natural language processing tasks. However, these language models usually are computation expensive and memory intensive during inference. As a result, it is difficult to deploy them on resource-restricted devices. To improve the inference performance, as well as reduce the model size while maintaining the model accuracy, we propose a novel quantization method named KDLSQ-BERT that combines knowledge distillation (KD) with learned step size quantization (LSQ) for language model quantization. The main idea of our method is that the KD technique is leveraged to transfer the knowledge from a "teacher" model to a "student" model when exploiting LSQ to quantize that "student" model during the quantization training process. Extensive experiment results on GLUE benchmark and SQuAD demonstrate that our proposed KDLSQ-BERT not only performs effectively when doing different bit (e.g. 2-bit $\sim$ 8-bit) quantization, but also outperforms the existing BERT quantization methods, and even achieves comparable performance as the full-precision base-line model while obtaining 14.9x compression ratio. Our code will be public available.

📄 PDF Abstract BibTeX arXiv:2101.05938

Code (0)

등록된 구현이 없습니다.

Tasks

Knowledge DistillationLanguage ModellingQuantization

Methods 이 논문이 사용한 방법론

Linear Layer A Linear Layer is a projection $\mathbf{XW + b}$.
Knowledge Distillation A very simple way to improve the performance of almost any machine learning algorithm is to train many different models on the same data and then to average their predictions.…
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…
Softmax The Softmax output function transforms a previous layer's output into a vector of probabilities. It is commonly used for multiclass classification. Given an input vector $x$…
Refunds@Expedia|||How do I get a full refund from Expedia? “How do I get a full refund from Expedia? How do I get a full refund from Expedia? – Call ☎️ +1-(888) 829 (0881) or +1-805-330-4056 or +1-805-330-4056 for Quick Help &…
Layer Normalization Unlike batch normalization, Layer Normalization directly estimates the normalization statistics from the summed inputs…
Attention Dropout Attention Dropout is a type of dropout used in attention-based architectures, where elements are randomly dropped out of the…
Dense Connections Dense Connections, or Fully Connected Connections, are a type of layer in a deep neural network that use a linear operation where every input is connected to every output…

Similar Papers 제목 키워드 기반

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

QuaLA-MiniLM: a Quantized Length Adaptive MiniLM

2022-10-31 · Shira Guskin, Moshe Wasserblat, Chang Wang, Haihao Shen

Limited computational budgets often prevent transformers from being used in production and from having their high accuracy utilized. A knowledge distillation approach addresses the computational efficiency by self-distil…

Computational EfficiencyKnowledge DistillationQuantizationQuestion Answering

Prune Once for All: Sparse Pre-Trained Language Models

2021-11-10 · Ofir Zafrir, Ariel Larey, Guy Boudoukh, Haihao Shen 외

Transformer-based language models are applied to a wide range of applications in natural language processing. However, they are inefficient and difficult to deploy. In recent years, many compression algorithms have been …

AllNatural Language InferenceQuantizationQuestion Answering+2

Can BERT Dig It? -- Named Entity Recognition for Information Retrieval in the Archaeology Domain

2021-06-14 · Alex Brandsen, Suzan Verberne, Karsten Lambers, Milco Wansleeben

The amount of archaeological literature is growing rapidly. Until recently, these data were only accessible through metadata search. We implemented a text retrieval engine for a large archaeological text collection ($\si…

Information Retrievalnamed-entity-recognitionNamed Entity RecognitionNamed Entity Recognition (NER)+3

BIG MOOD: Relating Transformers to Explicit Commonsense Knowledge

2019-10-17 · Jeff Da

We introduce a simple yet effective method of integrating contextual embeddings with commonsense graph embeddings, dubbed BERT Infused Graphs: Matching Over Other embeDdings. First, we introduce a preprocessing method to…

Language ModelingLanguage Modelling