Performance-Aligned LLMs for Generating Fast Code
Daniel Nichols, Pranav Polasam, Harshitha Menon, Aniruddha Marathe,, Todd Gamblin, Abhinav Bhatele

TL;DR
This paper presents a reinforcement learning approach to fine-tune large language models for generating high-performance code, significantly improving execution speed on benchmark tasks.
Contribution
It introduces a novel reinforcement learning methodology to align LLM outputs with code performance, enhancing their ability to generate faster code.
Findings
Expected speedup increased from 0.9 to 1.6 for serial code.
Speedup improved from 1.9 to 4.5 for OpenMP code.
Demonstrates effectiveness on benchmark tasks.
Abstract
Optimizing scientific software is a difficult task because codebases are often large and complex, and performance can depend upon several factors including the algorithm, its implementation, and hardware among others. Causes of poor performance can originate from disparate sources and be difficult to diagnose. Recent years have seen a multitude of work that use large language models (LLMs) to assist in software development tasks. However, these tools are trained to model the distribution of code as text, and are not specifically designed to understand performance aspects of code. In this work, we introduce a reinforcement learning based methodology to align the outputs of code LLMs with performance. This allows us to build upon the current code modeling capabilities of LLMs and extend them to generate better performing code. We demonstrate that our fine-tuned model improves the expected…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsReal-time simulation and control systems
MethodsSparse Evolutionary Training · Balanced Selection · ALIGN
