ChatPaper.aiChatPaper

コンパイラ向け大規模言語モデルの優先順位サンプリング

Priority Sampling of Large Language Models for Compilers

February 28, 2024
著者: Dejan Grubisic, Chris Cummins, Volker Seeker, Hugh Leather
cs.AI

要旨

大規模言語モデルは、コードの生成と最適化において大きな可能性を示しています。Nucleus Samplingのような広く使われているサンプリング手法は、生成の多様性を高めますが、低温では繰り返しサンプルが生成され、高温では一貫性のないサンプルが生成されることがよくあります。さらに、温度係数は各タスクごとに調整する必要があり、その汎用性が制限されています。本論文では、Priority Samplingというシンプルで決定論的なサンプリング手法を提案します。この手法は、モデルの信頼度に基づいて順序付けられたユニークなサンプルを生成します。各新しいサンプルは、拡張探索木の中で最も確率の高い未展開のトークンを展開します。さらに、Priority Samplingは正規表現に基づく生成をサポートし、制御可能で構造化された探索プロセスを提供します。Priority Samplingは、サンプル数に関係なくNucleus Samplingを上回り、元のモデルの性能を-Ozに対して2.87%から5%向上させます。また、元のモデルのトレーニング用ラベル生成に使用されたオートチューナーを、わずか30サンプルで上回る性能を示します。
English
Large language models show great potential in generating and optimizing code. Widely used sampling methods such as Nucleus Sampling increase the diversity of generation but often produce repeated samples for low temperatures and incoherent samples for high temperatures. Furthermore, the temperature coefficient has to be tuned for each task, limiting its usability. We present Priority Sampling, a simple and deterministic sampling technique that produces unique samples ordered by the model's confidence. Each new sample expands the unexpanded token with the highest probability in the augmented search tree. Additionally, Priority Sampling supports generation based on regular expression that provides a controllable and structured exploration process. Priority Sampling outperforms Nucleus Sampling for any number of samples, boosting the performance of the original model from 2.87% to 5% improvement over -Oz. Moreover, it outperforms the autotuner used for the generation of labels for the training of the original model in just 30 samples.
PDF181December 15, 2024