DeepRTL:用统一表示模型桥接Verilog理解与生成
DeepRTL: Bridging Verilog Understanding and Generation with a Unified Representation Model
AI总结:
针对Verilog理解与生成中自然语言与代码对齐弱的问题,提出基于CodeT5+的统一模型DeepRTL,结合多级描述数据集与课程学习,在理解上超越GPT-4,生成上与o1-preview持平。
摘要:
大型语言模型(LLM)的最新进展显示出从高级自然语言指令自动生成硬件描述语言(HDL)代码的巨大潜力。虽然微调提高了LLM在硬件设计任务中的性能,但之前的努力主要集中在Verilog生成上,忽视了同样关键的Verilog理解任务。此外,现有模型在自然语言描述与Verilog代码之间的对齐较弱,阻碍了高质量、可综合设计(synthesizable designs)的生成。为解决这些问题,我们提出了DeepRTL,一种在Verilog理解和生成方面均表现优异的统一表示模型。基于CodeT5+,DeepRTL在一个将Verilog代码与丰富的多级自然语言描述对齐的综合数据集上进行了微调。我们还引入了首个Verilog理解基准,并率先应用嵌入相似度(embedding similarity)和GPT Score来评估模型的理解能力。这些指标比BLEU和ROUGE等传统方法更准确地捕捉语义相似性,后者仅限于表面级别的n-gram重叠。通过采用课程学习(curriculum learning)来训练DeepRTL,我们使其在Verilog理解任务上显著优于GPT-4,同时在Verilog生成任务上达到与OpenAI的o1-preview模型相当的性能。
英文摘要:
Recent advancements in large language models (LLMs) have shown significant potential for automating hardware description language (HDL) code generation from high-level natural language instructions. While fine-tuning has improved LLMs' performance in hardware design tasks, prior efforts have largely focused on Verilog generation, overlooking the equally critical task of Verilog understanding. Furthermore, existing models suffer from weak alignment between natural language descriptions and Verilog code, hindering the generation of high-quality, synthesizable designs. To address these issues, we present DeepRTL, a unified representation model that excels in both Verilog understanding and generation. Based on CodeT5+, DeepRTL is fine-tuned on a comprehensive dataset that aligns Verilog code with rich, multi-level natural language descriptions. We also introduce the first benchmark for Verilog understanding and take the initiative to apply embedding similarity and GPT Score to evaluate the models' understanding capabilities. These metrics capture semantic similarity more accurately than traditional methods like BLEU and ROUGE, which are limited to surface-level n-gram overlaps. By adapting curriculum learning to train DeepRTL, we enable it to significantly outperform GPT-4 in Verilog understanding tasks, while achieving performance on par with OpenAI's o1-preview model in Verilog generation tasks.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。