arXiv:2412.06947cs.ARcs.AI2024-12被引 26

构建分层Verilog数据集,提升大模型生成代码的准确率

PyraNet: A Multi-Layered Hierarchical Dataset for Verilog

  • 设计多层级结构数据集PyraNet,专为Verilog代码优化
  • 相较基线模型代码正确率提升最高32.6%
  • 适合硬件开发与AI辅助编码研究者使用

近年来,利用大语言模型生成Verilog代码受到关注,但生成质量仍不理想。主要原因是缺乏高质量、结构清晰的专用数据集,以及针对Verilog的创新微调方法和模型。本文提出一个开源的多层级分层数据集PyraNet及配套微调技术。实验表明,采用该数据集和微调方法可显著提升模型准确性,生成的Verilog代码在语法和功能上均正确。在VerilogEval评估平台上,相比CodeLlama-7B基线模型,准确率提升最高达32.6%;相较于现有最先进模型,提升最高达16.7%。

原文摘要 · Abstract (English)

Recently, there has been a growing interest in leveraging Large Language Models for Verilog code generation. However, the current quality of the generated Verilog code remains suboptimal. This is largely due to the absence of well-defined, well-organized datasets with high-quality samples, as well as a lack of innovative fine-tuning methods and models specifically trained on Verilog. In this paper, we introduce a novel open-source dataset and a corresponding fine-tuning technique, which utilizes a multi-layered structure that we refer to as PyraNet. Our experiments demonstrate that employing the proposed dataset and fine-tuning approach leads to a more accurate fine-tuned model, producing syntactically and functionally correct Verilog code. The evaluation results show improvements by up-to $32.6\%$ in comparison to the CodeLlama-7B baseline model and up-to $16.7\%$ in comparison to the state-of-the-art models using VerilogEval evaluation platform.

Verilog代码生成大模型数据集

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。