TritonRL: 训练 LLM 以无作弊方式思考和编写 Triton
TritonRL: Training LLMs to Think and Code Triton Without Cheating
AI总结:
TritonRL 通过强化学习框架训练出专门用于 Triton 编程的 8B 级 LLM,实现高正确性和运行时加速,优于现有模型。
摘要:
大型语言模型(LLMs)的快速发展推动了对自动化、高性能系统内核的需求,以加速机器学习工作负载。我们介绍了 TritonRL,一种专门用于 Triton 编程的 8B 级 LLM,通过新颖的强化学习(RL)框架进行训练。尽管 Triton 合成面临数据稀缺和对奖励黑客高度敏感的挑战,我们的方法通过两个主要创新实现了稳健的内核生成。首先,我们实现了多层验证系统,提供高保真的奖励信号,确保生成的内核在语法和功能上都有效。其次,我们提出分层奖励分解(HRD),将强化学习应用于高层推理和低层实现,以解决长序列生成中的信用分配问题。在 KernelBench 上的全面评估表明,TritonRL 在正确性和运行时加速方面达到最先进的水平,优于同时期的 Triton 特定模型,并与参数超过 100B 的前沿模型相媲美。我们的结果突显了硬件感知 RL 方案在专门领域适应中的有效性。
英文摘要:
The rapid evolution of Large Language Models (LLMs) has driven a growing demand for automated, high-performance system kernels to accelerate machine learning workloads. We introduce TritonRL, a domain-specialized 8B-scale LLM for Triton programming, trained via a novel reinforcement learning (RL) framework. While Triton synthesis faces unique challenges, including data scarcity and a high susceptibility to reward hacking, our approach enables robust kernel generation through two primary innovations. First, we implement a multi-layered verification system that provides high-fidelity reward signals, ensuring that generated kernels are both syntactically and functionally valid. Second, we propose Hierarchical Reward Decomposition (HRD), which decouples reinforcement for high-level reasoning and low-level implementation to resolve the credit assignment problem in long-sequence generation. Comprehensive evaluations on KernelBench demonstrate that TritonRL achieves state-of-the-art correctness and runtime speedup, outperforming concurrent Triton-specific models and matching the performance of frontier models with over 100B parameters. Our results highlight the effectiveness of hardware-aware RL paradigms in specialized domain adaptation.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。