罗马非一日建成:面向基于LLM的芯片设计的分层提示
Rome was Not Built in a Single Step: Hierarchical Prompting for LLM-based Chip Design
AI总结:
针对LLM生成复杂HDL的难题,本文提出分层提示与自动化流水线,使小型开源模型达到大型专有模型水平,并首次无人工反馈设计出处理器。
摘要:
大语言模型(LLM)通过硬件描述语言(HDL)生成,在计算机硬件综合中表现有效。然而,用于HDL生成的LLM辅助方法在处理复杂任务时会遇到困难。我们介绍了一套分层提示技术,这些技术促进高效的逐步设计方法,并为该过程开发了可泛化的自动化流水线。为评估这些技术,我们提出了一个硬件设计基准集,其中的设计方案有的具有架构层次,有的没有。利用这些基准,我们比较了多种开源和专有LLM,包括我们自己微调的Code Llama-Verilog模型。我们的分层方法能够自动为复杂硬件模块生成成功设计,而标准的扁平提示方法无法实现这一点,这使较小的开源LLM能够与大型专有模型竞争。分层提示减少了HDL生成时间,并节省了LLM成本。我们的实验详细说明了哪些LLM能够胜任哪些应用,以及如何在各种模式下应用分层方法。我们探索了使用自动脚本化分层提示生成复杂内核的案例研究,包括首个完全由LLM设计、没有人类反馈的处理器。Recurrent Optimization via Machine Editing(ROME,通过机器编辑进行循环优化)方法的工具可在https://github.com/ajn313/ROME-LLM找到。
英文摘要:
Large Language Models (LLMs) are effective in computer hardware synthesis via hardware description language (HDL) generation. However, LLM-assisted approaches for HDL generation struggle when handling complex tasks. We introduce a suite of hierarchical prompting techniques which facilitate efficient stepwise design methods, and develop a generalizable automation pipeline for the process. To evaluate these techniques, we present a benchmark set of hardware designs which have solutions with or without architectural hierarchy. Using these benchmarks, we compare various open-source and proprietary LLMs, including our own fine-tuned Code Llama-Verilog model. Our hierarchical methods automatically produce successful designs for complex hardware modules that standard flat prompting methods cannot achieve, allowing smaller open-source LLMs to compete with large proprietary models. Hierarchical prompting reduces HDL generation time and yields savings on LLM costs. Our experiments detail which LLMs are capable of which applications, and how to apply hierarchical methods in various modes. We explore case studies of generating complex cores using automatic scripted hierarchical prompts, including the first-ever LLM-designed processor with no human feedback. Tools for the Recurrent Optimization via Machine Editing (ROME) method can be found at https://github.com/ajn313/ROME-LLM
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。