越大越好?通过预算重分配改进LLM代码生成
The Larger the Better? Improved LLM Code-Generation via Budget Reallocation
AI总结:
研究相同预算下LLM代码生成模型规模与性能的关系,发现多次运行小模型并利用单元测试筛选可比单次运行大模型获得更高性能增益,但在无单元测试时排序选择效果较差。
摘要:
人们普遍认为大语言模型(LLMs)比小模型更好。然而,大模型在推理时也需要显著更多的时间和计算资源。这引出了一个问题:当两种模型在相同预算下运行时会发生什么?(例如,计算资源、运行时间)。为解决此问题,我们分析了不同规模的代码生成LLMs,并进行了比较,例如运行一次70B模型与从13B模型生成五个输出。我们考虑了一种标准的单元测试设置,可用于从较小模型中选择正确输出。我们的发现表明,重复使用较小模型能产生一致的改进,在五个任务中增益高达15%。另一方面,在无法进行单元测试的场景中,基于排序的方法从较小模型中选择候选输出,其性能不如较大模型的单次输出。我们的结果突出了使用较小模型替代较大模型的潜力,以及研究LLM输出排序方法的重要性。
英文摘要:
It is a common belief that large language models (LLMs) are better than smaller-sized ones. However, larger models also require significantly more time and compute during inference. This begs the question: what happens when both models operate under the same budget? (e.g., compute, run-time). To address this question, we analyze code generation LLMs of various sizes and make comparisons such as running a 70B model once vs. generating five outputs from a 13B model. We consider a standard unit-test setup, which can be used to select the correct output from the smaller model. Our findings reveal that the repeated use of smaller models can yield consistent improvements, with gains of up to 15% across five tasks. On the other hand, in scenarios where unit-tests are unavailable, a ranking-based selection of candidates from the smaller model falls short of the performance of a single output from larger ones. Our results highlight the potential of using smaller models instead of larger ones, and the importance of studying approaches for ranking LLM outputs.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。