ConCuR:简洁性成就最先进的核函数生成
ConCuR: Conciseness Makes State-of-the-Art Kernel Generation
AI总结:
针对高质量核函数数据稀缺问题,提出ConCuR流水线生成并筛选带简洁推理轨迹的CUDA核函数,训练模型KernelCoder,在KernelBench上超越现有最优模型,并发现平均推理长度可评估任务难度。
摘要:
利用大语言模型(LLM)进行GPU核函数生成近年来发展迅速,这得益于测试时扩展和强化学习技术的应用。然而,核函数生成面临的一个关键挑战是高质量数据的稀缺,因为大多数高质量核函数都是专有的且未开源。这一挑战阻碍了我们利用监督微调来使LLM适应核函数生成任务。为解决这一挑战,我们开发了一个流水线,用于生成并筛选带有推理轨迹的高质量CUDA核函数,其动机源于一个关键观察:简洁而信息丰富的推理轨迹能够带来高性能核函数的稳健生成。利用该流水线,我们构建了数据集ConCuR,并推出了我们的模型KernelCoder,据我们所知,这是首个在由PyTorch、推理和CUDA核函数对组成的精选数据集上训练的模型。在KernelBench设置中,我们的模型相较于现有最优模型QwQ-32B取得了显著改进,并超越了所有为核函数生成而微调的开源模型,以及诸如DeepSeek-V3.1-Think和Claude-4-sonnet等前沿模型。最后,我们展示了平均推理长度可以作为评估核函数生成任务难度的指标。这些观察、指标以及我们的数据收集和筛选流水线,有助于在未来核函数生成任务中获得更好的数据。
英文摘要:
GPU kernel generation by LLMs has recently experienced rapid development, leveraging test-time scaling and reinforcement learning techniques. However, a key challenge for kernel generation is the scarcity of high-quality data, as most high-quality kernels are proprietary and not open-source. This challenge prevents us from leveraging supervised fine-tuning to align LLMs to the kernel generation task. To address this challenge, we develop a pipeline that generates and curates high-quality CUDA kernels with reasoning traces, motivated by a critical observation that concise yet informative reasoning traces result in robust generation of high-performance kernels. Using this pipeline, we construct our dataset ConCuR and introduce our model KernelCoder, which is the first model trained on a curated dataset consisting of PyTorch, reasoning, and CUDA kernel pairs, to our knowledge. In the KernelBench setup, our model achieves significant improvements over the existing top-performing model, QwQ-32B, and outperforms all open-source models fine-tuned for kernel generation, as well as frontier models such as DeepSeek-V3.1-Think and Claude-4-sonnet. Finally, we show that the average reasoning length can serve as a metric to assess the difficulty of kernel generation tasks. The observations, metrics, and our data collection and curation pipeline can help obtain better data in the kernel generation task in the future.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。