ITERTL: An Iterative Framework for Fine-tuning LLMs for RTL Code Generation

要約

最近、大規模言語モデル (LLM) は、人間の命令を理解してコードを生成する際に優れたパフォーマンスを示しているため、研究者は LLM を使用して RTL コードを生成する可能性を探求するようになりました。
ただし、RTL コード上で LLM を微調整する既存のアプローチは通常、固定データセットに対して行われ、LLM の機能を完全には刺激せず、大量の参照データを必要とします。
これらの問題を軽減するために、ITERTL というシンプルかつ効果的な反復トレーニング パラダイムを導入します。
各反復中に、前のサイクルでトレーニングされたモデルからサンプルが抽出されます。
次に、これらの新しいサンプルがこのループでのトレーニングに使用されます。
この反復的なアプローチを通じて、モデルとトレーニング サンプル間の分布の不一致が減少します。
さらに、モデルはより広範な生成空間を探索し、より包括的なフィードバックを受け取ることができるようになります。
効果のメカニズムを調べるために理論的な分析が行われます。
実験結果は、私たちが提案したアプローチを通じてトレーニングされたモデルが、ほぼ 37\% の参照サンプルを含む最先端 (SOTA) オープンソース モデルと競合、さらにはそれを上回るパフォーマンスを示し、驚異的な 42.9\% および 62.2\% の合格率を達成したことを示しています。
2 つの VerilogEval 評価データセットに対してそれぞれ 1 つのレート。
同量の参照サンプルを使用しながら、我々の方法は、非反復法と比較して、パス@1 で 16.9\% および 12.5\% の相対的な改善を達成できました。
この調査により、データが限られた実際のシナリオで RTL コードを生成するための LLM の適用が容易になります。

要約(オリジナル)

Recently, large language models (LLMs) have demonstrated excellent performance in understanding human instructions and generating code, which has inspired researchers to explore the feasibility of generating RTL code with LLMs. However, the existing approaches to fine-tune LLMs on RTL codes typically are conducted on fixed datasets, which do not fully stimulate the capability of LLMs and require large amounts of reference data. To mitigate these issues , we introduce a simple yet effective iterative training paradigm named ITERTL. During each iteration, samples are drawn from the model trained in the previous cycle. Then these new samples are employed for training in this loop. Through this iterative approach, the distribution mismatch between the model and the training samples is reduced. Additionally, the model is thus enabled to explore a broader generative space and receive more comprehensive feedback. Theoretical analyses are conducted to investigate the mechanism of the effectiveness. Experimental results show the model trained through our proposed approach can compete with and even outperform the state-of-the-art (SOTA) open-source model with nearly 37\% reference samples, achieving remarkable 42.9\% and 62.2\% pass@1 rate on two VerilogEval evaluation datasets respectively. While using the same amount of reference samples, our method can achieved a relative improvement of 16.9\% and 12.5\% in pass@1 compared to the non-iterative method. This study facilitates the application of LLMs for generating RTL code in practical scenarios with limited data.

arxiv情報

著者 Peiyang Wu,Nan Guo,Xiao Xiao,Wenming Li,Xiaochun Ye,Dongrui Fan
発行日 2024-07-23 08:08:45+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, Google

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