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

数据即全部所需:通过自动化设计数据增强框架微调用于芯片设计的大语言模型

Data is all you need: Finetuning LLMs for Chip Design via an Automated design-data augmentation framework

Institute of Computing Technology, Chinese Academy of Sciences(中国科学院计算技术研究所);University of Chinese Academy of Sciences(中国科学院大学);Nanjing University(南京大学);Shanghai University(上海大学);Zhejiang University(浙江大学);Shanghai Innovation Center for Processor Technologies(上海处理器技术创新中心);FuDan University(复旦大学);Hangzhou Institute for Advanced Study, University of Chinese Academy of Sciences(中国科学院大学杭州高等研究院);University of Illinois at Urbana Champaign(伊利诺伊大学厄巴纳-香槟分校);Shanghai Jiao Tong University(上海交通大学);Zhejiang Lab(之江实验室)
Kaiyan Chang, Kun Wang, Nan Yang, Ying Wang, Dantong Jin, Wenlong Zhu, Zhirong Chen, Cangyuan Li, Hao Yan, Yunhao Zhou, Zhuoliang Zhao, Yuan Cheng, Yudong Pan, … 展开作者

Kaiyan Chang, Kun Wang, Nan Yang, Ying Wang, Dantong Jin, Wenlong Zhu, Zhirong Chen, Cangyuan Li, Hao Yan, Yunhao Zhou, Zhuoliang Zhao, Yuan Cheng, Yudong Pan, Yiqi Liu, Mengdi Wang, Shengwen Liang, Yinhe Han, Huawei Li, Xiaowei Li

AI总结:

针对芯片设计领域Verilog训练数据不足的问题,提出自动化设计数据增强框架,通过多任务数据生成策略扩充数据集,微调后的Llama2模型在Verilog生成、EDA脚本生成等任务上性能显著提升,超越现有开源模型及GPT-3.5。

摘要:

大语言模型的最新进展已展现出其从高层提示自动生成硬件描述语言(HDL)代码的潜力。研究人员已利用微调技术提升这类大语言模型(LLM)在芯片设计领域的能力。然而,Verilog数据的匮乏阻碍了LLM生成Verilog质量的进一步提升。此外,由于缺乏Verilog与电子设计自动化(EDA)脚本的数据增强框架,LLM训练人员准备训练数据集的时间大幅增加。\n本文提出一种自动化设计数据增强框架,可生成与Verilog和EDA脚本对齐的大规模高质量自然语言数据。针对Verilog生成任务,该框架将Verilog文件转换为抽象语法树,再通过预定义模板将节点映射为自然语言。针对Verilog修复任务,框架利用预定义规则生成错误的Verilog文件,再将EDA工具反馈与正确、错误的Verilog文件配对。针对EDA脚本生成任务,框架使用现有LLM(GPT-3.5)获取脚本的描述信息。\n为评估数据增强方法的有效性,我们使用增强框架生成的数据集微调了Llama2-13B和Llama2-7B模型。结果显示,LLM的Verilog生成任务性能得到显著提升。此外,Verilog生成准确率超过了当前最先进的开源Verilog生成模型,在相同基准下从58.8%提升至70.6%。我们的13B模型(ChipGPT-FT)在Verilog生成任务上的通过率较GPT-3.5有所提升,且仅用200条EDA脚本数据就在EDA脚本(即SiliconCompiler)生成任务上表现更优。

英文摘要:

Recent advances in large language models have demonstrated their potential for automated generation of hardware description language (HDL) code from high-level prompts. Researchers have utilized fine-tuning to enhance the ability of these large language models (LLMs) in the field of Chip Design. However, the lack of Verilog data hinders further improvement in the quality of Verilog generation by LLMs. Additionally, the absence of a Verilog and Electronic Design Automation (EDA) script data augmentation framework significantly increases the time required to prepare the training dataset for LLM trainers. This paper proposes an automated design-data augmentation framework, which generates high-volume and high-quality natural language aligned with Verilog and EDA scripts. For Verilog generation, it translates Verilog files to an abstract syntax tree and then maps nodes to natural language with a predefined template. For Verilog repair, it uses predefined rules to generate the wrong verilog file and then pairs EDA Tool feedback with the right and wrong verilog file. For EDA Script generation, it uses existing LLM(GPT-3.5) to obtain the description of the Script. To evaluate the effectiveness of our data augmentation method, we finetune Llama2-13B and Llama2-7B models using the dataset generated by our augmentation framework. The results demonstrate a significant improvement in the Verilog generation tasks with LLMs. Moreover, the accuracy of Verilog generation surpasses that of the current state-of-the-art open-source Verilog generation model, increasing from 58.8% to 70.6% with the same benchmark. Our 13B model (ChipGPT-FT) has a pass rate improvement compared with GPT-3.5 in Verilog generation and outperforms in EDA script (i.e., SiliconCompiler) generation with only 200 EDA script data.

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

↑