Large language models trained on source code can support a variety of software development tasks, such as code recommendation and program repair. Large amounts of data for training such models benefit the models' performance. However, the size of the data and models results in long training times and high energy consumption. While publishing source code allows for replicability, users need to repeat the expensive training process if models are not shared. The main goal of the study is to investigate if publications that trained language models for software engineering (SE) tasks share source code and trained artifacts. The second goal is to analyze the transparency on training energy usage. We perform a snowballing-based literature search to find publications on language models for source code, and analyze their reusability from a sustainability standpoint. From 494 unique publications, we identified 293 relevant publications that use language models to address code-related tasks. Among them, 27% (79 out of 293) make artifacts available for reuse. This can be in the form of tools or IDE plugins designed for specific tasks or task-agnostic models that can be fine-tuned for a variety of downstream tasks. Moreover, we collect insights on the hardware used for model training, as well as training time, which together determine the energy consumption of the development process. We find that there are deficiencies in the sharing of information and artifacts for current studies on source code models for software engineering tasks, with 40% of the surveyed papers not sharing source code or trained artifacts. We recommend the sharing of source code as well as trained artifacts, to enable sustainable reproducibility. Moreover, comprehensive information on training times and hardware configurations should be shared for transparency on a model's carbon footprint.
翻译:基于源代码训练的大型语言模型能够支持多种软件开发任务,例如代码推荐和程序修复。用于训练此类模型的大量数据有助于提升模型性能,然而,数据和模型的规模会导致训练时间延长及能耗增加。虽然发布源代码具有可复现性,但若模型未被共享,用户需重复昂贵的训练过程。本研究的主要目标是探究面向软件工程(SE)任务的语言模型相关出版物是否共享其源代码与训练所得工件。第二个目标则是分析训练能耗信息的透明度。我们采用基于滚雪球法的文献检索,查找关于源代码语言模型的出版物,并从可持续性角度分析其可复用性。从494篇不同的出版物中,我们筛选出293篇使用语言模型处理代码相关任务的相关文献。其中,27%(79/293)的文献提供了可供复用的工件,这些工件可以是针对特定任务设计的工具或IDE插件,亦或是可针对多种下游任务进行微调的任务无关模型。此外,我们收集了关于模型训练所用硬件及训练时间的见解,这两者共同决定了开发过程中的能耗。我们发现,当前面向软件工程任务的源代码模型研究在信息与工件共享方面存在不足,40%的被调查论文未共享源代码或训练工件。我们建议共享源代码及训练所得工件,以实现可持续的可复现性。同时,为透明化模型的碳足迹,应共享训练时间及硬件配置的全面信息。