arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2506.04544cs.ARcs.AIcs.LGcs.PL
收藏

hdl2v:用于增强LLM Verilog生成的代码翻译数据集

hdl2v: A Code Translation Dataset for Enhanced LLM Verilog Generation

UC Berkeley(伯克利大学)

Charles Hong, Brendan Roberts, Huijae An, Alex Um, Advay Ratan, Yakun Sophia Shao

AI总结:

本文提出hdl2v数据集,通过将VHDL、Chisel和PyMTL3翻译为Verilog扩充训练数据,使320亿参数模型在VerilogEvalV2上pass@10提升23%,并增强数据增强微调性能63%。

摘要:

大型语言模型(LLMs)在代码生成领域(包括硬件代码生成,其中Verilog是关键语言)中扮演着越来越重要的角色。然而,公开可用的Verilog代码数量与Python等软件语言可用的代码数量相比相形见绌。在这项工作中,我们提出了hdl2v(“HDL到Verilog”)数据集,该数据集旨在通过将其他三种硬件描述语言——VHDL、Chisel和PyMTL3——翻译或编译为Verilog来增加可用的人工编写的Verilog数据量。此外,我们证明了hdl2v在增强LLM Verilog生成方面的价值:在不使用任何数据增强或从更大模型进行知识蒸馏的情况下,将一个320亿参数的开源权重模型在VerilogEvalV2中的性能提高了高达23%(pass@10)。我们还展示了hdl2v能够将基于数据增强的微调方法的性能提升63%。最后,我们对我们的数据集进行了特征描述和分析,以更好地理解HDL到Verilog数据集的哪些特征可以在未来的工作中进行扩展,以获得更好的性能。

英文摘要:

Large language models (LLMs) are playing an increasingly large role in domains such as code generation, including hardware code generation, where Verilog is the key language. However, the amount of publicly available Verilog code pales in comparison to the amount of code available for software languages like Python. In this work, we present hdl2v ("HDL-to-Verilog"), a dataset which seeks to increase the amount of available human-written Verilog data by translating or compiling three other hardware description languages - VHDL, Chisel, and PyMTL3 - to Verilog. Furthermore, we demonstrate the value of hdl2v in enhancing LLM Verilog generation by improving performance of a 32 billion-parameter open-weight model by up to 23% (pass@10) in VerilogEvalV2, without utilizing any data augmentation or knowledge distillation from larger models. We also show hdl2v's ability to boost the performance of a data augmentation-based fine-tuning approach by 63%. Finally, we characterize and analyze our dataset to better understand which characteristics of HDL-to-Verilog datasets can be expanded upon in future work for even better performance.

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

↑