研究大语言模型在闭源与开源数据上的性能表现
Studying LLM Performance on Closed- and Open-source Data
AI总结:
本文利用微软闭源代码数据研究LLMs在专有代码上的表现,发现C++性能因标识符差异显著下降,而C#变化不大,并证明上下文学习可部分缓解性能退化。
摘要:
大语言模型(LLMs)在软件工程实践中正得到广泛应用。这些模型极其依赖数据,并且主要是在以宽松许可证分发的开源(OSS)代码上进行训练的。然而,就实际使用而言,大量软件开发仍然发生在营利性/专有领域,在这些领域中,正在开发的代码并不在公共领域,而且从未进入过公共领域;因此,许多开发者在模型可能并不熟悉其正在开发的代码的环境中进行工作并使用LLMs。在这样的环境中,LLMs的表现是否与它们处理开源代码时一样好?如果不是,差异是什么?当性能出现差异时,可能的原因是什么,是否存在变通方法?在本文中,我们使用来自微软的专有闭源软件数据来研究这一问题,其中大多数专有代码使用C#和C++编写。我们发现,从开源代码到专有代码,C#的性能变化很小,但C++的性能显著下降;我们发现这一差异可归因于标识符的差异。我们还发现,在某些情况下,部分性能退化可以通过上下文学习(in-context learning)得到有效缓解。
英文摘要:
Large Language models (LLMs) are finding wide use in software engineering practice. These models are extremely data-hungry, and are largely trained on open-source (OSS) code distributed with permissive licenses. In terms of actual use however, a great deal of software development still occurs in the for-profit/proprietary sphere, where the code under development is not, and never has been, in the public domain; thus, many developers, do their work, and use LLMs, in settings where the models may not be as familiar with the code under development. In such settings, do LLMs work as well as they do for OSS code? If not, what are the differences? When performance differs, what are the possible causes, and are there work-arounds? In this paper, we examine this issue using proprietary, closed-source software data from Microsoft, where most proprietary code is in C# and C++. We find that performance for C# changes little from OSS --> proprietary code, but does significantly reduce for C++; we find that this difference is attributable to differences in identifiers. We also find that some performance degradation, in some cases, can be ameliorated efficiently by in-context learning.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。