arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2407.00928cs.LGcs.CL
收藏

FoldGPT:简单而有效的大语言模型压缩方案

FoldGPT: Simple and Effective Large Language Model Compression Scheme

ByteDance Inc.(字节跳动公司)

Songwei Liu, Chao Zeng, Lianqiang Li, Chenqian Yan, Lean Fu, Xing Mei, Fangmin Chen

AI总结:

FoldGPT 针对大语言模型深度冗余问题,提出结合块删除、分组参数共享、微调与尾部蒸馏的压缩方案,在高效模型压缩上超越 SOTA 方法。

摘要:

在数据安全担忧和云成本上升的推动下,在移动设备上部署大语言模型(LLMs)的需求持续增长。然而,网络带宽和内存限制给在移动设备上部署十亿级模型带来了挑战。在本研究中,我们考察了不同规模 LLMs 中不同层的输出,发现大多数层的输出表现出显著的相似性。而且,这种相似性随着模型规模的增大而更加明显,表明 LLMs 在深度方向上存在大量冗余。基于这一观察,我们提出了一种高效的模型体积压缩策略,称为 FoldGPT,它结合了块删除和块参数共享。该策略由三部分组成:(1)基于可学习的门控参数,我们在建模块间耦合效应的同时确定块重要性排序,然后根据给定的删除率删除一些冗余层。(2)对于保留的块,我们应用一种专门设计的分组参数共享策略,同一组内的块共享相同的权重,从而显著压缩参数数量并略微降低延迟开销。(3)在共享这些块之后,我们通过少量微调来“修复”由稀疏性引起的不匹配,并引入尾部层蒸馏策略以提升性能。实验表明,FoldGPT 在高效模型压缩方面优于以往的最先进(SOTA)方法,证明了通过直接的块删除和参数共享实现模型轻量化是可行的。

英文摘要:

The demand for deploying large language models(LLMs) on mobile devices continues to increase, driven by escalating data security concerns and cloud costs. However, network bandwidth and memory limitations pose challenges for deploying billion-level models on mobile devices. In this study, we investigate the outputs of different layers across various scales of LLMs and found that the outputs of most layers exhibit significant similarity. Moreover, this similarity becomes more pronounced as the model size increases, indicating substantial redundancy in the depth direction of the LLMs. Based on this observation, we propose an efficient model volume compression strategy, termed FoldGPT, which combines block removal and block parameter sharing.This strategy consists of three parts: (1) Based on the learnable gating parameters, we determine the block importance ranking while modeling the coupling effect between blocks. Then we delete some redundant layers based on the given removal rate. (2) For the retained blocks, we apply a specially designed group parameter sharing strategy, where blocks within the same group share identical weights, significantly compressing the number of parameters and slightly reducing latency overhead. (3) After sharing these Blocks, we "cure" the mismatch caused by sparsity with a minor amount of fine-tuning and introduce a tail-layer distillation strategy to improve the performance. Experiments demonstrate that FoldGPT outperforms previous state-of-the-art(SOTA) methods in efficient model compression, demonstrating the feasibility of achieving model lightweighting through straightforward block removal and parameter sharing.

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

↑