Performance-Aligned LLMs for Generating Fast Code

Daniel Nichols, Pranav Polasam, Harshitha Menon, Aniruddha Marathe, Todd Gamblin +1 more
4/29/2024
cs.DCcs.AIcs.SE

No confident code implementation found for this paper. 4 possible matches can be shown below.

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 speedup of generated code over base models for a set of benchmark tasks from 0.9 to 1.6 for serial code and 1.9 to 4.5 for OpenMP code.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. 4 weaker matches are hidden by default — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{nichols2024performancealigned,
  title  = {Performance-Aligned LLMs for Generating Fast Code},
  author = {Daniel Nichols and Pranav Polasam and Harshitha Menon and Aniruddha Marathe and Todd Gamblin and Abhinav Bhatele},
  year   = {2024},
  eprint = {2404.18864},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2404.18864v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2404.18864.svg)](https://codeofpaper.com/paper/2404.18864)

Discussion