arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2408.09632cs.LGcs.CLstat.ML
收藏

MoDeGPT:用于大型语言模型压缩的模块化分解

MoDeGPT: Modular Decomposition for Large Language Model Compression

Samsung Research America(三星美国研究实验室)

Chi-Heng Lin, Shangqian Gao, James Seale Smith, Abhishek Patel, Shikhar Tuli, Yilin Shen, Hongxia Jin, Yen-Chang Hsu

AI总结:

本文提出MoDeGPT,一种基于矩阵分解的结构化压缩框架,无需反向传播或恢复微调即可在保持高零样本性能的同时显著降低大型语言模型的计算成本和推理延迟。

摘要:

大型语言模型(LLMs)通过在各种任务中表现出色,重塑了人工智能的格局。然而,庞大的计算需求使其在资源有限的设备上部署面临挑战。近期,使用低秩矩阵技术的压缩方法展现出潜力,但这些方法通常会导致准确率下降,或在参数和推理延迟方面引入显著开销。本文提出了模块化分解(MoDeGPT),这是一种新颖的结构化压缩框架,无需恢复微调即可解决上述缺陷。MoDeGPT将Transformer块划分为由矩阵对组成的模块,并通过重构模块级输出来降低隐藏维度。MoDeGPT基于一个理论框架开发,该框架利用三种成熟的矩阵分解算法——Nyström近似、CR分解和SVD——并将它们应用于我们重新定义的Transformer模块。我们的综合实验表明,MoDeGPT在无需反向传播的情况下,匹配或超越了依赖梯度信息的先前结构化压缩方法,并在压缩13B模型时节省了98%的计算成本。在Llama-2/3和OPT模型上,MoDeGPT在25-30%的压缩率下保持了90-95%的零样本性能。此外,压缩可在单GPU上数小时内完成,并将推理吞吐量提高多达46%。

英文摘要:

Large Language Models (LLMs) have reshaped the landscape of artificial intelligence by demonstrating exceptional performance across various tasks. However, substantial computational requirements make their deployment challenging on devices with limited resources. Recently, compression methods using low-rank matrix techniques have shown promise, yet these often lead to degraded accuracy or introduce significant overhead in parameters and inference latency. This paper introduces \textbf{Mo}dular \textbf{De}composition (MoDeGPT), a novel structured compression framework that does not need recovery fine-tuning while resolving the above drawbacks. MoDeGPT partitions the Transformer block into modules comprised of matrix pairs and reduces the hidden dimensions via reconstructing the module-level outputs. MoDeGPT is developed based on a theoretical framework that utilizes three well-established matrix decomposition algorithms -- Nyström approximation, CR decomposition, and SVD -- and applies them to our redefined transformer modules. Our comprehensive experiments show MoDeGPT, without backward propagation, matches or surpasses previous structured compression methods that rely on gradient information, and saves 98% of compute costs on compressing a 13B model. On \textsc{Llama}-2/3 and OPT models, MoDeGPT maintains 90-95% zero-shot performance with 25-30% compression rates. Moreover, the compression can be done on a single GPU within a few hours and increases the inference throughput by up to 46%.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑