Skip to main content
QUICK REVIEW

[논문 리뷰] OneBit: Towards Extremely Low-bit Large Language Models

Yuzhuang Xu, Xu Han|arXiv (Cornell University)|2024. 02. 17.
Topic ModelingComputer Science인용 수 7
한 줄 요약

이 논문은 Sign-Value-Independent Decomposition(SVID)와 1-비트 선형 계층을 사용하여 16-비트 활성화 및 full-precision 교사로부터의 지식 증류를 통해 성능을 유지하는 1-비트 가중치가 가능한 OneBit 프레임워크를 소개합니다.

ABSTRACT

Model quantification uses low bit-width values to represent the weight matrices of existing models to be quantized, which is a promising approach to reduce both storage and computational overheads of deploying highly anticipated LLMs. However, current quantization methods suffer severe performance degradation when the bit-width is extremely reduced, and thus focus on utilizing 4-bit or 8-bit values to quantize models. This paper boldly quantizes the weight matrices of LLMs to 1-bit, paving the way for the extremely low bit-width deployment of LLMs. For this target, we introduce a 1-bit model compressing framework named OneBit, including a novel 1-bit parameter representation method to better quantize LLMs as well as an effective parameter initialization method based on matrix decomposition to improve the convergence speed of the quantization framework. Sufficient experimental results indicate that OneBit achieves good performance (at least 81% of the non-quantized performance on LLaMA models) with robust training processes when only using 1-bit weight matrices.

연구 동기 및 목표

  • 제한된 하드웨어에서도 큰 성능 저하 없이 배치를 가능하게 하는 극단적 모델 압축을 동기 부여한다.
  • Transformer 기반 LLM용 1-비트 가중치 양자화 프레임워크를 제안한다.
  • 1-비트 가중치와 전체 정밀도 모델 간의 연결 고리를 형성하는 체계적 초기화(SVID)를 개발한다.
  • 교사로부터 1-비트 학생으로 능력을 전달하기 위한 양자화 인식 지식 증류를 활용한다.
  • 모델 계열(OPT, LLaMA, LLaMA2) 및 규모(1.3B–13B) 전반에 걸친 일반화 가능성을 입증한다.

제안 방법

  • 가중치가 이진(+1/-1)인 1-비트 선형 계층을 도입하고 계산 중에 두 개의 FP16 값 벡터 g와 h를 적용: Y = [(X ∘ g) W±1^T] ∘ h 뒤에 LayerNorm를 적용한다.
  • Sign-Value-Independent Decomposition(SVID): W ≈ Sign(W) ⊙ (a b^T)로, W를 부호 행렬과 절댓값의 랭크-1 근사로 분해하여 1-비트 초기화를 효과적으로 가능하게 한다.
  • 전체 정밀도 가중치 W에서 1-비트 모델을 초기화하기 위해 (a, b)를 얻기 위한 행렬 분해(SVD/NMF)를 사용한다.
  • 교사-학생 간의 능력 전수를 위한 양자화 인식 지식 증류(KD)를 도입하여 로그it의 교차 엔트로피와 은닉 상태의 MSE로 전수를 수행한다.
  • 학습 설정: W1A16 설정, 교사로부터 합성된 데이터, 50 KD 에폭, Adam 옵티마이저, 코사인 LR 스케줄링, 학습 중 FP16 사용.
  • 다수의 모델 크기(OPT, LLaMA, LLaMA2)에서 퍼플렉시티 및 제로샷 작업에 대해 PTQ 및 다른 QAT 베이스라인(GPTQ, LLM-QAT, OmniQuant)과 비교한다.
Figure 1: The perplexity (lower scores mean better performance) of existing widely-used low-bit quantization methods on LLaMA-7B, reported on Wikitext2 (Merity et al., 2016 ) . All the examined previous approaches suffer from significant performance degradation when quantizing models to 2-bit values
Figure 1: The perplexity (lower scores mean better performance) of existing widely-used low-bit quantization methods on LLaMA-7B, reported on Wikitext2 (Merity et al., 2016 ) . All the examined previous approaches suffer from significant performance degradation when quantizing models to 2-bit values

실험 결과

연구 질문

  • RQ1활성화가 16비트인(W1A16) 경우 1-비트 가중치 양자화가 LLM의 기능을 보존할 수 있는가?
  • RQ2Sign-Value-Independent Decomposition이 1-비트 LLM에 대해 빠른 수렴과 성능 유지에 도움이 되는 실용적 초기화를 제공하는가?
  • RQ3OneBit가 모델 크기 1.3B에서 13B까지의 강력한 베이스라인(GPTQ, LLM-QAT, OmniQuant) 대비 성능이 어떤가?
  • RQ4학습 하이퍼파라미터에 견고하며 더 큰 LLM 구조로 확장 가능한가?
  • RQ5지식 증류가 전체 정밀도 교사로부터 1-비트 학생으로 능력을 효과적으로 전달할 수 있는가?

주요 결과

  • OneBit은 W1A16 설정에서 OPT, LLaMA, LLaMA2 등 여러 모델에서 FP16 근접한 퍼플렉시티 및 경쟁력 있는 제로샷 정확도를 달성한다.
  • W1A16에서 OneBit은 다수의 모델 크기에서 퍼플렉시티 및 제로샷 작업에 대해 GPTQ, LLM-QAT, OmniQuant 베이스라인을 능가한다.
  • SVD/NMF를 통한 SVID 초기화가 수렴 속도 및 초기화 품질을 개선하여 1-비트 가중치의 안정적인 QAT 학습을 가능하게 한다.
  • 대형 LLaMA 계열에서 최대 90% 이상 공간 절약과 같은 큰 압축 비율 및 이진 가중치로 인한 CPU 친화적 속도 향상의 가능성을 제공한다.
  • 양자화 인식 KD는 전체 정밀도 교사로부터 지식을 전달하는 데 도움을 주며 PTQ 베이스라인 대비 성능 손실을 완화한다.
  • OneBit 아키텍처에서 학습률에 대한 견고성 및 학습의 안정성은 불루-비트 양자화에서 관찰되는 불안정성을 해결하는 방향으로 개선된다.
Figure 2: The main idea of our method OneBit. The left is the original FP16 Linear Layer, in which both the activation $\mathbf{X}$ and the weight matrix $\mathbf{W}$ are in FP16 format. The right is our proposed architecture. Only value vectors $\mathbf{g}$ and $\mathbf{h}$ are in FP16 format and t
Figure 2: The main idea of our method OneBit. The left is the original FP16 Linear Layer, in which both the activation $\mathbf{X}$ and the weight matrix $\mathbf{W}$ are in FP16 format. The right is our proposed architecture. Only value vectors $\mathbf{g}$ and $\mathbf{h}$ are in FP16 format and t

이 논문 읽기

누빈트 뷰어에서 원문을 열고, 읽으면서 궁금한 곳을 바로 물어보세요.

누빈트에서 이 논문 읽기

이 리뷰는 AI가 논문 원문을 바탕으로 만들었습니다. 인용하기 전에 원문을 확인해 주세요.