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.
The transformation process involved two primary stages:
- 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.
- 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.
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