VeriCoder: Enhancing LLM-Based RTL Code Generation through Functional Correctness Validation

要約

大規模な言語モデル(LLMS)の最近の進歩により、電子設計自動化(EDA)タスク、特にレジスタ転送レベル(RTL)コード生成にそれらを適用することに関心が高まっています。
いくつかのRTLデータセットが導入されていますが、テストでの機能的検証ではなく、構文の妥当性にほとんど焦点を当てているため、意図した動作をコンパイルしていない可能性のあるトレーニング例につながります。
機能的正しさのために検証されたデータセットで微調整されたRTLコード生成のモデルであるVericoderを提示します。
この微調整データセットは、ユニットテストの生成とフィードバック指向の改良を組み合わせた新しい方法論を使用して構築されます。
自然言語の仕様と初期のRTL設計を考慮して、教師モデル(GPT-4O-MINI)にユニットテストを生成し、生成されたテストを使用してシミュレーション結果に基づいてRTL設計を繰り返し修正します。
必要に応じて、教師モデルはテストを更新して、自然言語の仕様に準拠していることを確認します。
このプロセスの結果として、データセットのすべての例は、自然言語の説明、RTLの実装、および合格テストで構成される機能的に検証されています。
125,000を超える例のこのデータセットで微調整されたVericoderは、それぞれ最大71.7%と27.4%の相対的な利益を得て、VerilogevalとRTLLMの機能的正しさで最先端のメトリックを達成します。
アブレーション研究はさらに、機能的に検証されたデータセットでトレーニングされたモデルは、機能的に検証されていないデータセットでトレーニングされたデータを上回ることを示しており、RTLコード生成における高品質のデータセットの重要性を強調しています。

要約(オリジナル)

Recent advances in Large Language Models (LLMs) have sparked growing interest in applying them to Electronic Design Automation (EDA) tasks, particularly Register Transfer Level (RTL) code generation. While several RTL datasets have been introduced, most focus on syntactic validity rather than functional validation with tests, leading to training examples that compile but may not implement the intended behavior. We present VERICODER, a model for RTL code generation fine-tuned on a dataset validated for functional correctness. This fine-tuning dataset is constructed using a novel methodology that combines unit test generation with feedback-directed refinement. Given a natural language specification and an initial RTL design, we prompt a teacher model (GPT-4o-mini) to generate unit tests and iteratively revise the RTL design based on its simulation results using the generated tests. If necessary, the teacher model also updates the tests to ensure they comply with the natural language specification. As a result of this process, every example in our dataset is functionally validated, consisting of a natural language description, an RTL implementation, and passing tests. Fine-tuned on this dataset of over 125,000 examples, VERICODER achieves state-of-the-art metrics in functional correctness on VerilogEval and RTLLM, with relative gains of up to 71.7% and 27.4% respectively. An ablation study further shows that models trained on our functionally validated dataset outperform those trained on functionally non-validated datasets, underscoring the importance of high-quality datasets in RTL code generation.

arxiv情報

著者 Anjiang Wei,Huanmi Tan,Tarun Suresh,Daniel Mendoza,Thiago S. F. X. Teixeira,Ke Wang,Caroline Trippel,Alex Aiken
発行日 2025-04-22 07:32:46+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, Google

カテゴリー: cs.AI, cs.AR, cs.CL, cs.LG, cs.SE パーマリンク