Diffusion large language models (dLLMs) have emerged as a compelling alternative to autoregressive (AR) LLMs, owing to their capacity for parallel token generation. This paradigm is particularly well-suited for code generation, where holistic structural planning and non-sequential refinement are critical. Despite this potential, tailoring dLLMs for CUDA kernel generation remains challenging, obstructed not only by the high specialization but also by the severe lack of high-quality training data. To address these challenges, we construct CuKe, an augmented supervised fine-tuning dataset optimized for high-performance CUDA kernels. On top of it, we propose a bi-phase curated reinforcement learning (BiC-RL) framework consisting of a CUDA kernel infilling stage and an end-to-end CUDA kernel generation stage. Leveraging this training framework, we introduce DICE, a series of diffusion large language models designed for CUDA kernel generation, spanning three parameter scales, 1.7B, 4B, and 8B. Extensive experiments on KernelBench demonstrate that DICE significantly outperforms both autoregressive and diffusion LLMs of comparable scale, establishing a new state-of-the-art for CUDA kernel generation.
翻译:扩散大语言模型(dLLMs)因其并行生成令牌的能力,已成为自回归(AR)大语言模型的一种引人注目的替代方案。该范式特别适用于代码生成,其中整体结构规划和非顺序优化至关重要。尽管具有这种潜力,但为CUDA内核生成定制扩散大语言模型仍然具有挑战性,这不仅受限于其高度专业性,还因高质量训练数据的严重匮乏而受阻。为应对这些挑战,我们构建了CuKe,这是一个为高性能CUDA内核优化的增强型监督微调数据集。在此基础上,我们提出了一个双阶段精选强化学习(BiC-RL)框架,包含CUDA内核填充阶段和端到端CUDA内核生成阶段。利用此训练框架,我们推出了DICE,一系列专为CUDA内核生成设计的扩散大语言模型,涵盖三个参数规模:1.7B、4B和8B。在KernelBench上进行的大量实验表明,DICE显著优于同等规模的自回归和扩散大语言模型,为CUDA内核生成确立了新的最先进水平。