IntelliCode Compose:使用Transformer的代码生成
IntelliCode Compose: Code Generation Using Transformer
摘要:
在通过集成开发环境(IDE)进行的软件开发中,代码完成是最广泛使用的功能之一。然而,大多数集成开发环境只支持方法和API或参数的完成。在本文中,我们介绍了智能代码编写$-$一个通用的多语言代码完成工具,它能够预测序列的代码标记的任意类型,生成整行的语法正确的代码。它利用了最先进的生成式Transformer模型,该模型在Python、$C\#$、JavaScript和TypeScript程序设计语言的12亿行源代码上进行了训练。IntelliCode Compose部署为基于云的Web服务。它利用客户端基于树的缓存、束搜索解码器的高效并行实现以及计算图形优化来满足Visual Studio Code IDE和Azure Notebook中的编辑时完成建议要求。我们最好的模型产生的平均编辑相似度为$86.7\%$和Python程序设计语言的困惑度为1.82。
英文摘要:
In software development through integrated development environments (IDEs), code completion is one of the most widely used features. Nevertheless, majority of integrated development environments only support completion of methods and APIs, or arguments. In this paper, we introduce IntelliCode Compose $-$ a general-purpose multilingual code completion tool which is capable of predicting sequences of code tokens of arbitrary types, generating up to entire lines of syntactically correct code. It leverages state-of-the-art generative transformer model trained on 1.2 billion lines of source code in Python, $C\#$, JavaScript and TypeScript programming languages. IntelliCode Compose is deployed as a cloud-based web service. It makes use of client-side tree-based caching, efficient parallel implementation of the beam search decoder, and compute graph optimizations to meet edit-time completion suggestion requirements in the Visual Studio Code IDE and Azure Notebook. Our best model yields an average edit similarity of $86.7\%$ and a perplexity of 1.82 for Python programming language.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。