arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2309.07103cs.SEcs.AIcs.DCcs.PL
收藏

比较用于HPC内核生成的Llama-2和GPT-3 LLMs

Comparing Llama-2 and GPT-3 LLMs for HPC kernels generation

Oak Ridge National Laboratory(橡树岭国家实验室);Texas A&M International University(德州农工国际大学)

Pedro Valero-Lara, Alexis Huante, Mustafa Al Lail, William F. Godoy, Keita Teranishi, Prasanna Balaprakash, Jeffrey S. Vetter

AI总结:

研究比较开源Llama-2与GPT-3基线在多语言多并行模型下生成HPC内核的准确率,发现Llama-2简化模型准确率具竞争力且正确时优化更优,而Copilot代码更可靠但优化较少。

摘要:

我们评估了开源Llama-2模型在不同并行编程模型和语言(如C++:OpenMP、OpenMP Offload、OpenACC、CUDA、HIP;Fortran:OpenMP、OpenMP Offload、OpenACC;Python:numpy、Numba、pyCUDA、cuPy;以及Julia:Threads、CUDA.jl、AMDGPU.jl)上生成知名高性能计算内核(如AXPY、GEMV、GEMM)的效果。我们基于之前使用OpenAI Codex(GPT-3的后继模型)通过GitHub Copilot以简单提示生成类似内核的工作。目标是通过类似指标比较Llama-2与原始GPT-3基线的准确率。Llama-2的简化模型表现出具竞争力甚至更优的准确率。我们还报告了这些基础大语言模型之间的差异,因为生成式AI正持续重塑人机交互。总体而言,Copilot生成的代码更可靠但优化较少,而Llama-2生成的代码可靠性较低,但在正确时优化程度更高。

英文摘要:

We evaluate the use of the open-source Llama-2 model for generating well-known, high-performance computing kernels (e.g., AXPY, GEMV, GEMM) on different parallel programming models and languages (e.g., C++: OpenMP, OpenMP Offload, OpenACC, CUDA, HIP; Fortran: OpenMP, OpenMP Offload, OpenACC; Python: numpy, Numba, pyCUDA, cuPy; and Julia: Threads, CUDA.jl, AMDGPU.jl). We built upon our previous work that is based on the OpenAI Codex, which is a descendant of GPT-3, to generate similar kernels with simple prompts via GitHub Copilot. Our goal is to compare the accuracy of Llama-2 and our original GPT-3 baseline by using a similar metric. Llama-2 has a simplified model that shows competitive or even superior accuracy. We also report on the differences between these foundational large language models as generative AI continues to redefine human-computer interactions. Overall, Copilot generates codes that are more reliable but less optimized, whereas codes generated by Llama-2 are less reliable but more optimized when correct.

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

↑