Exploring Extreme Parameter Compression for Pre-trained Language Models

Yuxin Ren, Benyou Wang, Lifeng Shang, Xin Jiang, Qun Liu
5/20/2022
cs.CLcs.LG
transformer-attention

Official code: twinkle0331/Xcompression (22 stars, Python, last commit 2023-05-24).

Abstract

Recent work explored the potential of large-scale Transformer-based pre-trained models, especially Pre-trained Language Models (PLMs) in natural language processing. This raises many concerns from various perspectives, e.g., financial costs and carbon emissions.

Show full abstract

Compressing PLMs like BERT with negligible performance loss for faster inference and cheaper deployment has attracted much attention. In this work, we aim to explore larger compression ratios for PLMs, among which tensor decomposition is a potential but under-investigated one. Two decomposition and reconstruction protocols are further proposed to improve the effectiveness and efficiency during compression. Our compressed BERT with ${1}/{7}$ parameters in Transformer layers performs on-par with, sometimes slightly better than the original BERT in GLUE benchmark. A tiny version achieves $96.7\%$ performance of BERT-base with $ {1}/{48} $ encoder parameters (i.e., less than 2M parameters excluding the embedding layer) and $2.7 \times$ faster on inference. To show that the proposed method is orthogonal to existing compression methods like knowledge distillation, we also explore the benefit of the proposed method on a distilled BERT.

View on arXivView PDF

Code Implementations(1)

[ICLR 2022] Code for paper "Exploring Extreme Parameter Compression for Pre-trained Language Models"(https://arxiv.org/abs/2205.10036)

220PythonFeb 10, 20223 years ago
bertlow-rank-approximationmodel-compressiontensor-decomposition

Similar Papers

Cite this paper

@article{ren2022exploring,
  title  = {Exploring Extreme Parameter Compression for Pre-trained Language Models},
  author = {Yuxin Ren and Benyou Wang and Lifeng Shang and Xin Jiang and Qun Liu},
  year   = {2022},
  eprint = {2205.10036},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2205.10036}
}

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/2205.10036.svg)](https://codeofpaper.com/paper/2205.10036)

Discussion