하드웨어 친화적 블록 구조적 절단 기반 효율적인 대규모 언어 표현
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) 작업에서 높은 정확도를 점점 더 많이 보여주고 있다. 그러나 하드웨어 플랫폼에서의 제한된 가중치 저장 용량과 계산 속도는 미리 학습된 모델의 보급을 저해해 왔으며, 특히 엣지 컴퓨팅 시대에 그 영향이 더 컸다. 본 논문에서는 하드웨어 친화적인 블록 구조 가지치기를 활용하여 효율적인 트랜스포머 기반 대규모 언어 표현을 제안한다. 우리는 최적화를 위해 재가중 그룹 라소 (reweighted group Lasso) 를 블록 구조 가지치기에 통합한다. 제안된 접근법은 가중치 저장 용량과 계산량을 현저히 줄임과 동시에 높은 압축률을 달성한다. 일반 언어 이해 평가 (GLUE) 벤치마크 작업에서 BERT, RoBERTa, DistilBERT 등 다양한 모델에 대한 실험 결과는 특정 작업에서 0 또는 미미한 정확도 저하로 최대 5.0 배의 압축률을 달성함을 보여준다. 또한, 지식 전달 (knowledge distillation) 을 활용한 기존 컴팩트 미리 학습된 언어 모델 (예: DistilBERT) 과 본 제안 방법은 직교하며, DistilBERT 위에 0 또는 미미한 정확도 저하로 평균 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.