QuaLA-MiniLM: a Quantized Length Adaptive MiniLM

Shira Guskin, Moshe Wasserblat, Chang Wang, Haihao Shen
10/31/2022
3 citations
cs.CL
transformer-attentiondistillation

Official code: intel/intel-extension-for-transformers (2,173 stars, Python, Apache-2.0, last commit 2024-10-08).

Abstract

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-distilling BERT into a smaller transformer representation having fewer layers and smaller internal embedding.

Show full abstract

However, the performance of these models drops as we reduce the number of layers, notably in advanced NLP tasks such as span question answering. In addition, a separate model must be trained for each inference scenario with its distinct computational budget. Dynamic-TinyBERT tackles both limitations by partially implementing the Length Adaptive Transformer (LAT) technique onto TinyBERT, achieving x3 speedup over BERT-base with minimal accuracy loss. In this work, we expand the Dynamic-TinyBERT approach to generate a much more highly efficient model. We use MiniLM distillation jointly with the LAT method, and we further enhance the efficiency by applying low-bit quantization. Our quantized length-adaptive MiniLM model (QuaLA-MiniLM) is trained only once, dynamically fits any inference scenario, and achieves an accuracy-efficiency trade-off superior to any other efficient approaches per any computational budget on the SQuAD1.1 dataset (up to x8.8 speedup with <1% accuracy loss). The code to reproduce this work is publicly available on Github.

View on arXivView PDF

Code Implementations(1)

Apache-2.0

⚡ Build your chatbot within minutes on your favorite device; offer SOTA compression techniques for LLMs; run LLMs efficiently on Intel Platforms⚡

2,173213Python, C++Nov 11, 20222 years agoApache-2.0
4-bitsautoroundchatbotchatpdfgaudi3+11 more

Similar Papers

Cite this paper

@article{guskin2022qualaminilm,
  title  = {QuaLA-MiniLM: a Quantized Length Adaptive MiniLM},
  author = {Shira Guskin and Moshe Wasserblat and Chang Wang and Haihao Shen},
  year   = {2022},
  eprint = {2210.17114},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2210.17114}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2210.17114.svg)](https://codeofpaper.com/paper/2210.17114)

Discussion