非自回归的代码完整性模型
Non-autoregressive Model for Full-line Code Completion
摘要:
软件开发人员经常使用代码完成工具,通过建议以下代码元素来加速软件开发。完成代码令牌序列(例如,一整行代码)已被证明比一次预测单个令牌更有效。为了完成代码序列,研究人员正在使用自回归(AR)解码器以从左到右,逐个令牌的方式生成令牌。因此,下一个令牌的预测取决于所有先前生成的令牌,这导致推理的高延迟。为了提高整行代码补全的效率和准确性,本文提出了一种基于语法感知采样策略的非自回归(NAR)代码补全模型。我们在两个广泛使用的数据集上的实验结果表明,我们的模型在整行代码完成方面优于AR和NAR基线,并且它比AR模型更快,速度高达9倍。
英文摘要:
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.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。