通过动态结构剪枝将密集大语言模型转换为专家混合架构
ToMoE: Converting Dense Large Language Models to Mixture-of-Experts through Dynamic Structural Pruning
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分析而来,可能存在错误,请以论文正文为准。