用推理数据和测试时计算提升芯片代码生成能力
ScaleRTL: Scaling LLMs with Reasoning Data and Test-Time Compute for Accurate RTL Code Generation
- 构建35亿词元的链式思维数据集,支持深度推理
- 测试时迭代反思与自纠错,性能比基线高18.4%
- 适合需要高精度芯片代码生成的研究者
大型语言模型在软件编程任务上已接近人类水平,但在RTL代码生成方面受限于高质量训练数据稀缺。现有方法虽对LLM进行微调,但未能突破数据瓶颈,且缺乏测试时扩展能力。本文提出ScaleRTL,首个面向RTL编码的推理型LLM,通过构建平均56K词元、总计35亿词元的多样化链式思维数据集,覆盖丰富RTL知识。在该语料上微调通用推理模型得到ScaleRTL,具备深层推理能力。进一步设计新型测试时扩展策略,通过迭代反思与自纠正推理步骤,显著提升性能。实验表明,ScaleRTL在VerilogEval和RTLLM基准上均达领先水平,相比18个基线最高提升18.4%和12.7%。
原文摘要 · Abstract (English)
Recent advances in large language models (LLMs) have enabled near-human performance on software coding benchmarks, but their effectiveness in RTL code generation remains limited due to the scarcity of high-quality training data. While prior efforts have fine-tuned LLMs for RTL tasks, they do not fundamentally overcome the data bottleneck and lack support for test-time scaling due to their non-reasoning nature. In this work, we introduce ScaleRTL, the first reasoning LLM for RTL coding that scales up both high-quality reasoning data and test-time compute. Specifically, we curate a diverse set of long chain-of-thought reasoning traces averaging 56K tokens each, resulting in a dataset of 3.5B tokens that captures rich RTL knowledge. Fine-tuning a general-purpose reasoning model on this corpus yields ScaleRTL that is capable of deep RTL reasoning. Subsequently, we further enhance the performance of ScaleRTL through a novel test-time scaling strategy that extends the reasoning process via iteratively reflecting on and self-correcting previous reasoning steps. Experimental results show that ScaleRTL achieves state-of-the-art performance on VerilogEval and RTLLM, outperforming 18 competitive baselines by up to 18.4% on VerilogEval and 12.7% on RTLLM.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。