强-弱模型协作进行仓库级代码生成的实证研究
An Empirical Study on Strong-Weak Model Collaboration for Repo-level Code Generation
AI总结:
本研究实证评估了强-弱模型在仓库级代码生成中的多种协作策略,发现最优策略可保持性能并降低40%成本,为预算受限场景提供了选择指南。
摘要:
我们研究了在仓库级代码生成任务中,强模型与弱模型之间成本高效的协作方式,其中弱模型以较低成本处理较简单的任务,而最具挑战性的任务则交由强模型完成。尽管许多工作提出了针对该任务的架构,但很少有研究分析性能与成本之间的关系。我们在GitHub问题解决任务上评估了广泛的协作策略:基于上下文的、基于流程的和动态的。我们最高效的协作策略在性能上与强模型相当,同时将成本降低了40%。基于我们的发现,我们提供了在不同预算和性能约束下选择协作策略的可行指南。我们的结果表明,强-弱协作以极低的成本大幅提升了弱模型的性能,其中基于流程和基于上下文的方法最为高效。我们已在https://github.com/shubhamrgandhi/codegen-strong-weak-collab发布了我们的代码。
英文摘要:
We study cost-efficient collaboration between strong and weak language models for repository-level code generation, where the weak model handles simpler tasks at lower cost, and the most challenging tasks are delegated to the strong model. While many works propose architectures for this task, few analyze performance relative to cost. We evaluate a broad spectrum of collaboration strategies: context-based, pipeline-based, and dynamic, on GitHub issue resolution. Our most effective collaborative strategy achieves equivalent performance to the strong model while reducing the cost by 40%. Based on our findings, we offer actionable guidelines for choosing collaboration strategies under varying budget and performance constraints. Our results show that strong-weak collaboration substantially boosts the weak model's performance at a fraction of the cost, pipeline and context-based methods being most efficient. We release the code for our work at https://github.com/shubhamrgandhi/codegen-strong-weak-collab.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。