A Multi-Expert Large Language Model Architecture for Verilog Code Generation

Bardia Nadimi,Hao Zheng
2024-04-12
Abstract:Recently, there has been a surging interest in using large language models (LLMs) for Verilog code generation. However, the existing approaches are limited in terms of the quality of the generated Verilog code. To address such limitations, this paper introduces an innovative multi-expert LLM architecture for Verilog code generation (MEV-LLM). Our architecture uniquely integrates multiple LLMs, each specifically fine-tuned with a dataset that is categorized with respect to a distinct level of design complexity. It allows more targeted learning, directly addressing the nuances of generating Verilog code for each category. Empirical evidence from experiments highlights notable improvements in terms of the percentage of generated Verilog outputs that are syntactically and functionally correct. These findings underscore the efficacy of our approach, promising a forward leap in the field of automated hardware design through machine learning.
Machine Learning,Artificial Intelligence,Programming Languages,Software Engineering
What problem does this paper attempt to address?
The problem this paper attempts to address is the limitations of existing methods in generating high-quality Verilog code. Specifically, existing large language models (LLMs) often produce Verilog code with syntax and functional errors. These issues are mainly due to: 1. **Dataset limitations**: Limited annotated data for efficient fine-tuning of LLMs. 2. **Insufficient fine-tuning methods**: Relatively few innovative fine-tuning methods in the field of hardware code generation. To address these issues, the paper proposes a new multi-expert LLM architecture (MEV-LLM), which improves the quality of generated Verilog code by fine-tuning multiple LLMs for different levels of design complexity. This multi-expert architecture can more accurately identify and handle designs of varying complexity, resulting in more accurate code generation. Experimental results show that MEV-LLM significantly improves the generation of correct and functionally complete Verilog code compared to existing state-of-the-art methods.