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

基于提示的大语言模型深度剪枝

Prompt-based Depth Pruning of Large Language Models

Juyun Wee, Minjae Park, Jaeho Lee

AI总结:

针对Transformer块重要性随任务变化的问题,提出提示路由动态深度剪枝算法PuDDing,通过轻量路由器按输入提示选剪枝块,在常识推理任务上比静态剪枝加速更优、表现更好。

摘要:

深度剪枝旨在通过直接移除若干次要的Transformer块,在无需任何硬件特定复杂操作的情况下降低大语言模型的推理成本。然而,我们的实证研究结果表明,Transformer块的重要性可能高度依赖任务——对某一任务至关重要的块,在另一任务中被移除后准确率也不会下降。基于这一观察,我们提出了一种动态深度剪枝算法,名为PuDDing(提示路由动态深度剪枝),该算法根据输入提示确定模型中需要省略的块。PuDDing的工作原理是训练一个轻量路由器,从一组候选方案中预测最优省略集合,而该候选集合也是以数据驱动的方式构建的。在常识推理基准上的实验结果表明,PuDDing有效加速了语言模型的推理,且取得了优于静态深度剪枝基线的任务表现。

英文摘要:

Depth pruning aims to reduce the inference cost of a large language model without any hardware-specific complications, by simply removing several less important transformer blocks. However, our empirical findings suggest that the importance of a transformer block may be highly task-dependent -- a block that is crucial for a task can be removed without degrading the accuracy on another task. Based on this observation, we develop a dynamic depth pruning algorithm, coined PuDDing (Prompt-routed Dynamic Depth Pruning), which determines which blocks to omit from the model based on the input prompt. PuDDing operates by training a lightweight router to predict the best omission set among a set of options, where this option set has also been constructed in a data-driven manner. Empirical results on commonsense reasoning benchmarks demonstrate that PuDDing effectively accelerates the inference language models, and achieves better on-task performance than static depth pruning baselines.

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

↑