关于代码语言模型的调查
A Survey on Language Models for Code
November 14, 2023
作者: Ziyin Zhang, Chaoyu Chen, Bingchang Liu, Cong Liao, Zi Gong, Hang Yu, Jianguo Li, Rui Wang
cs.AI
摘要
在这项工作中,我们系统地审查了最近在语言模型处理代码方面的进展,涵盖了50多种模型、30多项评估任务和500篇相关作品。我们将代码处理模型分为通用语言模型(如GPT系列)和专门针对代码进行预训练的专用模型,通常具有定制目标。我们讨论了这些模型之间的关系和差异,并突出了代码建模从统计模型和循环神经网络到预训练Transformer和LLM的历史转变,这正是自然语言处理领域所经历的过程。我们还讨论了代码特定特征,如抽象语法树(AST)、控制流图(CFG)和单元测试,以及它们在训练代码语言模型中的应用,并确定了该领域的关键挑战和潜在未来方向。我们将这项调查保持开放,并在GitHub存储库https://github.com/codefuse-ai/Awesome-Code-LLM上进行更新。
English
In this work we systematically review the recent advancements in code
processing with language models, covering 50+ models, 30+ evaluation tasks, and
500 related works. We break down code processing models into general language
models represented by the GPT family and specialized models that are
specifically pretrained on code, often with tailored objectives. We discuss the
relations and differences between these models, and highlight the historical
transition of code modeling from statistical models and RNNs to pretrained
Transformers and LLMs, which is exactly the same course that had been taken by
NLP. We also discuss code-specific features such as AST, CFG, and unit tests,
along with their application in training code language models, and identify key
challenges and potential future directions in this domain. We keep the survey
open and updated on github repository at
https://github.com/codefuse-ai/Awesome-Code-LLM.