arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2004.13651cs.SEcs.LG
收藏

快速高效的神经代码完成

Fast and Memory-Efficient Neural Code Completion

Microsoft Research(微软研究院);University of Oxford(牛津大学);University of Edinburgh(爱丁堡大学)

Alexey Svyatkovskiy, Sebastian Lee, Anna Hadjitofi, Maik Riechert, Juliana Franco, Miltiadis Allamanis

摘要:

代码完成是现代集成开发环境(IDE)中使用最广泛的功能之一。虽然深度学习在源代码的统计预测方面取得了重大进展,但最先进的神经网络模型消耗数百兆内存,使开发环境膨胀。我们分两步解决这个问题:首先,我们提出了一个用于代码完成的模块化神经框架。这使我们能够探索设计空间并评估不同的技术。其次,在这个框架内,我们设计了一个新的重排序神经完成模型,结合静态分析与粒度令牌编码。最好的神经重排序模型仅消耗6 MB RAM,比以前的模型少19倍,在8 ms内计算一个完成,并在其前五个建议中达到90%的准确率。

英文摘要:

Code completion is one of the most widely used features of modern integrated development environments (IDEs). While deep learning has made significant progress in the statistical prediction of source code, state-of-the-art neural network models consume hundreds of megabytes of memory, bloating the development environment. We address this in two steps: first we present a modular neural framework for code completion. This allows us to explore the design space and evaluate different techniques. Second, within this framework we design a novel reranking neural completion model that combines static analysis with granular token encodings. The best neural reranking model consumes just 6 MB of RAM, - 19x less than previous models - computes a single completion in 8 ms, and achieves 90% accuracy in its top five suggestions.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑