arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2402.03289cs.LGcs.AIcs.AR
收藏

让每一步都有价值:基于MCTS的LLM高质量RTL代码生成

Make Every Move Count: LLM-based High-Quality RTL Code Generation Using MCTS

Texas A&M University(德克萨斯农工大学);New York University(纽约大学)

Matthew DeLorenzo, Animesh Basak Chowdhury, Vasudev Gohil, Shailja Thakur, Ramesh Karri, Siddharth Garg, Jeyavijayan Rajendran

AI总结:

针对LLM生成RTL代码时缺乏PPA感知的问题,提出集成MCTS的Transformer解码算法,引导生成可编译、功能正确且PPA优化的代码,在16位加法器上实现面积-延迟积31.8%的改进。

摘要:

现有的用于寄存器传输级(RTL)代码生成的大型语言模型(LLMs)面临编译失败和功耗、性能、面积(PPA)效率次优等挑战。这是由于传统Transformer解码算法缺乏PPA感知能力。为此,我们提出了一种自动化的Transformer解码算法,该算法集成蒙特卡洛树搜索(MCTS)进行前瞻,引导Transformer生成可编译、功能正确且PPA优化的代码。使用微调语言模型在RTL代码集上的实证评估表明,与仅提示方法相比,我们提出的技术能够持续生成功能正确的代码,并有效解决朴素大型语言模型缺乏PPA感知的缺陷。对于由最先进的LLM生成的最大设计(16位加法器),我们的技术可以实现面积-延迟积31.8%的改进。

英文摘要:

Existing large language models (LLMs) for register transfer level code generation face challenges like compilation failures and suboptimal power, performance, and area (PPA) efficiency. This is due to the lack of PPA awareness in conventional transformer decoding algorithms. In response, we present an automated transformer decoding algorithm that integrates Monte Carlo tree-search for lookahead, guiding the transformer to produce compilable, functionally correct, and PPA-optimized code. Empirical evaluation with a fine-tuned language model on RTL codesets shows that our proposed technique consistently generates functionally correct code compared to prompting-only methods and effectively addresses the PPA-unawareness drawback of naive large language models. For the largest design generated by the state-of-the-art LLM (16-bit adder), our technique can achieve a 31.8% improvement in the area-delay product.

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

↑