LORD: Low Rank Decomposition Of Monolingual Code LLMs For One-Shot Compression

要約

行列の低ランク分解 – 大きな行列を 2 つの小さな行列の積に分割することで、スパース化せずにモデルのパラメータを削減する圧縮手段が提供されるため、最新のハードウェアでさらなる高速化が実現します。
さらに、量子化とは異なり、圧縮線形層は完全に微分可能であり、すべてのパラメーターがトレーニング可能であると同時に、浮動小数点行列に対して既存の高効率カーネルを活用できます。
私たちは、低ランク分解 (LoRD) による単一言語コード生成のために大規模言語モデル (LLM) を圧縮する可能性を研究し、これらのモデルの線形層のランクを、複雑さの 1% 未満の増加で最大 39.58% 削減できることを観察しました。
次に、低ランク分解 (LoRD) を使用して、単一の A100 で 10 分未満で、StarCoder 16B を低下なしで 13.2B パラメータに圧縮し、HumanEval Pass@1 スコアの低下を最小限に抑えて 12.3B に圧縮します。
圧縮モデルでは、Python バックエンドを使用した Huggingface の実装に比べて、コードを 1 行変更するだけで、推論が最大 22.35% 高速化されます。
低ランク分解 (LoRD) モデルは、SpQR などの最先端のほぼ無損失の量子化方法との互換性を維持しており、量子化のさらなる圧縮ゲインを活用できます。
最後に、QLoRA over Low Rank Decomposition (LoRD) モデルは、バニラ QLoRA に比べてメモリ要件をさらに 21.2% 削減し、パラメーター効率の良い微調整による同様の利益を提供します。
私たちの研究は、低ランク分解 (LoRD) が LLM 圧縮の有望な新しいパラダイムであることを示しています。

要約(オリジナル)

Low Rank Decomposition of matrix – splitting a large matrix into a product of two smaller matrix offers a means for compression that reduces the parameters of a model without sparsification, and hence delivering more speedup on modern hardware. Moreover, unlike quantization, the compressed linear layers remain fully differentiable and all the parameters trainable, while being able to leverage the existing highly efficient kernels over floating point matrices. We study the potential to compress Large Language Models (LLMs) for monolingual Code generation via Low Rank Decomposition (LoRD) and observe that ranks for the linear layers in these models can be reduced by upto 39.58% with less than 1% increase in perplexity. We then use Low Rank Decomposition (LoRD) to compress StarCoder 16B to 13.2B parameter with no drop and to 12.3B with minimal drop in HumanEval Pass@1 score, in less than 10 minutes on a single A100. The compressed models speeds up inference by up to 22.35% with just a single line of change in code over huggingface’s implementation with pytorch backend. Low Rank Decomposition (LoRD) models remain compatible with state of the art near-lossless quantization method such as SpQR, which allows leveraging further compression gains of quantization. Lastly, QLoRA over Low Rank Decomposition (LoRD) model further reduces memory requirements by as much as 21.2% over vanilla QLoRA while offering similar gains from parameter efficient fine tuning. Our work shows Low Rank Decomposition (LoRD) as a promising new paradigm for LLM compression.

arxiv情報

著者 Ayush Kaushal,Tejas Vaidhya,Irina Rish
発行日 2023-09-25 10:35:17+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, Google

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