Skip to main content
QUICK REVIEW

[論文レビュー] CompactifAI: Extreme Compression of Large Language Models using Quantum-Inspired Tensor Networks

Andrei Tomut, Saeed S. Jahromi|arXiv (Cornell University)|Jan 25, 2024
Topic Modeling被引用数 8
ひとこと要約

CompactifAIは量子をヒントとしたテンソルネットワーク(MPOs)を用いてLLMの重みをテンソル化し、LlaMA-2 7Bでの短期間の再訓練後、元の精度の約90%を維持しつつサイズを30%に圧縮します。他の圧縮手法を補完し、分散トレーニングを高速化します。

ABSTRACT

Large Language Models (LLMs) such as ChatGPT and LlaMA are advancing rapidly in generative Artificial Intelligence (AI), but their immense size poses significant challenges, such as huge training and inference costs, substantial energy demands, and limitations for on-site deployment. Traditional compression methods such as pruning, distillation, and low-rank approximation focus on reducing the effective number of neurons in the network, while quantization focuses on reducing the numerical precision of individual weights to reduce the model size while keeping the number of neurons fixed. While these compression methods have been relatively successful in practice, there is no compelling reason to believe that truncating the number of neurons is an optimal strategy. In this context, this paper introduces CompactifAI, an innovative LLM compression approach using quantum-inspired Tensor Networks that focuses on the model's correlation space instead, allowing for a more controlled, refined and interpretable model compression. Our method is versatile and can be implemented with - or on top of - other compression techniques. As a benchmark, we demonstrate that a combination of CompactifAI with quantization allows to reduce a 93% the memory size of LlaMA 7B, reducing also 70% the number of parameters, accelerating 50% the training and 25% the inference times of the model, and just with a small accuracy drop of 2% - 3%, going much beyond of what is achievable today by other compression techniques. Our methods also allow to perform a refined layer sensitivity profiling, showing that deeper layers tend to be more suitable for tensor network compression, which is compatible with recent observations on the ineffectiveness of those layers for LLM performance. Our results imply that standard LLMs are, in fact, heavily overparametrized, and do not need to be large at all.

研究の動機と目的

  • モデルサイズを brute-force なニューロン切り捨てを用いずに削減することで、より環境に優しく効率的なLLMの展開を促進する。
  • ニューロン数ではなく相関空間をターゲットとするテンソルネットワークベースの圧縮を導入する。
  • 他の圧縮技術との互換性と分散トレーニングでの有効性を示す。

提案手法

  • 選択したSelf-AttentionおよびMLPの重み行列をbond dimension chiのMatrix Product Operators (MPOs)にテンソル化する。
  • 連続SVDを用いて上位 chi 個の特異値を保持し、相関を切り捨てることでMPOを決定する。
  • 分散設定でのCPU-GPU転送時間の削減を活用して、テンソル化モデルを短時間再訓練して精度を回復させる。
  • LlaMA-2 7Bでベンチマークを行い、SAおよびMLP層でchi ≈ 100、float16を用いて圧縮を達成。
  • 追加のサイズ削減のため、軽度の量子化(float32からfloat16)と併用。
  • XSumおよびGigawordデータセットでRouge指標を用いてテキスト要約性能を評価する。)

実験結果

リサーチクエスチョン

  • RQ1量子をヒントとしたテンソルネットワークは、相関空間を drastic に妥協せずに圧縮してLLMを効果的に圧縮できるか?
  • RQ2MPOベースの圧縮とその後の再訓練が、モデルサイズ、訓練速度、および下流タスク性能に与える影響は?
  • RQ3CompactifAIは量子化などの他の圧縮技術とどのように相互作用するか?
  • RQ4実際的な設定での分散マルチGPU訓練に対して、手法は実現可能か?

主な発見

  • LlaMA-2 7Bを7Bパラメータから約2Bパラメータへ圧縮(float16で元のサイズの30%)。
  • 圧縮と控えめな量子化後のメモリフットプリントは3.7 GB(float16)に削減。
  • 圧縮モデルの再訓練により、XSumおよびGigawordで元のRougeベースの要約精度の約90%を得る。
  • 分散マルチGPU環境で、圧縮モデルの訓練/再訓練時間は非圧縮モデルの約半分。
  • 軽度の量子化(float32からfloat16)で追加のおよそ2倍の圧縮が得られ、最終サイズは元の7Bモデルの約15%(float32表現時)に。
  • 本手法はGPU適合で、8枚のNVIDIA A100 GPUを搭載した1台のAWSマシンでデモンストレーション済み。

より良い研究を、今すぐ始めましょう

論文設計から論文執筆まで、研究時間を劇的に削減しましょう。

クレジットカード登録不要

このレビューはAIが作成し、人間の編集者が確認しました。