arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2310.04963cs.AI
收藏

LLM4VV: 开发用于编译器验证的LLM驱动测试套件

LLM4VV: Developing LLM-Driven Testsuite for Compiler Validation

University of Delaware(特拉华大学)

Christian Munley, Aaron Jarmusch, Sunita Chandrasekaran

AI总结:

本研究开发LLM驱动的OpenACC编译器验证测试套件,探究多款主流开源与闭源LLM的代码生成能力,通过微调、多种提示工程技术生成超5000个测试,发现Deepseek-Coder-33b-Instruct生成的通过测试数最多。

摘要:

大语言模型(LLM)是一种应用于自然语言相关广泛场景的新型强大工具,展现出令人瞩目的代码生成能力。本研究的目标是自动生成测试用例,并利用这些测试用例验证和核验基于指令的并行编程范式OpenACC的编译器实现。为此,本文探究了当前最先进LLM的能力,涵盖开源LLM——Meta Codellama、Codellama的Phind微调版本、Deepseek Deepseek Coder,以及闭源LLM——OpenAI GPT-3.5-Turbo和GPT-4-Turbo。我们使用自研测试套件数据集结合OpenACC规范,进一步微调了上述开源LLM以及GPT-3.5-Turbo。我们还通过多种提示工程技术对这些LLM进行了探究,包括代码模板、带检索增强生成(RAG)的模板、单样本示例、带RAG的单样本、结合代码模板与RAG的表达型提示。本文展示了我们通过上述所有方法生成的5000余个测试用例的研究发现。我们的贡献包括:(a) 探究最新相关LLM的代码生成能力,(b) 研究微调和提示方法,(c) 分析LLM生成测试用例的结果,包括对代表性测试集的人工分析。我们发现Deepseek-Coder-33b-Instruct模型生成的通过测试数量最多,GPT-4-Turbo紧随其后。

英文摘要:

Large language models (LLMs) are a new and powerful tool for a wide span of applications involving natural language and demonstrate impressive code generation abilities. The goal of this work is to automatically generate tests and use these tests to validate and verify compiler implementations of a directive-based parallel programming paradigm, OpenACC. To do so, in this paper, we explore the capabilities of state-of-the-art LLMs, including open-source LLMs -- Meta Codellama, Phind fine-tuned version of Codellama, Deepseek Deepseek Coder and closed-source LLMs -- OpenAI GPT-3.5-Turbo and GPT-4-Turbo. We further fine-tuned the open-source LLMs and GPT-3.5-Turbo using our own testsuite dataset along with using the OpenACC specification. We also explored these LLMs using various prompt engineering techniques that include code template, template with retrieval-augmented generation (RAG), one-shot example, one-shot with RAG, expressive prompt with code template and RAG. This paper highlights our findings from over 5000 tests generated via all the above mentioned methods. Our contributions include: (a) exploring the capabilities of the latest and relevant LLMs for code generation, (b) investigating fine-tuning and prompt methods, and (c) analyzing the outcome of LLMs generated tests including manually analysis of representative set of tests. We found the LLM Deepseek-Coder-33b-Instruct produced the most passing tests followed by GPT-4-Turbo.

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

↑