arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2312.13322cs.PLcs.AIcs.LGcs.SE
收藏

MonoCoder:面向HPC代码与任务的领域特定代码语言模型

MonoCoder: Domain-Specific Code Language Model for HPC Codes and Tasks

Ben-Gurion University(本-古里安大学);IAEC(以色列原子能委员会);Code Metal;Intel Labs(英特尔实验室);Intel(英特尔公司);Technion(以色列理工学院);Stanford University(斯坦福大学)

Tal Kadosh, Niranjan Hasabnis, Vy A. Vo, Nadav Schneider, Neva Krien, Mihai Capota, Abdul Wasay, Nesreen Ahmed, Ted Willke, Guy Tamir, Yuval Pinter, Timothy Mattson, Gal Oren

AI总结:

针对HPC任务现有LLM规模庞大且训练成本高的问题,提出领域特定语言模型MonoCoder,在HPCorpus数据集上预训练,以更小的模型规模在HPC代码理解与生成任务上优于现有LLM。

摘要:

随着计算资源获取更加便捷,AI在软件开发领域呈现出开发大型语言模型(LLM)以处理各类编程任务的增长趋势。即使是应用于高性能计算(HPC)领域任务的LLM,其模型规模也极为庞大,且训练需要消耗昂贵的计算资源。这部分是因为用于HPC任务的LLM是通过微调支持多种自然语言和/或编程语言的现有LLM而获得的。我们发现这一设计选择令人困惑——为什么处理HPC特定任务时,需要使用在自然语言和与HPC无关的编程语言上训练的LLM?在这一系列工作中,我们旨在通过为特定领域开发更小的语言模型(LM)(我们称之为领域特定LM)来质疑现有LLM所做的选择。具体而言,我们以HPC作为领域,构建了一个名为MonoCoder的HPC特定LM,其规模比现有LM小数个数量级,但在非HPC和HPC代码上均能提供更好的性能。具体来说,我们在从GitHub挖掘的C和C++程序组成的HPC特定数据集(命名为HPCorpus)上对MonoCoder进行了预训练。我们将MonoCoder与最先进的多语言LLM进行了性能评估对比。结果表明,尽管MonoCoder比现有LM小得多,但在归一化困惑度测试(与模型规模相关)中优于其他LLM,同时在高性能和并行代码生成方面也提供了具有竞争力的CodeBLEU分数。换言之,结果表明MonoCoder比最先进的LLM更理解HPC代码。

英文摘要:

With easier access to powerful compute resources, there is a growing trend in AI for software development to develop large language models (LLMs) to address a variety of programming tasks. Even LLMs applied to tasks from the high-performance computing (HPC) domain are huge in size and demand expensive compute resources for training. This is partly because LLMs for HPC tasks are obtained by finetuning existing LLMs that support several natural and/or programming languages. We found this design choice confusing - why do we need LLMs trained on natural languages and programming languages unrelated to HPC for HPC-specific tasks? In this line of work, we aim to question choices made by existing LLMs by developing smaller language models (LMs) for specific domains - we call them domain-specific LMs. Specifically, we start with HPC as a domain and build an HPC-specific LM, named MonoCoder, which is orders of magnitude smaller than existing LMs but delivers better performance on non-HPC and HPC codes. Specifically, we pre-trained MonoCoder on an HPC-specific dataset (named HPCorpus) of C and C++ programs mined from GitHub. We evaluated the performance of MonoCoder against state-of-the-art multi-lingual LLMs. Results demonstrate that MonoCoder, although much smaller than existing LMs, outperforms other LLMs on normalized-perplexity tests (in relation to model size) while also delivering competing CodeBLEU scores for high-performance and parallel code generations. In other words, results suggest that MonoCoder understands HPC code better than state-of-the-art LLMs.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑