ByteDance Seed and Tsinghua AIR Introduce CUDA Agent: A Large-Scale Agentic RL System for CUDA Kernel Generation

ByteDance Seed and Tsinghua AIR have released CUDA Agent, an agentic reinforcement learning system that trains a large language model to generate GPU kernels that outperform compiler output. The gap it targets is narrow yet persistent: frontier models can already produce correct CUDA code, but they generate slow kernels. On the KernelBench benchmark, the base model Seed1.6 passes 74.0% of tasks, yet it outperforms torch.compile on only 27.2% of them, achieving a 0.69× geometric-mean speedup—meaning its kernels are, on average, slower than those generated by the compiler alone. CUDA Agent closes this gap by embedding the model in a real CUDA development environment with profiling, correctness checks, and a permission-locked sandbox, then training it with PPO for 150 steps at a 131,072-token context. The result is a 98.8% pass rate and a 96.8% faster-than-torch.compile rate across the 250-task benchmark, at 2.11× geomean speedup—approximately 40 points ahead of Claude Opus 4.5 and Gemini 3 Pro on the hardest Level-3 split.


Is It Deployable?


Partially, but the trained agent is not released. It is built on Seed1.6, a proprietary mixture-of-experts (MoE) model with 23B active and 230B total parameters, and the paper ships no weights. What is public: the CUDA-Agent-Ops-6K dataset, the SKILL.md spec, and the reward and warm-up recipes.


Which companies can use it: The profiling sandbox alone requires 128 NVIDIA H20 GPUs, placing full replication within reach of frontier labs, GPU clouds, and large infrastructure teams. Mid-size teams can still adopt the components—dataset, milestone rewards, anti-reward-hacking constraints, and skill spec—on top of an open base model.


Key Technical Details


CUDA Agent's training pipeline integrates the model with a simulated development loop that mimics real-world usage. The agent receives a task description, writes CUDA kernels, compiles them, runs them in the sandbox, and receives profiling feedback. This iterative process is guided by a reward function that combines correctness checks, performance metrics (e.g., speedup over torch.compile), and milestone-based incentives to encourage incremental progress.


The system uses PPO (Proximal Policy Optimization) with a large context window of 131,072 tokens, allowing the model to reason over extensive code and profiling data. The anti-reward-hacking constraints prevent the model from exploiting loopholes, such as hardcoding outputs or bypassing actual kernel execution.


Performance Highlights


  • On KernelBench (250 tasks):
  • Pass rate: 98.8%
  • Faster-than-torch.compile: 96.8%
  • Geomean speedup: 2.11× over compile
  • Level-3 hardest split: CUDA Agent outperforms Claude Opus 4.5 and Gemini 3 Pro by ~40 points in pass rate and speed advantage.
  • Baseline comparison: The base Seed1.6 model, without RL, lags significantly, highlighting the effectiveness of agentic RL in closing the performance gap.

Components and Availability


  • Dataset: CUDA-Agent-Ops-6K on Hugging Face, containing 6,000 operations with source code and profiling data.
  • Spec: SKILL.md describes the agent-environment interaction protocol and reward design.
  • Recipes: Reward shaping and warm-up strategies are published for replication.
  • Model weights: Not released due to proprietary constraints.

Implications for the AI Community


CUDA Agent demonstrates that agentic RL can significantly enhance code generation for specialized domains like GPU programming. By integrating real-world feedback loops into training, it pushes beyond traditional supervised fine-tuning and offers a blueprint for other performance-critical software generation tasks. The release of the dataset and recipes enables broader experimentation, even if full model replication remains resource-intensive.


Conclusion


CUDA Agent is a notable step forward in using RL to generate high-performance CUDA kernels. While the trained agent is behind a proprietary wall, the open components provide valuable insights for researchers and engineers aiming to optimize AI-generated code. As of 2026, this work signals a trend where RL-based agents are becoming essential for tasks where correctness is not enough—performance is paramount. Teams with access to large GPU clusters can replicate the training pipeline, while others can adapt the techniques to lighter setups.

via MarkTechPost

Related