Performance-Aligned LLMs for Generating Fast Code
Not on the map. Why?
Abstract (arXiv)
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.
Key facts. Cited by 20 papers in the map (data through 7 Oct 2026). Builds on 50 of its 75 references that are in the map. First posted on arXiv 29 Apr 2024.
Builds on
50 of 75 references.
References · 50
- 2017Attention Is All You Needcited by 59,932
- 2014Adam: A Method for Stochastic Optimizationcited by 36,960
- 2023GPT-4 Technical Reportcited by 18,132
- 2022Training language models to follow instructions with human feedbackcited by 15,712
- 2017Proximal Policy Optimization Algorithmscited by 14,441
- 2023Llama 2: Open Foundation and Fine-Tuned Chat Modelscited by 12,865
- 2024DeepSeekMath: Pushing the Limits of Mathematical Reasoning in Open Language Modelscited by 8,851
- 2023Judging LLM-as-a-Judge with MT-Bench and Chatbot Arenacited by 8,393
- 2021Evaluating Large Language Models Trained on Codecited by 8,053
- 2023Direct Preference Optimization: Your Language Model is Secretly a Reward Modelcited by 7,916
- 2022Training a Helpful and Harmless Assistant with Reinforcement Learning from Human Feedbackcited by 3,634
- 2021Program Synthesis with Large Language Modelscited by 3,509
38 more
- 2019The Curious Case of Neural Text Degenerationcited by 2,881
- 2019Fine-Tuning Language Models from Human Preferencescited by 2,124
- 2017Decoupled Weight Decay Regularizationcited by 1,722
- 2022Competition-Level Code Generation with AlphaCodecited by 1,427
- 2024DeepSeek-Coder: When the Large Language Model Meets Programming -- The Rise of Code Intelligencecited by 1,154
- 2023Teaching Large Language Models to Self-Debugcited by 963
- 2023ChatGPT Outperforms Crowd-Workers for Text-Annotation Taskscited by 849
- 2023StarCoder: may the source be with you!cited by 790
- 2023WizardCoder: Empowering Code Large Language Models with Evol-Instructcited by 728
- 2023PyTorch FSDP: Experiences on Scaling Fully Sharded Data Parallelcited by 641
- 2023A Comprehensive Overview of Large Language Modelscited by 639
- 2022CodeT: Code Generation with Generated Testscited by 369
- 2022The Stack: 3 TB of permissively licensed source codecited by 354
- 2019Way Off-Policy Batch Deep Reinforcement Learning of Implicit Human Preferences in Dialogcited by 283
- 2023Magicoder: Empowering Code Generation with OSS-Instructcited by 251
- 2022Grounded Copilot: How Programmers Interact with Code-Generating Modelscited by 216
- 2023An Empirical Evaluation of Using Large Language Models for Automated Unit Test Generationcited by 193
- 2023AnnoLLM: Making Large Language Models to Be Better Crowdsourced Annotatorscited by 171
- 2024Secrets of RLHF in Large Language Models Part II: Reward Modelingcited by 170
- 2023HelpSteer: Multi-attribute Helpfulness Dataset for SteerLMcited by 140
- 2020A Transformer-based Approach for Source Code Summarizationcited by 129
- 2023LongCoder: A Long-Range Pre-trained Language Model for Code Completioncited by 110
- 2023An Analysis of the Automatic Bug Fixing Performance of ChatGPTcited by 108
- 2021Break-It-Fix-It: Unsupervised Learning for Program Repaircited by 71
- 2023ChatGPT Prompt Patterns for Improving Code Quality, Refactoring, Requirements Elicitation, and Software Designcited by 66
- 2022Automatic Code Documentation Generation Using GPT-3cited by 37
- 2024Can Large Language Models Write Parallel Code?cited by 36
- 2023Comparing Llama-2 and GPT-3 LLMs for HPC kernels generationcited by 30
- 2022Repairing Bugs in Python Assignments Using Large Language Modelscited by 28
- 2023HPC-GPT: Integrating Large Language Model for High-Performance Computingcited by 22
- 2023LM4HPC: Towards Effective Language Model Application in High-Performance Computingcited by 18
- 2022Assemble Foundation Models for Automatic Code Summarizationcited by 17
- 2024OMPGPT: A Generative Pre-trained Transformer Model for OpenMPcited by 16
- 2022Learning to Reduce False Positives in Analytic Bug Detectorscited by 12
- 2023HPC-Coder: Modeling Parallel Programs using Large Language Modelscited by 11
- 2023Data Race Detection Using Large Language Modelscited by 11
- 2022Learning code summarization from a small and local datasetcited by 5
- 2022Can we learn from developer mistakes? Learning to localize and repair real bugs from real bug fixescited by 4
Built on by
Citing papers per year: 2024: 3; 2025: 11; 2026: 6.
20 papers.
Sort:
By area:
- 2025KernelBench: Can LLMs Write Efficient GPU Kernels?cited by 206
- 2025A Comprehensive Survey of Reward Models: Taxonomy, Applications, Challenges, and Futurecited by 53
- 2024A Comprehensive Survey of Direct Preference Optimization: Datasets, Theories, Variants, and Applicationscited by 27
- 2024PerfCodeGen: Improving Performance of LLM Generated Code with Execution Feedbackcited by 22
- 2024HPC-Coder-V2: Studying Code LLMs Across Low-Resource Parallel Languagescited by 8
- 2025Agnostics: Learning to Code in Any Programming Language via Reinforcement with a Universal Learning Environmentcited by 5
- 2025Can Large Language Models Predict Parallel Code Performance?cited by 4
- 2025PerfCoder: Large Language Models for Interpretable Code Performance Optimizationcited by 3
- 2025Leveraging AI for Productive and Trustworthy HPC Software: Challenges and Research Directionscited by 2
- 2025Industrial LLM-based Code Optimization under Regulation: A Mixture-of-Agents Approachcited by 2
- 2025Integrating Performance Tools in Model Reasoning for GPU Kernel Optimizationcited by 1
- 2026Record-Remix-Replay: Hierarchical GPU Kernel Optimization using Evolutionary Searchcited by 1
8 more
- 2025Lessons Learned: A Multi-Agent Framework for Code LLMs to Learn and Improvecited by 0
- 2025SwiftSolve: A Self-Iterative, Complexity-Aware Multi-Agent Framework for Competitive Programmingcited by 0
- 2025HPCAgentTester: A Multi-Agent LLM Approach for Enhanced HPC Unit Test Generationcited by 0
- 2026Improving HPC Code Generation Capability of LLMs via Online Reinforcement Learning with Real-Machine Benchmark Rewardscited by 0
- 2026Learning Reasoning World Models for Parallel Codecited by 0
- 2026Themis: Training Robust Multilingual Code Reward Models for Flexible Multi-Criteria Scoringcited by 0
- 2026Cross-Model Cross-Language AI Coding Agent Performance: Accuracy and Speed of Parallel CLRS Algorithmscited by 0
- 2026HARGO: Heterogeneity-Aware Reward-Guided Optimization for RL Post-Training of LLMs on HPC Taskscited by 0
- 2026HARGO: Heterogeneity-Aware Reward-Guided Optimization for RL Post-Training of LLMs on HPC Tasks30 Jul 2026
- 2026Cross-Model Cross-Language AI Coding Agent Performance: Accuracy and Speed of Parallel CLRS Algorithms26 Jul 2026
- 2026Themis: Training Robust Multilingual Code Reward Models for Flexible Multi-Criteria Scoring1 May 2026
- 2026Learning Reasoning World Models for Parallel Code22 Apr 2026
- 2026Record-Remix-Replay: Hierarchical GPU Kernel Optimization using Evolutionary Search13 Apr 2026
- 2026Improving HPC Code Generation Capability of LLMs via Online Reinforcement Learning with Real-Machine Benchmark Rewards12 Feb 2026
- 2025PerfCoder: Large Language Models for Interpretable Code Performance Optimization16 Dec 2025
- 2025HPCAgentTester: A Multi-Agent LLM Approach for Enhanced HPC Unit Test Generation13 Nov 2025
- 2025SwiftSolve: A Self-Iterative, Complexity-Aware Multi-Agent Framework for Competitive Programming26 Oct 2025
- 2025Integrating Performance Tools in Model Reasoning for GPU Kernel Optimization20 Oct 2025
- 2025Agnostics: Learning to Code in Any Programming Language via Reinforcement with a Universal Learning Environment6 Aug 2025
- 2025Industrial LLM-based Code Optimization under Regulation: A Mixture-of-Agents Approach5 Aug 2025
8 more
- 2025Lessons Learned: A Multi-Agent Framework for Code LLMs to Learn and Improve29 May 2025
- 2025Leveraging AI for Productive and Trustworthy HPC Software: Challenges and Research Directions13 May 2025
- 2025Can Large Language Models Predict Parallel Code Performance?6 May 2025
- 2025A Comprehensive Survey of Reward Models: Taxonomy, Applications, Challenges, and Future12 Apr 2025
- 2025KernelBench: Can LLMs Write Efficient GPU Kernels?14 Feb 2025
- 2024HPC-Coder-V2: Studying Code LLMs Across Low-Resource Parallel Languages19 Dec 2024
- 2024PerfCodeGen: Improving Performance of LLM Generated Code with Execution Feedback18 Nov 2024
- 2024A Comprehensive Survey of Direct Preference Optimization: Datasets, Theories, Variants, and Applications21 Oct 2024
- 2025Industrial LLM-based Code Optimization under Regulation: A Mixture-of-Agents Approachcited by 2
- 2025Lessons Learned: A Multi-Agent Framework for Code LLMs to Learn and Improvecited by 0
- 2025SwiftSolve: A Self-Iterative, Complexity-Aware Multi-Agent Framework for Competitive Programmingcited by 0
- 2025HPCAgentTester: A Multi-Agent LLM Approach for Enhanced HPC Unit Test Generationcited by 0
- 2026Cross-Model Cross-Language AI Coding Agent Performance: Accuracy and Speed of Parallel CLRS Algorithmscited by 0
- 2026Cross-Model Cross-Language AI Coding Agent Performance: Accuracy and Speed of Parallel CLRS Algorithms26 Jul 2026
- 2025HPCAgentTester: A Multi-Agent LLM Approach for Enhanced HPC Unit Test Generation13 Nov 2025
- 2025SwiftSolve: A Self-Iterative, Complexity-Aware Multi-Agent Framework for Competitive Programming26 Oct 2025
- 2025Industrial LLM-based Code Optimization under Regulation: A Mixture-of-Agents Approach5 Aug 2025
- 2025Lessons Learned: A Multi-Agent Framework for Code LLMs to Learn and Improve29 May 2025
- 2024A Comprehensive Survey of Direct Preference Optimization: Datasets, Theories, Variants, and Applicationscited by 27
- 2025Integrating Performance Tools in Model Reasoning for GPU Kernel Optimizationcited by 1
- 2026Learning Reasoning World Models for Parallel Codecited by 0
- 2026Themis: Training Robust Multilingual Code Reward Models for Flexible Multi-Criteria Scoringcited by 0
- 2026Themis: Training Robust Multilingual Code Reward Models for Flexible Multi-Criteria Scoring1 May 2026
- 2026Learning Reasoning World Models for Parallel Code22 Apr 2026
- 2025Integrating Performance Tools in Model Reasoning for GPU Kernel Optimization20 Oct 2025
- 2024A Comprehensive Survey of Direct Preference Optimization: Datasets, Theories, Variants, and Applications21 Oct 2024
- 2025KernelBench: Can LLMs Write Efficient GPU Kernels?cited by 206
- 2024PerfCodeGen: Improving Performance of LLM Generated Code with Execution Feedbackcited by 22
- 2024HPC-Coder-V2: Studying Code LLMs Across Low-Resource Parallel Languagescited by 8
- 2025Agnostics: Learning to Code in Any Programming Language via Reinforcement with a Universal Learning Environmentcited by 5
- 2025Can Large Language Models Predict Parallel Code Performance?cited by 4
- 2025PerfCoder: Large Language Models for Interpretable Code Performance Optimizationcited by 3
- 2025Leveraging AI for Productive and Trustworthy HPC Software: Challenges and Research Directionscited by 2
- 2026Record-Remix-Replay: Hierarchical GPU Kernel Optimization using Evolutionary Searchcited by 1
- 2026Improving HPC Code Generation Capability of LLMs via Online Reinforcement Learning with Real-Machine Benchmark Rewardscited by 0
- 2026HARGO: Heterogeneity-Aware Reward-Guided Optimization for RL Post-Training of LLMs on HPC Taskscited by 0
- 2026HARGO: Heterogeneity-Aware Reward-Guided Optimization for RL Post-Training of LLMs on HPC Tasks30 Jul 2026
- 2026Record-Remix-Replay: Hierarchical GPU Kernel Optimization using Evolutionary Search13 Apr 2026
- 2026Improving HPC Code Generation Capability of LLMs via Online Reinforcement Learning with Real-Machine Benchmark Rewards12 Feb 2026
- 2025PerfCoder: Large Language Models for Interpretable Code Performance Optimization16 Dec 2025
- 2025Agnostics: Learning to Code in Any Programming Language via Reinforcement with a Universal Learning Environment6 Aug 2025
- 2025Leveraging AI for Productive and Trustworthy HPC Software: Challenges and Research Directions13 May 2025
- 2025Can Large Language Models Predict Parallel Code Performance?6 May 2025
- 2025KernelBench: Can LLMs Write Efficient GPU Kernels?14 Feb 2025
- 2024HPC-Coder-V2: Studying Code LLMs Across Low-Resource Parallel Languages19 Dec 2024
- 2024PerfCodeGen: Improving Performance of LLM Generated Code with Execution Feedback18 Nov 2024
Similar, not cited
Close in wording, no citation either way
- 2025Integrating Symbolic Execution into the Fine-Tuning of Code-Generating LLMs
- 2025Holistic Evaluation of State-of-the-Art LLMs for Code Generation
- 2026Performance, Efficiency and Collapse -- Advantages and Challenges in Offline Post-training of Code LLMs
- 2026Exploring the Role of LLMs in HPC Programming: A Survey
- 2026Rethinking Code Performance Benchmarks for LLMs
- 2025GREEN-CODE: Learning to Optimize Energy Efficiency in LLM-based Code Generation
- 2025Data-efficient LLM Fine-tuning for Code Generation
- 2025Beyond Synthetic Benchmarks: Evaluating LLM Performance on Real-World Class-Level Code Generation