MPIrigen: ドメイン特化型言語モデルによるMPIコード生成
MPIrigen: MPI Code Generation through Domain-Specific Language Models
February 14, 2024
著者: Nadav Schneider, Niranjan Hasabnis, Vy A. Vo, Tal Kadosh, Neva Krien, Mihai Capotă, Abdul Wasay, Guy Tamir, Ted Willke, Nesreen Ahmed, Yuval Pinter, Timothy Mattson, Gal Oren
cs.AI
要旨
多数のノードにわたる計算のスケーリングの必要性は、特にMessage Passing Interface(MPI)統合の領域において、効率的な並列計算の重要性を強調しています。MPIベースの並列プログラムを生成するという挑戦的な並列プログラミングタスクは、これまで未開拓のままでした。本研究では、まず最先端の言語モデルがMPIベースの並列プログラムを生成する際の性能を調査します。その結果、GPT-3.5やPolyCoder(多言語コードモデルに特化したモデル)などの広く使用されているモデルは、汎用プログラムと比較してMPIベースのプログラムを生成する際に顕著な性能低下を示すことが明らかになりました。一方、CおよびC++のMPI関連プログラミング言語で事前学習されたMonoCoderなどのドメイン特化モデルは、より大規模なモデルを上回る性能を示します。その後、HPCorpusMPIでMonoCoderをファインチューニングすることにより、MPIベースのプログラム生成に特化した下流タスクを導入します。この結果得られたモデルをMPIrigenと呼びます。我々は、コード全体を観察した後にのみ完了するための革新的な前処理を提案し、より広いコンテキストでより良い完了を可能にします。新しいHPC指向の評価方法を使用したGPT-3.5のゼロショット性能との比較分析により、MPIrigenが正確なMPI関数を生成する能力が、位置と関数の予測において最大0.8の精度、引数の予測において0.9以上の精度で優れていることが示されました。この特化したソリューションの成功は、並列計算コード生成のための言語モデルを最適化する際のドメイン特化ファインチューニングの重要性を強調し、新世代の自動並列化ツールへの道を開きます。この研究のソースは、GitHubのMPIrigenリポジトリで公開されています:https://github.com/Scientific-Computing-Lab-NRCN/MPI-rigen
English
The imperative need to scale computation across numerous nodes highlights the
significance of efficient parallel computing, particularly in the realm of
Message Passing Interface (MPI) integration. The challenging parallel
programming task of generating MPI-based parallel programs has remained
unexplored. This study first investigates the performance of state-of-the-art
language models in generating MPI-based parallel programs. Findings reveal that
widely used models such as GPT-3.5 and PolyCoder (specialized multi-lingual
code models) exhibit notable performance degradation, when generating MPI-based
programs compared to general-purpose programs. In contrast, domain-specific
models such as MonoCoder, which are pretrained on MPI-related programming
languages of C and C++, outperform larger models. Subsequently, we introduce a
dedicated downstream task of MPI-based program generation by fine-tuning
MonoCoder on HPCorpusMPI. We call the resulting model as MPIrigen. We propose
an innovative preprocessing for completion only after observing the whole code,
thus enabling better completion with a wider context. Comparative analysis
against GPT-3.5 zero-shot performance, using a novel HPC-oriented evaluation
method, demonstrates that MPIrigen excels in generating accurate MPI functions
up to 0.8 accuracy in location and function predictions, and with more than 0.9
accuracy for argument predictions. The success of this tailored solution
underscores the importance of domain-specific fine-tuning in optimizing
language models for parallel computing code generation, paving the way for a
new generation of automatic parallelization tools. The sources of this work are
available at our GitHub MPIrigen repository:
https://github.com/Scientific-Computing-Lab-NRCN/MPI-rigenSummary
AI-Generated Summary