低成本语言模型:Python代码生成的调研与性能评估
Low-Cost Language Models: Survey and Performance Evaluation on Python Code Generation
AI总结:
本文调研了低成本语言模型在Python代码生成中的性能,提出半手动评估方法、CoT提示策略及60道编程题的新数据集,发现部分低成本模型能以更少资源取得接近ChatGPT的竞争力。
摘要:
大型语言模型(LLMs)因其多功能性及产出高质量结果的能力,已成为许多自然语言处理(NLP)任务的流行选择。具体而言,它们正越来越多地被用于自动代码生成,以帮助开发者处理重复性编码任务。然而,LLMs庞大的计算和内存需求往往使得资源有限的用户难以使用。本文聚焦于极低成本的模型,它们为资源密集型LLMs提供了一种更易获取的替代方案。我们特别地:(1)提出对其在生成Python代码方面的性能进行彻底的半手动评估,(2)引入一种思维链(CoT)提示策略以提升模型推理能力和代码质量,以及(3)提出一个包含60道编程题的新数据集,具有不同难度级别,旨在扩展HumanEval和EvalPlus等现有基准。我们的研究结果表明,一些低成本兼容模型尽管使用的资源显著更少,但与ChatGPT等更大模型相比取得了有竞争力的结果。我们将公开数据集和提示以支持进一步研究。
英文摘要:
Large Language Models (LLMs) have become a popular choice for many Natural Language Processing (NLP) tasks due to their versatility and ability to produce high-quality results. Specifically, they are increasingly used for automatic code generation to help developers tackle repetitive coding tasks. However, LLMs' substantial computational and memory requirements often make them inaccessible to users with limited resources. This paper focuses on very low-cost models which offer a more accessible alternative to resource-intensive LLMs. We notably: (1) propose a thorough semi-manual evaluation of their performance in generating Python code, (2) introduce a Chain-of-Thought (CoT) prompting strategy to improve model reasoning and code quality, and (3) propose a new dataset of 60 programming problems, with varied difficulty levels, designed to extend existing benchmarks like HumanEval and EvalPlus. Our findings show that some low-cost compatible models achieve competitive results compared to larger models like ChatGPT despite using significantly fewer resources. We will make our dataset and prompts publicly available to support further research.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。