arrow
返回

Improving code completion efficiency through grouped attention

delete2025-11-01
delete0
PRE
AI
Y
Yiming Yin
J
Jianxun Liu *
Y
Yi Liu
D
Deng Jia
DOI:10.1093/comjnl/bxaf117delete
delete原文链接
delete原文求助
delete分享
delete收藏
摘要

摘要

En 中文
Although the code completion model based on the Transformer architecture has achieved remarkable results, the computational complexity of its multi-head self-attention grows quadratically with the increase of sequence length, resulting in low efficiency. To this end, we propose a code completion model based on grouped attention, referred to as GACC. This method groups the attention heads of a representation in the query, key, or value so that the attention heads in the same group share the single attention head of other representations, thereby reducing the number of parameters and computational complexity. We conducted experiments on public datasets of Python and JavaScript, and the experimental results show that compared to models based on multi-head self-attention, GACC effectively reduces the time taken for the model to suggest the next code token while achieving comparable performance on Top-k and MRR metrics.

期刊

C
COMPUTER JOURNAL
IF:
1.5
论文数:
103
被引数:
0

机构

暂无机构信息
引用论文

引用论文

A unified multi-task learning model for AST-level and token-level code completion
err2022-04-18
err17
PREAI
errLiu, Fang; Li, Ge; Wei, Bolin; Xia, Xin; Fu, Zhiyi; Jin, Zhi
err分享
err收藏
On the Naturalness of Software论软件的自然性
err2016-04-26
err164
PREAI
errHindle, Abram; Barr, Earl T.; Gabel, Mark; Su, Zhendong; Devanbu, Premkumar
err分享
err收藏
Probabilistic model for code with decision trees
err2016-10-19
err0
PREAI
errVeselin Raychev; Pavol Bielik; Martin Vechev
err分享
err收藏
Long Short-Term Memory长短期记忆
err1997-11-01
err0
PREAI
errSepp Hochreiter; Jürgen Schmidhuber
err分享
err收藏
学者 查看更多内容