Performance-Aligned LLMs for Generating Fast Code

要約

コードベースは多くの場合大規模で複雑であり、パフォーマンスはアルゴリズム、その実装、ハードウェアなどのいくつかの要因に依存する可能性があるため、科学ソフトウェアの最適化は困難な作業です。
パフォーマンス低下の原因はさまざまな原因から発生する可能性があり、診断が困難です。
近年、ソフトウェア開発タスクを支援するために大規模言語モデル (LLM) を使用する作業が数多く行われています。
ただし、これらのツールはコードの配布をテキストとしてモデル化するようにトレーニングされており、コードのパフォーマンス面を理解するように特別に設計されているわけではありません。
この研究では、コード LLM の出力をパフォーマンスに合わせて調整するための強化学習ベースの方法論を導入します。
これにより、LLM の現在のコード モデリング機能を構築し、それを拡張してよりパフォーマンスの高いコードを生成できるようになります。
微調整されたモデルは、一連のベンチマーク タスクのベース モデルと比較して、シリアル コードの場合は 0.9 から 1.6、OpenMP コードの場合は 1.9 から 4.5 まで、生成コードの予想速度が向上することを実証します。

要約(オリジナル)

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.

arxiv情報

著者 Daniel Nichols,Pranav Polasam,Harshitha Menon,Aniruddha Marathe,Todd Gamblin,Abhinav Bhatele
発行日 2024-04-29 16:52:38+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, Google

カテゴリー: cs.AI, cs.DC, cs.SE パーマリンク