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

LLM-Rank:一种基于图论的大语言模型剪枝方法

LLM-Rank: A Graph Theoretical Approach to Pruning Large Language Models

Amazon Web Services Research(亚马逊网络服务研究院)

David Hoffmann, Kailash Budhathoki, Matthaeus Kleindessner

AI总结:

针对大语言模型规模与部署成本增长问题,提出基于图论中心性度量的MLPRank剪枝方法(针对多层感知机)及扩展至仅解码器Transformer的LLMRank,结合均匀剪枝实现结构化稀疏,相比基线显著提升准确率保留率。

摘要:

大语言模型不断发展的能力伴随着模型规模和部署成本的增长,因此需要有效的推理优化技术。我们提出了一种新颖的剪枝方法,利用图论中的中心性度量,减少这些模型的计算需求和内存占用。具体而言,我们设计了一种为多层感知机创建加权有向无环图表示的方法,对其应用加权PageRank中心性度量的修改版本来计算节点重要性得分。结合均匀剪枝,这会产生结构化稀疏性,我们将此剪枝方法称为MLPRank。此外,我们还引入了针对仅解码器Transformer模型的扩展版本,称为LLMRank。两种变体均表现出强劲性能:MLPRank相比三种流行基线平均多保留6.09%的准确率,LLMRank相比两种流行基线平均多保留13.42%的准确率。代码可在https://github.com/amazon-science/llm-rank-pruning获取。

英文摘要:

The evolving capabilities of large language models are accompanied by growing sizes and deployment costs, necessitating effective inference optimisation techniques. We propose a novel pruning method utilising centrality measures from graph theory, reducing both the computational requirements and the memory footprint of these models. Specifically, we devise a method for creating a weighted directed acyclical graph representation of multilayer perceptrons to which we apply a modified version of the weighted PageRank centrality measure to compute node importance scores. In combination with uniform pruning this leads to structured sparsity. We call this pruning method MLPRank. Furthermore we introduce an extension to decoder-only transformer models and call it LLMRank. For both variants we demonstrate a strong performance. With MLPRank on average leading to 6.09 % higher accuracy retention than three popular baselines and 13.42 % with LLMRank compared to two popular baselines. Code is available at https://github.com/amazon-science/llm-rank-pruning.

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

↑