Fast and Memory-Efficient Neural Code Completion

by   Alexey Svyatkovskoy, et al.

Code completion is one of the most widely used features of modern integrated development environments (IDEs). Deep learning has recently made significant progress in the statistical prediction of source code. However, state-of-the-art neural network models consume prohibitively large amounts of memory, causing computational burden to the development environment, especially when deployed in lightweight client devices. In this work, we reframe neural code completion from a generation task to a task of learning to rank the valid completion suggestions computed from static analyses. By doing so, we are able to design and test a variety of deep neural network model configurations. One of our best models consumes 6 MB of RAM, computes a single suggestion in 8 ms, and achieves 90 suggestions. Our models outperform standard language modeling code completion techniques in terms of predictive performance, computational speed, and memory efficiency. Furthermore, they learn about code semantics from the natural language aspects of the code (e.g. identifier names) and can generalize better to previously unseen code.



There are no comments yet.


page 1

page 2

page 3

page 4


Sequence Model Design for Code Completion in the Modern IDE

Code completion plays a prominent role in modern integrated development ...

Neural Code Completion with Anonymized Variable Names

Source code processing heavily relies on the methods widely used in natu...

Function completion in the time of massive data: A code embedding perspective

Code completion is an important feature of integrated development enviro...

Pythia: AI-assisted Code Completion System

In this paper, we propose a novel end-to-end approach for AI-assisted co...

Maybe Deep Neural Networks are the Best Choice for Modeling Source Code

Statistical language modeling techniques have successfully been applied ...

IntelliCode Compose: Code Generation Using Transformer

In software development through integrated development environments (IDE...

Probing Pretrained Models of Source Code

Deep learning models are widely used for solving challenging code proces...
This week in AI

Get the week's most popular data science and artificial intelligence research sent straight to your inbox every Saturday.