SliceGPT: Compress Large Language Models by Deleting Rows and Columns

要約

大規模な言語モデルは自然言語処理の基礎となっていますが、その使用にはコンピューティング リソースとメモリ リソースの点で多大なコストがかかります。
スパース化は、これらのリソースの制約を緩和するソリューションを提供し、最近の研究では、トレーニングされたモデルをポストホックにスパース化できることが示されています。
既存のスパース化技術は、追加のデータ構造が必要であり、現在のハードウェアでは高速化が制限されているため、課題に直面しています。
この論文では、各重み行列をより小さい (密な) 行列に置き換え、ネットワークの埋め込み次元を削減する新しいトレーニング後のスパース化スキームである SliceGPT を紹介します。
広範な実験を通じて、SliceGPT が LLAMA2-70B、OPT 66B、および Phi-2 モデルのモデル パラメーター (埋め込みを含む) を最大 25% 削除できると同時に、ゼロショット タスクのパフォーマンスを 99%、99%、90% 維持できることを示しました。
それぞれ密なモデル。
当社のスライス モデルは、追加のコード最適化を行わなくても、より少ない GPU で実行され、より高速に実行されます。24 GB のコンシューマー GPU では、LLAMA2-70B での推論の総計算量が高密度モデルの 64% に削減されます。
40GB A100 GPU では、それを 66% に削減します。
私たちは、SliceGPT を可能にするトランス ネットワークにおける計算上の不変性という新しい洞察を提供します。これが、事前トレーニングされたモデルのメモリと計算の需要を削減する将来の道を刺激し、可能にすることを期待しています。
コードは https://github.com/microsoft/TransformerCompression から入手できます。

要約(オリジナル)

Large language models have become the cornerstone of natural language processing, but their use comes with substantial costs in terms of compute and memory resources. Sparsification provides a solution to alleviate these resource constraints, and recent works have shown that trained models can be sparsified post-hoc. Existing sparsification techniques face challenges as they need additional data structures and offer constrained speedup with current hardware. In this paper we present SliceGPT, a new post-training sparsification scheme which replaces each weight matrix with a smaller (dense) matrix, reducing the embedding dimension of the network. Through extensive experimentation, we show that SliceGPT can remove up to 25% of the model parameters (including embeddings) for LLAMA2-70B, OPT 66B and Phi-2 models while maintaining 99%, 99% and 90% zero-shot task performance of the dense model respectively. Our sliced models run on fewer GPUs and run faster without any additional code optimization: on 24GB consumer GPUs we reduce the total compute for inference on LLAMA2-70B to 64% of that of the dense model; on 40GB A100 GPUs we reduce it to 66%. We offer a new insight, computational invariance in transformer networks, which enables SliceGPT and we hope it will inspire and enable future avenues to reduce memory and computation demands for pre-trained models. Code is available at: https://github.com/microsoft/TransformerCompression

arxiv情報

著者 Saleh Ashkboos,Maximilian L. Croci,Marcelo Gennari do Nascimento,Torsten Hoefler,James Hensman
発行日 2024-01-26 17:35:45+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, Google

カテゴリー: cs.CL, cs.LG パーマリンク