大语言模型能编写并行代码吗?
Can Large Language Models Write Parallel Code?
AI总结:
该研究针对大语言模型生成复杂并行代码能力不足的问题,构建含420项任务的ParEval基准,提出新评估指标,测试了多款开源与闭源大模型在不同计算问题和并行编程模型下的并行代码生成性能。
摘要:
大语言模型正日益成为软件开发领域的流行工具,其建模与生成源代码的能力已在代码补全、摘要、翻译和查询等多种场景中得到验证,但它们在生成复杂程序的代码时往往存在困难。本文研究了当前最先进的语言模型生成并行代码的能力。为评估语言模型,我们构建了基准测试集ParEval,其中包含对应420项科学计算与并行计算相关编码任务的提示词。我们使用ParEval评估了多款当前最先进的开源与闭源语言模型在这些任务上的表现。我们提出了用于评估生成代码性能的新指标,并借助这些指标探究了各款大语言模型在12种不同计算问题类型、6种不同并行编程模型下的表现水平。
英文摘要:
Large language models are increasingly becoming a popular tool for software development. Their ability to model and generate source code has been demonstrated in a variety of contexts, including code completion, summarization, translation, and lookup. However, they often struggle to generate code for complex programs. In this paper, we study the capabilities of state-of-the-art language models to generate parallel code. In order to evaluate language models, we create a benchmark, ParEval, consisting of prompts that represent 420 different coding tasks related to scientific and parallel computing. We use ParEval to evaluate the effectiveness of several state-of-the-art open- and closed-source language models on these tasks. We introduce novel metrics for evaluating the performance of generated code, and use them to explore how well each large language model performs for 12 different computational problem types and six different parallel programming models.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。