# Fine-Tuning GPT-5 for GPU Kernel Generation

**Authors:** Ali Tehrani, Yahya Emara, Essam Wissam, Wojciech Paluch, Waleed Atallah, Łukasz Dudziak, Mohamed S. Abdelfattah  
**arXiv:** [2602.11000](https://arxiv.org/abs/2602.11000)  
**Date:** 2026-02-11  
**Summary page:** https://www.summarizepaper.com/en/paper/2602.11000v1/

## Key points

- Efficient GPU kernels are crucial for achieving scalability in AI systems.
- Large Language Models (LLMs) face challenges in generating GPU code due to lack of labeled training data, biases in compilers, and limited generalization across hardware generations.
- Reinforcement learning (RL) offers an adaptive and data-efficient alternative for fine-tuning models, but requires relevant tools, careful problem selection, and a robust evaluation environment.
- Makora's environment and tools are designed for reinforcement learning fine-tuning of cutting-edge models like GPT-5 for Triton code generation.
- Fine-tuned GPT-5 model significantly improves kernel correctness from 43.7% to 77.0%, surpassing previous state-of-the-art models on KernelBench.
- Integrated into a coding agent framework, the fine-tuned model solves up to 97.4% of problems in an expanded KernelBench suite, outperforming PyTorch TorchInductor compiler on 72.9% of problems with a speedup of 2.12x.

## Summary

, , , , 

In the realm of AI systems, efficient GPU kernels are crucial for achieving scalability. However, this task remains complex due to the intricate nature of hardware architectures and specialized optimization expertise required. Large Language Models (LLMs) have shown impressive capabilities in general sequential code generation, but they encounter significant challenges when it comes to generating GPU code. These challenges stem from a lack of high-quality labeled training data, biases in compilers, and limited generalization across different hardware generations. Traditionally, supervised fine-tuning (SFT) has been used to enhance current LLMs, but its scalability is hindered by limitations mentioned above. In contrast, reinforcement learning (RL) offers an adaptive and data-efficient alternative for fine-tuning models. However, leveraging RL effectively necessitates access to relevant tools, careful selection of training problems, and a robust evaluation environment. This study introduces Makora's environment and tools designed for reinforcement learning fine-tuning of cutting-edge models. The research team reports their findings from fine-tuning GPT-5 specifically for Triton code generation. In a single-attempt setting, the fine-tuned model significantly improves kernel correctness from 43.7% to 77.0%, marking a notable increase of 33.3 percentage points compared to the baseline GPT-5 model. Moreover, it enhances the fraction of problems outperforming TorchInductor from 14.8% to 21.8%, showcasing a gain of 7 percentage points while surpassing previous state-of-the-art models on KernelBench. When integrated into a comprehensive coding agent framework, the fine-tuned model demonstrates remarkable performance by solving up to 97.4% of problems in an expanded KernelBench suite. It outperforms the PyTorch TorchInductor compiler on 72.9% of problems with a geometric mean speedup of 2.12x. Overall, this work showcases that targeted post-training using reinforcement learning can unlock the full potential of LLMs in highly specialized technical domains where traditional supervised learning methods are constrained by data availability constraints. This breakthrough opens up new avenues for AI-assisted accelerator programming and highlights the promising future prospects for automatic performant kernel code generation leveraging advanced language models like GPT-5.
