用大模型+错误引用提升MPI程序的错误检测与修复能力
Improving MPI Error Detection and Repair with Large Language Models and Bug References
- 结合少样本学习与检索增强生成,让大模型理解MPI错误模式
- 错误检测准确率从44%提升至77%
- 方法可迁移至其他大模型,适合高性能计算开发者
消息传递接口(MPI)是高性能计算中的核心技术,广泛用于大规模模拟和分布式训练(如PyTorch、TensorFlow)。然而,由于进程间交互复杂、通信与同步机制繁琐,维护MPI程序极具挑战。尽管大语言模型(如ChatGPT)在自动化错误检测与修复方面前景广阔,但直接应用效果不佳,主要因缺乏对正确/错误使用模式的理解,尤其是常见MPI错误知识。本文提出一种结合少样本学习(FSL)、思维链(CoT)推理与检索增强生成(RAG)的错误检测与修复技术,显著提升了大模型对MPI错误的识别与修复能力。实验表明,该方法将错误检测准确率从基线的44%提升至77%。此外,所提出的错误引用机制具有良好泛化性,适用于其他大型语言模型。
原文摘要 · Abstract (English)
Message Passing Interface (MPI) is a foundational technology in high-performance computing (HPC), widely used for large-scale simulations and distributed training (e.g., in machine learning frameworks such as PyTorch and TensorFlow). However, maintaining MPI programs remains challenging due to their complex interplay among processes and the intricacies of message passing and synchronization. With the advancement of large language models like ChatGPT, it is tempting to adopt such technology for automated error detection and repair. Yet, our studies reveal that directly applying large language models (LLMs) yields suboptimal results, largely because these models lack essential knowledge about correct and incorrect usage, particularly the bugs found in MPI programs. In this paper, we design a bug detection and repair technique alongside Few-Shot Learning (FSL), Chain-of-Thought (CoT) reasoning, and Retrieval Augmented Generation (RAG) techniques in LLMs to enhance the large language model's ability to detect and repair errors. Surprisingly, such enhancements lead to a significant improvement, from 44% to 77%, in error detection accuracy compared to baseline methods that use ChatGPT directly. Additionally, our experiments demonstrate our bug referencing technique generalizes well to other large language models.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。