Non-autoregressive Model for Full-line Code Completion

04/21/2022
by   Fang Liu, et al.
0

Code completion tools are frequently used by software developers to accelerate software development by suggesting the following code elements. Completing a sequence of code tokens (e.g., a full line of code) has been proved more efficient than predicting a single token at a time. To complete the code sequence, researchers are employing AutoRegressive (AR) decoders to generate tokens in a left-to-right, token-by-token fashion. Consequently, the prediction of the next token depends on all previously generated tokens, which leads to high latency in inference. To improve the efficiency and accuracy of full-line code completion, in this paper, we propose a Non-AutoRegressive (NAR) model for code completion boosted by a syntax-aware sampling strategy. Our experimental results on two widely used datasets suggest that our model outperforms both AR and NAR baselines on full-line code completion, and it is faster than the AR model with up to 9 times speed-up.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
09/18/2020

Towards Full-line Code Completion with Neural Language Models

A code completion system suggests future code elements to developers giv...
research
11/09/2022

Syntax-Aware On-the-Fly Code Completion

Code completion aims to help improve developers' productivity by suggest...
research
02/11/2020

Non-Autoregressive Neural Dialogue Generation

Maximum Mutual information (MMI), which models the bidirectional depende...
research
03/12/2020

Code Clone Matching: A Practical and Effective Approach to Find Code Snippets

Finding the same or similar code snippets in source code is one of funda...
research
08/03/2021

An Empirical Study on the Usage of Transformer Models for Code Completion

Code completion aims at speeding up code writing by predicting the next ...
research
06/26/2021

Toward Less Hidden Cost of Code Completion with Acceptance and Ranking Models

Code completion is widely used by software developers to provide coding ...
research
04/05/2022

High-Quality Pluralistic Image Completion via Code Shared VQGAN

PICNet pioneered the generation of multiple and diverse results for imag...

Please sign up or login with your details

Forgot password? Click here to reset