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

面向大语言模型的指令遵循剪枝

Instruction-Following Pruning for Large Language Models

Apple AI/ML(苹果人工智能/机器学习)

Bairu Hou, Qibin Chen, Jianyu Wang, Guoli Yin, Chong Wang, Nan Du, Ruoming Pang, Shiyu Chang, Tao Lei

AI总结:

本文提出指令遵循剪枝方法,通过稀疏掩码预测器根据用户指令动态选择模型参数,联合优化预测器与LLM,使3B激活模型超越3B稠密模型并媲美9B模型性能。

摘要:

随着大语言模型(LLMs)规模的快速扩展,结构化剪枝已成为一种广泛使用的技术,用于从较大的模型中学习高效、更小的模型,其性能优于从头训练同等规模模型。在本文中,我们超越了传统的静态剪枝方法——即为模型确定一个固定的剪枝掩码——并提出了一种动态的结构化剪枝方法。在我们的方法中,剪枝掩码依赖于输入,并根据用户指令中描述的信息动态自适应。我们的方法被称为“指令遵循剪枝”,引入了一个稀疏掩码预测器,该预测器以用户指令为输入,动态地为给定任务选择最相关的模型参数。为了识别并激活有效的参数,我们联合优化稀疏掩码预测器和LLM,同时利用指令遵循数据和预训练语料库。实验结果表明,我们的方法在广泛的评估基准上具有有效性。例如,我们激活的3B模型在数学和编程等领域比3B稠密模型提高了5-8个绝对百分点,并且性能可与9B模型相媲美。

英文摘要:

With the rapid scaling of large language models (LLMs), structured pruning has become a widely used technique to learn efficient, smaller models from larger ones, delivering superior performance compared to training similarly sized models from scratch. In this paper, we move beyond the traditional static pruning approach of determining a fixed pruning mask for a model, and propose a dynamic approach to structured pruning. In our method, the pruning mask is input-dependent and adapts dynamically based on the information described in a user instruction. Our approach, termed "instruction-following pruning", introduces a sparse mask predictor that takes the user instruction as input and dynamically selects the most relevant model parameters for the given task. To identify and activate effective parameters, we jointly optimize the sparse mask predictor and the LLM, leveraging both instruction-following data and the pre-training corpus. Experimental results demonstrate the effectiveness of our approach on a wide range of evaluation benchmarks. For example, our 3B activated model improves over the 3B dense model by 5-8 points of absolute margin on domains such as math and coding, and rivals the performance of a 9B model.

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

↑