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

通过动态结构剪枝将密集大语言模型转换为专家混合架构

ToMoE: Converting Dense Large Language Models to Mixture-of-Experts through Dynamic Structural Pruning

Department of Computer Science, Florida State University(佛罗里达州立大学计算机科学系);Department of Computer Science and Engineering, University of Notre Dame(圣母大学计算机科学与工程系);Department of Computer Science, University of Maryland, College Park(马里兰大学学院市计算机科学系);Samsung Research America(三星美国研究机构);Department of Computer Science, University of Central Florida(中央佛罗里达大学计算机科学系);Department of Health Outcomes and Biomedical Informatics, University of Florida(佛罗里达大学健康结果与生物医学信息学系)

Shangqian Gao, Ting Hua, Reza Shirkavand, Chi-Heng Lin, Zheng Tang, Zhengao Li, Longge Yuan, Fangyi Li, Zeyu Zhang, Alireza Ganjdanesh, Lou Qian, Xu Jie, Yen-Chang Hsu

AI总结:

通过动态结构剪枝将密集大语言模型转换为专家混合架构,提升模型效率与性能。

摘要:

大型语言模型(LLMs)在处理各种复杂任务方面表现出显著的能力。然而,它们巨大的计算和内存成本在资源受限设备上部署或高效服务时带来了重大挑战。先前的方法试图通过永久删除不重要的模型结构来缓解这些问题,但这些方法往往由于永久删除模型参数而导致性能显著下降。在本工作中,我们尝试通过减少活跃参数的数量而不永久删除它们来缓解这一问题。具体而言,我们引入了一种可微的动态剪枝方法,通过将密集模型的MLP层转换为专家混合(MoE)架构,使模型维持固定数量的活跃参数。我们的方法即使在不微调的情况下,也一致在多样化的模型家族中优于先前的结构剪枝技术,包括Phi-2、LLaMA-2、LLaMA-3和Qwen-2.5。

英文摘要:

Large Language Models (LLMs) have demonstrated remarkable abilities in tackling a wide range of complex tasks. However, their huge computational and memory costs raise significant challenges in deploying these models on resource-constrained devices or efficiently serving them. Prior approaches have attempted to alleviate these problems by permanently removing less important model structures, yet these methods often result in substantial performance degradation due to the permanent deletion of model parameters. In this work, we tried to mitigate this issue by reducing the number of active parameters without permanently removing them. Specifically, we introduce a differentiable dynamic pruning method that pushes dense models to maintain a fixed number of active parameters by converting their MLP layers into a Mixture of Experts (MoE) architecture. Our method, even without fine-tuning, consistently outperforms previous structural pruning techniques across diverse model families, including Phi-2, LLaMA-2, LLaMA-3, and Qwen-2.5.

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

↑