ハードウェア親和性の高いブロック構造化剪定を用いた効率的なトランスフォーマーベースの大規模言語表現
Efficient Transformer-based Large Scale Language Representations using Hardware-friendly Block Structured Pruning
Efficient Transformer-based Large Scale Language Representations using Hardware-friendly Block Structured Pruning
@misc{li2020efficient,
title = {Efficient Transformer-based Large Scale Language Representations using Hardware-friendly Block Structured Pruning},
author = {Bingbing Li and Zhenglun Kong and Tianyun Zhang and Ji Li and Zhengang Li and Hang Liu and Caiwen Ding},
year = {2020},
eprint = {2009.08065},
archivePrefix = {arXiv},
primaryClass = {cs.CL},
url = {https://arxiv.org/abs/2009.08065}
}
Li, B., Kong, Z., Zhang, T., Li, J., Li, Z., Liu, H., & Ding, C. (2020). Efficient Transformer-based Large Scale Language Representations using Hardware-friendly Block Structured Pruning [Preprint]. arXiv. https://doi.org/10.48550/arXiv.2009.08065
LI B, KONG Z, ZHANG T, et al. Efficient Transformer-based Large Scale Language Representations using Hardware-friendly Block Structured Pruning[EB/OL]. (2020-09-17)[2026-11-30]. https://arxiv.org/abs/2009.08065.
要旨
事前学習された大規模言語モデルは、多くの自然言語処理(NLP)タスクにおいて高い精度を示すことが増えている。しかし、ハードウェアプラットフォームにおける限られた重みの記憶容量と計算速度は、事前学習モデルの普及を妨げており、エッジコンピューティングの時代において特に顕著である。本稿では、ハードウェア親和性の高いブロック構造剪定を用いた効率的なトランスフォーマーベースの大規模言語表現を提案する。最適化のために、再加重されたグループ Lasso をブロック構造剪定に組み込む。本提案アプローチは、大幅に削減された重みの記憶容量と計算速度に加え、高い圧縮率を実現する。BERT、RoBERTa、DistilBERT の異なるモデルを General Language Understanding Evaluation(GLUE)ベンチマークタスクで評価した結果、特定のタスクにおいて精度の低下がゼロまたは微小なまま、最大 5.0 倍の圧縮率を実現した。また、本提案手法は知識蒸留を用いた既存のコンパクト事前学習言語モデル(例:DistilBERT)と直交しており、DistilBERT の上さらに 1.79 倍の平均圧縮率を実現し、精度の低下がゼロまたは微小なままである。最終的に圧縮されたモデルは、リソース制約のあるエッジデバイスへの展開に適している。
Pre-trained large-scale language models have increasingly demonstrated high accuracy on many natural language processing (NLP) tasks. However, the limited weight storage and computational speed on hardware platforms have impeded the popularity of pre-trained models, especially in the era of edge computing. In this work, we propose an efficient transformer-based large-scale language representation using hardware-friendly block structure pruning. We incorporate the reweighted group Lasso into block-structured pruning for optimization. Besides the significantly reduced weight storage and computation, the proposed approach achieves high compression rates. Experimental results on different models (BERT, RoBERTa, and DistilBERT) on the General Language Understanding Evaluation (GLUE) benchmark tasks show that we achieve up to 5.0x with zero or minor accuracy degradation on certain task(s). Our proposed method is also orthogonal to existing compact pre-trained language models such as DistilBERT using knowledge distillation, since a further 1.79x average compression rate can be achieved on top of DistilBERT with zero or minor accuracy degradation. It is suitable to deploy the final compressed model on resource-constrained edge devices.