Fast and Memory-Efficient Neural Code Completion

04/28/2020
by   Alexey Svyatkovskoy, et al.
0

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.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
04/10/2020

Sequence Model Design for Code Completion in the Modern IDE

Code completion plays a prominent role in modern integrated development ...
research
10/23/2020

Neural Code Completion with Anonymized Variable Names

Source code processing heavily relies on the methods widely used in natu...
research
03/13/2019

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

Statistical language modeling techniques have successfully been applied ...
research
11/29/2019

Pythia: AI-assisted Code Completion System

In this paper, we propose a novel end-to-end approach for AI-assisted co...
research
06/15/2021

Code Generation Based on Deep Learning: a Brief Review

Automatic software development has been a research hot spot in the field...
research
05/16/2020

IntelliCode Compose: Code Generation Using Transformer

In software development through integrated development environments (IDE...
research
09/13/2022

Learning to Prevent Profitless Neural Code Completion

Currently, large pre-trained models are widely applied in neural code co...

Please sign up or login with your details

Forgot password? Click here to reset