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

OriGen:通过代码到代码增强与自反思提升RTL代码生成

OriGen:Enhancing RTL Code Generation with Code-to-Code Augmentation and Self-Reflection

Peking University(北京大学);The Chinese University of Hong Kong(香港中文大学);Shanghai AI Laboratory(上海人工智能实验室)

Fan Cui, Chenyang Yin, Kexing Zhou, Youwei Xiao, Guangyu Sun, Qiang Xu, Qipeng Guo, Demin Song, Dahua Lin, Xingcheng Zhang, Yun, Liang

AI总结:

本文提出开源框架OriGen,通过代码到代码数据增强和基于编译器反馈的自反思机制提升RTL代码生成质量,在VerilogEval-Human上超越GPT-4 Turbo并显著优于其他开源模型。

摘要:

近期研究表明,大型语言模型(LLMs)在生成寄存器传输级(RTL)代码方面具有显著潜力,GPT-4和Claude3-Opus等商业模型展示了显著进展。然而,这些专有LLM常常引发隐私和安全方面的担忧。尽管开源LLM能够解决这些担忧,但它们在RTL代码生成任务中通常表现不如商业模型,主要原因是高质量开源RTL数据集的稀缺。为应对这一挑战,我们提出了OriGen,一个完全开源的框架,融合了自反思能力和一种新颖的数据集增强方法,用于生成高质量、大规模的RTL代码。我们的方法采用代码到代码增强技术来提升开源RTL代码数据集的质量。此外,OriGen能够通过利用编译器反馈的自反思过程来纠正语法错误。实验结果表明,OriGen在RTL代码生成方面显著优于其他开源替代方案。它在VerilogEval-Human基准上的pass@1指标上比此前表现最佳的开源LLM高出12.8%,甚至超过了GPT-4 Turbo。此外,OriGen在自反思和错误纠正方面展现出卓越能力,在用于评估自反思能力的基准上比GPT-4高出19.9%。

英文摘要:

Recent studies have demonstrated the significant potential of Large Language Models (LLMs) in generating Register Transfer Level (RTL) code, with notable advancements showcased by commercial models such as GPT-4 and Claude3-Opus. However, these proprietary LLMs often raise concerns regarding privacy and security. While open-source LLMs offer solutions to these concerns, they typically underperform commercial models in RTL code generation tasks, primarily due to the scarcity of high-quality open-source RTL datasets. To address this challenge, we introduce OriGen , a fully open-source framework that incorporates self-reflection capabilities and a novel dataset augmentation methodology for generating high-quality, large-scale RTL code. Our approach employs a code-tocode augmentation technique to enhance the quality of open-source RTL code datasets. Furthermore, OriGen can rectify syntactic errors through a self-reflection process that leverages compiler feedback. Experimental results demonstrate that OriGen significantly outperforms other open-source alternatives in RTL code generation. It surpasses the previous best-performing open-source LLM by 12.8% and even exceeds GPT-4 Turbo in the pass@1 metric on the VerilogEval-Human benchmark. Moreover, OriGen exhibits superior capabilities in self-reflection and error correction, outperforming GPT-4 by 19.9% on a benchmark designed to evaluate self-reflection capabilities.

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

↑