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

仓库结构感知训练使小型语言模型成为更好的问题解决者

Repository Structure-Aware Training Makes SLMs Better Issue Resolver

Microsoft(微软公司);Peking University(北京大学)

Zexiong Ma, Shengnan An, Zeqi Lin, Yanzhen Zou, Bing Xie

AI总结:

本文提出仓库结构感知训练方法 ReSAT,通过构建定位与代码编辑两类训练数据,有效提升小型语言模型在仓库级问题解决和长上下文理解上的能力。

摘要:

语言模型已被应用于各种软件开发任务,但其性能因模型规模而异。大型语言模型(LLMs)在仓库级问题解决等复杂任务中优于小型语言模型(SLMs),但引发了隐私和成本方面的担忧。相比之下,SLMs 更易获取,但在复杂任务中表现不佳。在本文中,我们提出了 ReSAT(Repository Structure-Aware Training,仓库结构感知训练),基于开源社区中大量 issue 及其对应的 pull request 构建训练数据,以增强模型对仓库结构的理解和问题解决能力。我们构建了两种类型的训练数据:(1)定位训练数据,一种多级渐进式定位数据,用于提高代码理解和定位能力;(2)代码编辑训练数据,用于提高基于上下文的代码编辑能力。在 SWE-Bench-verified 和 RepoQA 上的评估结果表明,ReSAT 有效增强了 SLMs 的问题解决能力和仓库级长上下文理解能力。

英文摘要:

Language models have been applied to various software development tasks, but the performance varies according to the scale of the models. Large Language Models (LLMs) outperform Small Language Models (SLMs) in complex tasks like repository-level issue resolving, but raise concerns about privacy and cost. In contrast, SLMs are more accessible but under-perform in complex tasks. In this paper, we introduce ReSAT (Repository Structure-Aware Training), construct training data based on a large number of issues and corresponding pull requests from open-source communities to enhance the model's understanding of repository structure and issue resolving ability. We construct two types of training data: (1) localization training data, a multi-level progressive localization data to improve code understanding and localization capability; (2) code edit training data, which improves context-based code editing capability. The evaluation results on SWE-Bench-verified and RepoQA demonstrate that ReSAT effectively enhances SLMs' issue-resolving and repository-level long-context understanding capabilities.

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

↑