Customizing a Large Language Model for VHDL Design of High-Performance Microprocessors

Nicolas Dupuis, Ravi Nair, Shyam Ramji, Sean McClintock, Nishant Chauhan, Priyanka Nagpal, Bart Blaner, Ken Valk, Leon Stok, Ruchir PuriarXiv 2025 · DOI

Abstract

IBM researchers have successfully customized a Large Language Model (LLM) to act as an expert assistant for VHDL, a hardware description language critical for high-performance microprocessor design. By combining extended pretraining on proprietary data with efficient model-merging techniques, they boosted the model's code-explanation accuracy from a baseline of 43% to 71%. This work demonstrates a viable path for creating domain-specific AI tools that preserve hardware design expertise while maintaining strict data privacy within a secure cloud environment.

Introduction: The VHDL Skills Gap

While Large Language Models (LLMs) have revolutionized software engineering, their application in hardware design—specifically Register Transfer Level (RTL) coding—has lagged. Most research has focused on Verilog, yet VHDL remains a cornerstone for high-reliability industries like aerospace, automotive, and high-performance computing. IBM’s P-series and Z-series processors, for instance, rely heavily on VHDL.

The industry faces three major hurdles: a shortage of VHDL experts, the extreme sensitivity of microprocessor intellectual property (IP), and the lack of "tribal knowledge" in general-purpose LLMs. This paper presents a methodology to bridge these gaps by transforming a base Granite foundation model into a VHDL domain expert.

Methodology: Secure and Efficient Adaptation

To address privacy concerns, the researchers established a secure end-to-end pipeline within a Private Virtual Private Cloud (VPC) on IBM Cloud. This infrastructure ensures that sensitive design data never leaves the protected environment during training or inference.

Figure 1: The secure end-to-end pipeline for VHDL model training and inference on IBM Cloud.

The transformation process involved two primary stages:

  1. Extended Pretraining (EPT): The model was trained on a curated mix of internal VHDL code and technical documentation. To prevent "catastrophic forgetting"—where the model loses general reasoning capabilities—the team mixed in "replay data" from the model's original training set.
  2. Model Merging (SLERP): Instead of costly instruction tuning for every iteration, the team utilized Spherical Linear Interpolation (SLERP). This technique allowed them to merge the domain-specific knowledge of the EPT model with the instruction-following capabilities of a general-purpose model in minutes rather than hours.

Data Curation and Evaluation

The success of the model hinged on a massive internal dataset and a rigorous evaluation framework. The training data comprised hundreds of millions of tokens across VHDL code, other programming languages, and internal technical documents such as manuals and design specifications.

Table 1: Composition of the proprietary dataset used for extended pretraining.

To evaluate the model, the team developed a specialized benchmark consisting of 80 code-explanation pairs (VHDL snippets with expert explanations) and 263 multiple-choice questions covering digital design and processor microarchitecture. Given the scarcity of Subject Matter Experts (SMEs), they also implemented an "LLM-as-a-Judge" system. This automated judge achieved a 0.93 to 0.99 correlation with human expert scores, significantly accelerating the development cycle.

Results and Key Insights

The customized model showed dramatic improvements in explanation quality. The SME rating for VHDL code explanations rose from a baseline of 43% to 69% after extended pretraining, reaching 71% after instruction tuning. The use of beam search during inference further optimized these results to 77%.

Several key insights emerged from the study:

  • The "Golden Ratio": Optimal performance was achieved with a data mix of 40% replay data, 28% code, and 32% documents. Interestingly, an over-reliance on code data hindered the model's ability to learn conceptual knowledge from documents.
  • Efficiency of Merging: SLERP proved to be a highly effective shortcut, achieving a 67% score in just 10 minutes of compute, nearly matching the 71% achieved by an 18-hour full instruction-tuning run.
  • Reasoning Limits: While the 20B parameter model excelled at explanation, it struggled with complex architectural reasoning in multiple-choice tests. However, testing with newer base models (like Granite 8B and 14B) showed baseline scores as high as 85%, suggesting that the underlying logic of the base model is a critical factor.

Conclusion

This research provides a blueprint for customizing LLMs for specialized hardware design tasks. By combining secure cloud infrastructure, strategic data mixing, and efficient model merging, IBM has created a tool that can onboard new engineers and preserve decades of design expertise. Future work will focus on expanding these capabilities to include automated VHDL code generation and verification, leveraging the latest generation of reasoning-focused LLMs.

Summary updated

Abstract

The use of Large Language Models (LLMs) in hardware design has taken off in recent years, principally through its incorporation in tools that increase chip designer productivity. There has been considerable discussion about the use of LLMs in RTL specifications of chip designs, for which the two most popular languages are Verilog and VHDL. LLMs and their use in Verilog design has received significant attention due to the higher popularity of the language, but little attention so far has been given to VHDL despite its continued popularity in the industry. There has also been little discussion about the unique needs of organizations that engage in high-performance processor design, and techniques to deploy AI solutions in these settings. In this paper, we describe our journey in developing a Large Language Model (LLM) specifically for the purpose of explaining VHDL code, a task that has particular importance in an organization with decades of experience and assets in high-performance processor design. We show how we developed test sets specific to our needs and used them for evaluating models as we performed extended pretraining (EPT) of a base LLM. Expert evaluation of the code explanations produced by the EPT model increased to 69% compared to a base model rating of 43%. We further show how we developed an LLM-as-a-judge to gauge models similar to expert evaluators. This led us to deriving and evaluating a host of new models, including an instruction-tuned version of the EPT model with an expected expert evaluator rating of 71%. Our experiments also indicate that with the potential use of newer base models, this rating can be pushed to 85% and beyond. We conclude with a discussion on further improving the quality of hardware design LLMs using exciting new developments in the Generative AI world.
BibTeX
@misc{dupuis2025customizing,
  author = {Nicolas Dupuis and Ravi Nair and Shyam Ramji and Sean McClintock and Nishant Chauhan and Priyanka Nagpal and Bart Blaner and Ken Valk and Leon Stok and Ruchir Puri},
  title = {{Customizing a Large Language Model for VHDL Design of High-Performance Microprocessors}},
  year = {2025},
  eprint = {2505.09610},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2505.09610},
}
Figure