Skip to main content
QUICK REVIEW

[논문 리뷰] Extreme Compression for Pre-trained Transformers Made Simple and Efficient

Xiaoxia Wu, Zhewei Yao|arXiv (Cornell University)|2022. 06. 04.
Advanced Image and Video Retrieval Techniques인용 수 13
한 줄 요약

이 논문은 초저비트 양자화(1비트/2비트)와 모델 distillation을 통해 사전 훈련된 Transformer의 극한 압축을 위한 단순하면서도 효과적인 파이프라인인 XTC를 제안한다. 초기화 파rameter와 훈련 전략을 체계적으로 분석한 결과, 이전의 최상위 성능 기법들이 부족하게 훈련된 것으로 밝혀졌으며, XTC는 다단계 지식 distillation이나 복잡한 최적화 없이도 50배의 모델 크기 감소를 이룩하면서 GLUE 태스크에서 SOTA 성능을 달성한다 — 6층의 TinyBERT조차도 뛰어넘는다.

ABSTRACT

Extreme compression, particularly ultra-low bit precision (binary/ternary) quantization, has been proposed to fit large NLP models on resource-constraint devices. However, to preserve the accuracy for such aggressive compression schemes, cutting-edge methods usually introduce complicated compression pipelines, e.g., multi-stage expensive knowledge distillation with extensive hyperparameter tuning. Also, they oftentimes focus less on smaller transformer models that have already been heavily compressed via knowledge distillation and lack a systematic study to show the effectiveness of their methods. In this paper, we perform a very comprehensive systematic study to measure the impact of many key hyperparameters and training strategies from previous works. As a result, we find out that previous baselines for ultra-low bit precision quantization are significantly under-trained. Based on our study, we propose a simple yet effective compression pipeline for extreme compression, named XTC. XTC demonstrates that (1) we can skip the pre-training knowledge distillation to obtain a 5-layer BERT while achieving better performance than previous state-of-the-art methods, e.g., the 6-layer TinyBERT; (2) extreme quantization plus layer reduction is able to reduce the model size by 50x, resulting in new state-of-the-art results on GLUE tasks.

연구 동기 및 목표

  • 기존의 BERT를 위한 초저비트 양자화 기법이 복잡한 다단계 파이프라인과 광범위한 초기화 파rameter 튜닝이 필요한 이유를 규명하는 것.
  • 이진화(1비트) 및 삼진화(2비트) 양자화에서 실제로 고비용의 지식 distillation과 가중치 분할이 필수적인지 판단하는 것.
  • 이미 작고 정제된 모델인 TinyBERT나 MiniLM와 같은 초저비트 양자화의 효과를 평가하는 것.
  • 최소한의 훈련 오버헤드로 높은 정확도를 유지하는 간결하고 효율적인 압축 파이프라인을 개발하는 것.
  • 초저비트 양자화를 위한 초기화 파arameter와 훈련 전략의 체계적 벤치마크 제공

제안 방법

  • 소규모 정제된 모델에 직접 양자화 인식 훈련(QAT)을 적용하는 단순한 압축 파이프라인인 XTC를 제안하며, 사전 훈련 distillation 단계를 생략한다.
  • 직선 전파를 위한 직선 추정기(ste)를 사용한 1비트 또는 2비트 가중치 양자화를 적용한 단일 단계 훈련 프로세스를 구현한다.
  • 성능을 유지하면서도 모델 크기를 더욱 줄이기 위해 레이어 감소(예: 6층의 SkipBERT)를 도입한다.
  • 다단계 distillation과 데이터 증강을 피하기 위해 표준 미세조정과 혼합 정밀도 훈련, 학습률 스케줄링을 사용한다.
  • 일부 분석 설정에서는 파rameter 효율적인 미세조정을 위해 LoRa(Low-Rank Adaptation)를 적용한다.
  • 최적의 구성 요건을 규명하기 위해 1,000개 이상의 모델 변형에서 초기화 파arameter의 광범위한 분석을 수행한다.

실험 결과

연구 질문

  • RQ11비트 양자화된 BERT 모델에서 높은 정확도를 달성하기 위해 다단계 지식 distillation과 데이터 증강이 진정으로 필수적인가?
  • RQ2더 단순한 단일 단계 훈련 파이프라인이 복잡한 다단계 기반 모델보다 유사하거나 더 나은 성능을 낼 수 있는가?
  • RQ3초저비트 양자화가 이미 압축된 정제된 모델인 TinyBERT나 MiniLM와 어떻게 상호작용하는가?
  • RQ4초저비트 양자화된 모델의 성능에 가장 크게 영향을 주는 초기화 파arameter와 훈련 전략은 무엇인가?
  • RQ5사전 훈련 distillation이나 가중치 분할 없이도 SOTA 성능을 달성할 수 있는가?

주요 결과

  • 이전의 최상위 성능 기법들은 1비트 및 2비트 양자화에서 상당히 부족하게 훈련되어 최적의 성능을 내지 못했다.
  • XTC는 1비트 양자화된 6층의 SkipBERT에서 평균 GLUE 점수 81.43점을 기록했으며, 사전 훈련 distillation 없이도 6층의 TinyBERT(80.56)를 뛰어넘었다.
  • 극한의 양자화와 레이어 감소를 통해 모델 크기가 50배 감소(16MB → 0.3MB)되었으며, GLUE 벤치마크에서 SOTA 성능을 달성했다.
  • 1비트 양자화의 경우, XTC는 오직 8.1MB의 모델 크기로 평균 GLUE 점수 81.43점을 기록했으며, 복잡한 다단계 파이프라인을 사용한 이전 기법들을 뛰어넘었다.
  • 다양한 난수 시드에 대해 안정적인 훈련을 보이며 평균 GLUE 점수의 표준편차가 오직 0.09~0.11에 불과하여 안정성이 뛰어나다.
  • XTC는 가중치 분할과 다단계 distillation이 필요 없음을 입증하여 훈련 복잡도를 줄이면서도 정확도를 향상하거나 동등하게 유지한다.

더 나은 연구,지금 바로 시작하세요

논문 읽기부터 검토까지, 연구 시간을 획기적으로 줄여보세요.

카드 등록 없음 · 무료 플랜 제공

이 리뷰는 AI가 만들고, 인간 에디터가 검토했습니다.