Fast and memory-efficient neural code completion

A Svyatkovskiy, S Lee, A Hadjitofi… - 2021 IEEE/ACM 18th …, 2021 - ieeexplore.ieee.org
2021 IEEE/ACM 18th International Conference on Mining Software …, 2021ieeexplore.ieee.org
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 …
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.
ieeexplore.ieee.org