arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2501.05248cs.LGcs.AIcs.SE
收藏

使用资源高效剪枝从 LLM 中派生编码专用子模型

Deriving Coding-Specific Sub-Models from LLMs using Resource-Efficient Pruning

NVIDIA(英伟达);KTH Royal Institute of Technology(皇家理工学院);RISE AB(RISE AB公司)

Laura Puccioni, Alireza Farshin, Mariano Scazzariello, Changjie Wang, Marco Chiesa, Dejan Kostic

AI总结:

提出用 Wanda 非结构化剪枝和领域校准数据,从 LLM 中高效提取 Python、Java、C++、JavaScript 编码专用子模型,并验证不同任务激活不同模型区域。

摘要:

大语言模型(LLM)已在各种复杂代码生成任务中展现出卓越性能。然而,其更广泛的采用受到巨大计算需求和高资源要求(尤其是内存和处理能力)的限制。为缓解这些需求,模型剪枝技术被用于创建参数显著更少的更紧凑模型。但是,当前方法并未关注高效提取编程语言专用子模型。在本工作中,我们探索通过非结构化剪枝(即 Wanda)高效派生编码专用子模型的思路。我们研究了三个不同领域中不同领域专用校准数据集对剪枝结果的影响,并将分析扩展到提取四种语言专用子模型:Python、Java、C++ 和 JavaScript。我们首次使用适当的校准数据集高效提取编程语言专用子模型,同时相对于完整模型保持可接受的准确率。我们还首次提供分析证据,表明领域专用任务会激活 LLM 内部的不同区域,从而支持通过非结构化剪枝创建专用子模型。我们相信,本工作在增强编码场景下 LLM 的可及性方面具有巨大潜力:通过降低计算需求,使模型能够在消费级硬件上本地执行,并支持对实时开发反馈至关重要的更快推理时间。

英文摘要:

Large Language Models (LLMs) have demonstrated their exceptional performance in various complex code generation tasks. However, their broader adoption is limited by significant computational demands and high resource requirements, particularly memory and processing power. To mitigate such requirements, model pruning techniques are used to create more compact models with significantly fewer parameters. However, current approaches do not focus on the efficient extraction of programming-language-specific sub-models. In this work, we explore the idea of efficiently deriving coding-specific sub-models through unstructured pruning (i.e., Wanda). We investigate the impact of different domain-specific calibration datasets on pruning outcomes across three distinct domains and extend our analysis to extracting four language-specific sub-models: Python, Java, C++, and JavaScript. We are the first to efficiently extract programming-language-specific sub-models using appropriate calibration datasets while maintaining acceptable accuracy w.r.t. full models. We are also the first to provide analytical evidence that domain-specific tasks activate distinct regions within LLMs, supporting the creation of specialized sub-models through unstructured pruning. We believe that this work has significant potential to enhance LLM accessibility for coding by reducing computational requirements to enable local execution on consumer-grade hardware, and supporting faster inference times critical for real-time development feedback.

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

↑