The automatic generation of RTL code (e.g., Verilog) using natural language instructions and large language models (LLMs) has attracted significant research interest recently. However, most existing approaches heavily rely on commercial LLMs such as ChatGPT, while open-source LLMs tailored for this specific design generation task exhibit notably inferior performance. The absence of high-quality open-source solutions restricts the flexibility and data privacy of this emerging technique. In this study, we present a new customized LLM solution with a modest parameter count of only 7B, achieving better performance than GPT-3.5 on two representative benchmarks for RTL code generation. This remarkable balance between accuracy and efficiency is made possible by leveraging our new RTL code dataset and a customized LLM algorithm, both of which will be made fully open-source. Furthermore, we have successfully quantized our LLM to 4-bit with a total size of 4GB, enabling it to function on a single laptop with only slight performance degradation. This efficiency allows the RTL generator to serve as a local assistant for engineers, ensuring all design privacy concerns are addressed.
翻译:利用自然语言指令和大型语言模型(LLMs)自动生成RTL代码(例如Verilog)近期引起了广泛研究兴趣。然而,现有方法大多严重依赖ChatGPT等商业LLMs,而针对该特定设计生成任务定制的开源LLMs表现明显较差。高质量开源解决方案的缺失限制了这一新兴技术的灵活性和数据隐私保护。在本研究中,我们提出了一种参数规模仅为7B的新型定制LLM方案,在两个代表性RTL代码生成基准测试中取得了优于GPT-3.5的性能表现。这种精度与效率的显著平衡得益于我们新构建的RTL代码数据集和定制的LLM算法,这两项成果将完全开源。此外,我们成功将LLM量化为4比特,总大小仅4GB,使其能在单台笔记本电脑上运行且性能仅有轻微下降。这种高效性使RTL生成器可作为工程师的本地助手,充分解决所有设计隐私问题。