도핑 크론커커 곱을 활용한 언어 모델 압축
Compressing Language Models using Doped Kronecker Products
Compressing Language Models using Doped Kronecker Products
@misc{thakker2020compressing,
title = {Compressing Language Models using Doped Kronecker Products},
author = {Urmish Thakker and Paul N. Whatmough and Zhi-Gang Liu and Matthew Mattina and Jesse Beu},
year = {2020},
eprint = {2001.08896},
archivePrefix = {arXiv},
primaryClass = {cs.LG},
url = {https://arxiv.org/abs/2001.08896}
}
Thakker, U., Whatmough, P. N., Liu, Z.-G., Mattina, M., & Beu, J. (2020). Compressing Language Models using Doped Kronecker Products [Preprint]. arXiv. https://doi.org/10.48550/arXiv.2001.08896
THAKKER U, WHATMOUGH PN, LIU ZG, et al. Compressing Language Models using Doped Kronecker Products[EB/OL]. (2020-01-24)[2026-11-30]. https://arxiv.org/abs/2001.08896.
초록
크론커 (KP) 곱은 IoT RNN 애플리케이션을 15 38 배의 압축 비율로 압축하여 기존 압축 방법보다 우수한 성능을 달성해 왔습니다. 그러나 KP 를 대규모 자연어 처리 (NLP) 작업에 적용할 경우 정확도 손실이 크게 발생 (약 26%) 하는 문제가 있습니다. 본 논문은 KP 를 대규모 NLP 작업에 적용할 때 잃어버릴 수 있는 정확도를 KP 행렬의 추가 자유도를 허용함으로써 회복하는 방법을 제안합니다. 더 구체적으로, 사전 정의된 KP 구조 위에 극도로 희소인 오버레이 행렬을 추가하는 프로세스인 '도핑 (doping)'을 제안합니다. 이를 압축 방법으로 '도핑 크론커 곱 압축 (doped kronecker product compression)'이라 명명합니다. 이러한 모델을 학습시키기 위해, 공행렬 적응 (co-matrix adaption, CMA) 현상에 대한 새로운 해결책을 제시하며, 이를 위해 공행렬 드롭아웃 정규화 (co matrix dropout regularization, CMR) 라는 새로운 정규화 스키마를 사용합니다. 실험 결과는 LSTM 레이어 크기가 25 MB 인 대규모 언어 모델의 25 배 압축으로 퍼플루어시 점수 손실이 1.4% 로 나타났음을 보여줍니다. 25 배 압축 시, 동등한 가지른 네트워크는 퍼플루어시 점수 손실이 7.9% 로 발생하며, HMD 와 LMF 는 각각 15% 와 27% 의 손실을 보입니다.
Kronecker Products (KP) have been used to compress IoT RNN Applications by 15-38x compression factors, achieving better results than traditional compression methods. However when KP is applied to large Natural Language Processing tasks, it leads to significant accuracy loss (approx 26%). This paper proposes a way to recover accuracy otherwise lost when applying KP to large NLP tasks, by allowing additional degrees of freedom in the KP matrix. More formally, we propose doping, a process of adding an extremely sparse overlay matrix on top of the pre-defined KP structure. We call this compression method doped kronecker product compression. To train these models, we present a new solution to the phenomenon of co-matrix adaption (CMA), which uses a new regularization scheme called co matrix dropout regularization (CMR). We present experimental results that demonstrate compression of a large language model with LSTM layers of size 25 MB by 25x with 1.4% loss in perplexity score. At 25x compression, an equivalent pruned network leads to 7.9% loss in perplexity score, while HMD and LMF lead to 15% and 27% loss in perplexity score respectively.