Skip to main content
QUICK REVIEW

[論文レビュー] OneBit: Towards Extremely Low-bit Large Language Models

Yuzhuang Xu, Xu Han|arXiv (Cornell University)|Feb 17, 2024
Topic ModelingComputer Science被引用数 7
ひとこと要約

本論文は、LLMs のための 1 ビット重み量子化フレームワーク OneBit を紹介する。Sign-Value-Independent Decomposition (SVID) と 1-bit 線形層を用い、16-bit 活性化とフル精度の教師からの知識蒸留で性能を維持しつつ 1-bit 重みを実現する。

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-bit 重み量子化フレームワークを提案する。
  • 1-bit 重みとフル精度モデルを結ぶ原理的初期化(SVID)の開発。
  • 量子化を意識した知識蒸留を活用して、教師モデルから 1-bit の学生へ能力を移転させる。
  • モデルファミリ(OPT、LLaMA、LLaMA2)およびサイズ(1.3B–13B)全般への一般化可能性を示す。

提案手法

  • 重みが 2値 (±1) の 1-bit 線形層を導入し、計算時に 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-bit 初期化を可能にする。
  • 行列分解(SVD/NMF)を用いて (a, b) を取得し、フル精度の重み W から 1-bit モデルを初期化。
  • ロジットのクロスエントロピーと隠れ状態のMSEを用いた量子化を意識した知識蒸留(KD)を採用し、フル精度の教師から 1-bit の学生へ能力を移す。
  • 学習設定:W1A16、教師から作成されたデータ、50 KD エポック、Adam オプティマイザ、コサイン学習率スケジューリング、学習中は FP16。
  • 複数のモデルサイズ(OPT、LLaMA、LLaMA2)で perplexity および zero-shot タスクに対して、OneBit を 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-bit の場合(W1A16)、1-bit 重み量子化は LLM の能力を保持できるか?
  • RQ2Sign-Value-Independent Decomposition は 1-bit LLM の収束を速め、性能維持を促す実用的な初期化を提供するか?
  • RQ31.3B から 13B までのモデルサイズで、OneBit は強力なベースライン(GPTQ、LLM-QAT、OmniQuant)と比較してどうか?
  • RQ4トレーニングハイパーパラメータに対して頑健か、より大規模な LLM アーキテクチャへスケーラブルか?
  • RQ5知識蒸留はフル精度の教師から知識を移し、PTQ ベースラインと比較して性能低下を緩和するか?

主な発見

  • OneBit は W1A16 設定下で、複数のモデル(OPT、LLaMA、LLaMA2)において FP16 に近い perplexity と競争力のある zero-shot 精度を達成。
  • W1A16 では、複数のモデルサイズにおいて perplexity と zero-shot タスクで GPTQ、LLM-QAT、OmniQuant のベースラインを上回る。
  • SVID 初期化 (via SVD/NMF) は収束速度と初期化品質を改善し、1-bit 重みに対する安定した 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

この論文を読む

Nubintのビューアで原文を開き、読みながら気になる箇所をすぐに質問できます。

Nubintでこの論文を読む

このレビューはAIが論文の原文をもとに作成しました。引用する前に原文をご確認ください。