vix.ing · top · new · best · stats · spec

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

2023/09/12 by Pedro Valero‐Lara, Alexis Huante, Valero-Lara, Pedro +11 · 8 citations
Computer Science · #Advanced Data Storage Technologies #Artificial Intelligence (cs.AI) #Distributed #FOS: Computer and information sciences #Parallel #Parallel Computing and Optimization Techniques #Programming Languages (cs.PL) #Software Engineering (cs.SE) #Topic Modeling #and Cluster Computing (cs.DC)

paper · pdf · doi:10.48550/arxiv.2309.07103

openalex publication_date 2023/09/12 · openalex created_date 2025/10/10 · openalex updated_date 2026/07/28

Abstract

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.

Citations

Cited by

Related