NVIDIA fine-tuned 6.7B and 15B code models that beat GPT-4o at writing Verilog
Made by Mingjie Liu and three co-authors
The result
The story
Hardware written as code
Chips are designed in languages such as Verilog, code that describes circuits and is checked in simulation. The NVIDIA authors note that there is far less public Verilog than Python to learn from. The job: read a description, sometimes with a truth table, state diagram or waveform, and write a module that passes the benchmark’s testbench.

Three kinds of training data
NVIDIA’s own Nemotron-4-340B-Instruct wrote 80.1k problems and solutions. Models trained on them struggled with tables and diagrams and made small slips, so the team added 28.5k examples generated by program, correct by construction, and 1.4k repair exercises built from error reports on the benchmark problems.
Data
CraftRTL data
110.0k examples: 80.1k synthetic, 28.5k correct-by-construction, 1.4k repair
Nemotron-4-340B-Instruct, program generators and open-source code
Decontaminated against the benchmarks; the generation code is public, the data is not.
Small model
DeepSeek-Coder-6.7B + CraftRTL data
6.7B · NVIDIA
Full fine-tune on the 110k examples
- Base
- deepseek-coder-6.7b-instruct (DeepSeek)
Training
Full fine-tune, 1 epoch, learning rate 5e-5, batch 256
Not reported: time and cost.
The test
Evaluation
156 problems (Machine 143, RTLLM v1.1 29)
- Test set
- VerilogEval-Human (hand-written descriptions); also VerilogEval-Machine and RTLLM v1.1
- Metric
- pass@1: the module must pass the testbench in a simulator (20 samples per problem)
- How it was compared
- Same problems, prompts and testbenches for all; GPT-4o got a Verilog-designer system prompt, snapshot not stated.
Large model
GPT-4o
Size not disclosed · OpenAI
Used as released, with a Verilog-designer system prompt
The 6.7B fine-tune passed 65.4% of VerilogEval-Human problems on the first try, against 57.1% for GPT-4o and 30.2% before fine-tuning; StarCoder2-15B, trained on the same data, reached 68.0%. On RTLLM v1.1 the gap was wider: 53.1% against 33.8%.
No cost, latency or energy figures are given, and the fine-tuned weights were not released.
All the numbers
Show all numbersHide all numbersEvery model · Cost, latency and energy · 9 more results
Every model on the headline test
Cost, latency and energy, as reported
- Cost
- Not reported
- Latency
- Not reported
- Energy
- Not reported
More from the source
VerilogEval-Human pass@1
StarCoder2-15B fine-tune 68Large model 57.1 %
Table 4
VerilogEval-Human pass@1
CodeLlama-7B fine-tune 63.1Large model 57.1 %
Table 4
VerilogEval-Machine pass@1
Small model 77.8Large model 65.9 %
StarCoder2-15B fine-tune: 81.9.
Table 4
RTLLM v1.1 functional pass@1
Small model 53.1Large model 33.8 %
StarCoder2-15B fine-tune: 49.0; CodeLlama-7B fine-tune: 42.6.
Table 5
RTLLM v1.1 syntax pass@1
Small model 84.3Large model 50.3 %
Table 5
VerilogEval-Human pass@10
Small model 72.1Large model 66.7 %
Table 4
VerilogEval-Human pass@1
Small model 65.4Llama-3.1 405B 53.8 %
On RTLLM functional pass@1, Llama-3.1 405B scores 38.9.
Table 4
VerilogEval-Human pass@1
Small model 65.4DeepSeek-Coder-V2 236B 56.4 %
On RTLLM functional pass@1, DeepSeek-Coder-V2 236B scores 34.5.
Table 4
VerilogEval-Human pass@1, before fine-tuning
DeepSeek-Coder 6.7B (untuned) 30.2 %
Untuned RTLLM functional pass@1: 23.1 (Table 5).
Table 4
Worth knowing
- GPT-4o (57.1) was ahead of every earlier Verilog-specific fine-tune on VerilogEval-Human pass@1 in Table 4; only the new CraftRTL fine-tunes beat it.
- Much of the training data was written by a large model (Nemotron-4-340B-Instruct, also NVIDIA’s), so the small models learned partly from a large one.
- GPT-4o’s snapshot date is not stated; the comparison reflects the GPT-4o available in 2024.
- No cost, latency or energy figures, so this case supports quality only.
3 more caveats
- The repair data was derived from error reports on the benchmark problems themselves (the errors were re-created in other open-source code, and the data decontaminated), so the benchmarks informed the training data indirectly.
- Reported scores are the best of two sampling temperatures, for every model.
- The fine-tuned weights were not released; only the data-generation pipeline is public.
Weights on Hugging Face
The fine-tuned weights are not on Hugging Face (search on 03 Oct 2026 found no CraftRTL repos); NVIDIA released the data-generation pipeline on GitHub (NVlabs/CraftRTL). Base model verified: https://huggingface.co/deepseek-ai/deepseek-coder-6.7b-instruct
Sources
- Mingjie Liu, Yun-Da Tsai, Wenfei Zhou, Haoxing Ren (NVIDIA), ‘CraftRTL: High-quality Synthetic Data Generation for Verilog Code Models with Correct-by-Construction Non-Textual Representations and Targeted Code Repair’, arXiv:2409.12993 (Tables 4 and 5)
- Same paper in the ICLR 2025 proceedings
- Data-generation pipeline, GitHub (NVlabs/CraftRTL)
- Base model DeepSeek-Coder-6.7B-Instruct, Hugging Face
- arXiv v1; the same tables appear in v2 (6 Feb 2025) and in the ICLR 2025 proceedings.

