BiLLM: 대형 언어 모델의 사후 양자화 한계를 넘어서기
BiLLM: Pushing the Limit of Post-Training Quantization for LLMs
February 6, 2024
저자: Wei Huang, Yangdong Liu, Haotong Qin, Ying Li, Shiming Zhang, Xianglong Liu, Michele Magno, Xiaojuan Qi
cs.AI
초록
사전 학습된 대규모 언어 모델(LLM)은 탁월한 일반 언어 처리 능력을 보이지만, 메모리와 계산 자원에 상당한 요구를 가집니다. 강력한 압축 기술인 이진화는 모델 가중치를 단 1비트로 극도로 줄여 비용이 많이 드는 계산 및 메모리 요구 사항을 낮출 수 있습니다. 그러나 기존의 양자화 기술은 초저 비트폭에서 LLM 성능을 유지하는 데 한계가 있습니다. 이러한 문제에 대응하여, 우리는 사전 학습된 LLM을 위해 특별히 설계된 획기적인 1비트 사후 학습 양자화 기법인 BiLLM을 제안합니다. BiLLM은 LLM의 가중치 분포를 기반으로 먼저 중요한 가중치를 식별하고 구조적으로 선택하며, 효과적인 이진 잔차 근사 전략을 통해 압축 손실을 최소화합니다. 또한, 중요하지 않은 가중치의 종 모양 분포를 고려하여, 이를 정확하게 그룹화하고 이진화하기 위한 최적의 분할 탐색을 제안합니다. BiLLM은 다양한 LLM 계열과 평가 지표에서 단 1.08비트 가중치로도 높은 정확도의 추론(예: LLaMA2-70B에서 8.41의 perplexity)을 처음으로 달성하며, 최신 LLM 양자화 방법을 큰 차이로 능가합니다. 또한, BiLLM은 단일 GPU에서 70억 개의 가중치를 가진 LLM의 이진화 과정을 0.5시간 이내에 완료하여 만족스러운 시간 효율성을 보여줍니다.
English
Pretrained large language models (LLMs) exhibit exceptional general language
processing capabilities but come with significant demands on memory and
computational resources. As a powerful compression technology, binarization can
extremely reduce model weights to a mere 1 bit, lowering the expensive
computation and memory requirements. However, existing quantization techniques
fall short of maintaining LLM performance under ultra-low bit-widths. In
response to this challenge, we present BiLLM, a groundbreaking 1-bit
post-training quantization scheme tailored for pretrained LLMs. Based on the
weight distribution of LLMs, BiLLM first identifies and structurally selects
salient weights, and minimizes the compression loss through an effective binary
residual approximation strategy. Moreover, considering the bell-shaped
distribution of the non-salient weights, we propose an optimal splitting search
to group and binarize them accurately. BiLLM achieving for the first time
high-accuracy inference (e.g. 8.41 perplexity on LLaMA2-70B) with only 1.08-bit
weights across various LLMs families and evaluation metrics, outperforms SOTA
quantization methods of LLM by significant margins. Moreover, BiLLM enables the
binarization process of the LLM with 7 billion weights within 0.5 hours on a
single GPU, demonstrating satisfactory time efficiency.