CodeV: マルチレベル要約によるVerilog生成のためのLLM強化
CodeV: Empowering LLMs for Verilog Generation through Multi-Level Summarization
July 15, 2024
著者: Yang Zhao, Di Huang, Chongxiao Li, Pengwei Jin, Ziyuan Nan, Tianyun Ma, Lei Qi, Yansong Pan, Zhenxing Zhang, Rui Zhang, Xishan Zhang, Zidong Du, Qi Guo, Xing Hu, Yunji Chen
cs.AI
要旨
現代のプロセッサ設計における複雑さの増大と高コスト化に伴い、プロセッサ設計自動化への需要が急増しています。命令チューニングされた大規模言語モデル(LLM)は、Pythonのような汎用プログラミング言語のコード自動生成において顕著な性能を発揮しています。しかし、これらの手法はVerilogのようなハードウェア記述言語(HDL)ではうまく機能しません。これは、高品質な命令チューニングデータの不足が原因であり、GPT-3.5のような先進的なLLMでもVerilog生成の性能は限定的です。この問題に関して、我々は以下の観察を行いました。(1) 実世界から収集されたVerilogコードは、LLMが生成したものよりも高品質である。(2) GPT-3.5のようなLLMは、Verilogコードを生成するよりも、それを要約することに優れている。これらの観察に基づき、本論文ではCodeVを紹介します。これは、オープンソースの命令チューニングされたVerilog生成LLMのシリーズです。高度なLLMに説明を生成させ、それに対応するコードを取得する代わりに、VerilogコードをLLMにプロンプトとして与え、LLMに多段階の要約を通じて対応する自然言語の説明を生成させます。実験結果は、CodeVが以前のオープンソースのSOTA(VerilogEvalのBetterV)を14.4%、RTLLMのRTLCoderを11.3%それぞれ上回り、またVerilogEvalにおいて以前の商用SOTAであるGPT-4を22.1%上回ることを示しています。
English
The increasing complexity and high costs associated with modern processor
design have led to a surge in demand for processor design automation.
Instruction-tuned large language models (LLMs) have demonstrated remarkable
performance in automatically generating code for general-purpose programming
languages like Python. However, these methods fail on hardware description
languages (HDLs) like Verilog due to the scarcity of high-quality instruction
tuning data, as even advanced LLMs like GPT-3.5 exhibit limited performance on
Verilog generation. Regarding this issue, we observe that (1) Verilog code
collected from the real world has higher quality than those generated by LLMs.
(2) LLMs like GPT-3.5 excel in summarizing Verilog code rather than generating
it. Based on these observations, this paper introduces CodeV, a series of
open-source instruction-tuned Verilog generation LLMs. Instead of generating
descriptions first and then getting the corresponding code from advanced LLMs,
we prompt the LLM with Verilog code and let the LLM generate the corresponding
natural language description by multi-level summarization. Experimental results
show that CodeV relatively surpasses the previous open-source SOTA by 14.4%
(BetterV in VerilogEval) and 11.3% (RTLCoder in RTLLM) respectively, and also
relatively outperforms previous commercial SOTA GPT-4 by 22.1% in VerilogEval.Summary
AI-Generated Summary