arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2602.04919cs.LG
收藏

逐步压缩大型语言模型以像沸 frog 一样进行推理

Gradually Compacting Large Language Models for Reasoning Like a Boiling Frog

Salesforce AI Research(Salesforce AI研究部);National University of Singapore(新加坡国立大学)

Yiran Zhao, Shengyang Zhou, Zijian Wu, Tongyan Hu, Yuhui Xu, Rengan Dou, Kenji Kawaguchi, Shafiq Joty, Junnan Li, Michael Qizhe Shieh

AI总结:

本文提出了一种渐进压缩方法,通过剪枝-微调循环逐步减少大型语言模型大小,同时保持推理性能,适用于多种剪枝策略和后期训练方法。

摘要:

大型语言模型(LLMs)已展示了令人印象深刻的推理能力,但它们的庞大尺寸往往需要大量的计算资源。为了减少资源消耗并加快推理速度,必须消除冗余参数而不影响性能。然而,传统的剪枝方法直接删除此类参数往往会导致推理任务中模型性能大幅下降,并且需要大量的后期训练来恢复失去的能力。在本工作中,我们提出了一种渐进压缩方法,将压缩过程分为多个细粒度的迭代步骤,在每个阶段应用剪枝-微调循环(PTL)以逐步减少模型大小,同时通过微调恢复性能。这种迭代方法——类似于“沸 frog 效应”——使模型能够逐步压缩而不会出现突然的性能损失。实验结果表明,PTL可以将LLMs压缩到接近原始大小的一半,仅需轻量级后期训练,同时在推理任务上保持与原始模型相当的性能。此外,PTL具有灵活性,可以应用于各种剪枝策略,如神经元剪枝和层剪枝,以及不同的后期训练方法,包括连续预训练和强化学习。此外,实验结果证实了PTL在数学推理以外的多种任务上的有效性,如代码生成,证明了其广泛的应用性。

英文摘要:

Large Language Models (LLMs) have demonstrated impressive reasoning capabilities, but their substantial size often demands significant computational resources. To reduce resource consumption and accelerate inference, it is essential to eliminate redundant parameters without compromising performance. However, conventional pruning methods that directly remove such parameters often lead to a dramatic drop in model performance in reasoning tasks, and require extensive post-training to recover the lost capabilities. In this work, we propose a gradual compacting method that divides the compression process into multiple fine-grained iterations, applying a Prune-Tune Loop (PTL) at each stage to incrementally reduce model size while restoring performance with finetuning. This iterative approach-reminiscent of the "boiling frog" effect-enables the model to be progressively compressed without abrupt performance loss. Experimental results show that PTL can compress LLMs to nearly half their original size with only lightweight post-training, while maintaining performance comparable to the original model on reasoning tasks. Moreover, PTL is flexible and can be applied to various pruning strategies, such as neuron pruning and layer pruning, as well as different post-training methods, including continual pre-training and reinforcement learning. Additionally, experimental results confirm the effectiveness of PTL on a variety of tasks beyond mathematical reasoning, such as code generation, demonstrating its broad applicability.

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

↑