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内核生成定制dLLMs仍面临挑战,这既受限于高度专业性,也受限于高质量训练数据的严重匮乏。为应对这些挑战,我们构建了CuKe——一个针对高性能CUDA内核优化的增强型监督微调数据集。在此基础上,我们提出了一种双阶段精选强化学习(BiC-RL)框架,包含CUDA内核填充阶段和端到端CUDA内核生成阶段。借助该训练框架,我们推出了DICE——一系列专为CUDA内核生成的扩散大语言模型,涵盖1.7B、4B和8B三种参数规模。在KernelBench上的大量实验表明,DICE显著优于同等规模的自回归和扩散大语言模型,在CUDA内核生成任务上确立了新的最优性能水平。