arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2308.00708cs.PLcs.LGcs.SE
收藏

VeriGen:一种用于Verilog代码生成的大型语言模型

VeriGen: A Large Language Model for Verilog Code Generation

New York University(纽约大学);University of New South Wales(新南威尔士大学);University of Calgary(卡尔加里大学)

Shailja Thakur, Baleegh Ahmad, Hammond Pearce, Benjamin Tan, Brendan Dolan-Gavitt, Ramesh Karri, Siddharth Garg

AI总结:

本研究探索使用大型语言模型自动化生成Verilog代码,通过在GitHub和教科书数据集上微调CodeGen-16B,使其在功能正确性上超越GPT-3.5-turbo,语法正确率提升41%,证明了小型内部模型在硬件设计中的潜力。

摘要:

在本研究中,我们探索了大型语言模型(LLMs)通过生成高质量Verilog代码来自动化硬件设计的能力,Verilog是用于设计和建模数字系统的常见语言。我们在从GitHub和Verilog教科书编译的Verilog数据集上微调现有的LLMs。我们使用一个专门设计的测试套件来评估生成的Verilog代码的功能正确性,该套件具有自定义问题集和测试平台。在此,我们微调后的开源CodeGen-16B模型以1.1%的整体提升超越了商业最先进的GPT-3.5-turbo模型。在用更多样化和复杂的问题集进行测试时,我们发现微调后的模型与最先进的gpt-3.5-turbo相比表现出竞争性的性能,在某些场景中表现优异。值得注意的是,与预训练的对应模型相比,它在各种问题类别中生成语法正确的Verilog代码方面表现出41%的改进,突显了较小的、内部LLMs在硬件设计自动化中的潜力。

英文摘要:

In this study, we explore the capability of Large Language Models (LLMs) to automate hardware design by generating high-quality Verilog code, a common language for designing and modeling digital systems. We fine-tune pre-existing LLMs on Verilog datasets compiled from GitHub and Verilog textbooks. We evaluate the functional correctness of the generated Verilog code using a specially designed test suite, featuring a custom problem set and testing benches. Here, our fine-tuned open-source CodeGen-16B model outperforms the commercial state-of-the-art GPT-3.5-turbo model with a 1.1% overall increase. Upon testing with a more diverse and complex problem set, we find that the fine-tuned model shows competitive performance against state-of-the-art gpt-3.5-turbo, excelling in certain scenarios. Notably, it demonstrates a 41% improvement in generating syntactically correct Verilog code across various problem categories compared to its pre-trained counterpart, highlighting the potential of smaller, in-house LLMs in hardware design automation.

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

↑