arrow
Return

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
deleteOriginal
deleteOriginal request for help
deleteShare
deleteSave
Abstract

Abstract

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.

Journal

C
COMPUTER JOURNAL
IF:
1.5
Papers:
103
Citations:
0

Organization

No organization information available
Cited Papers

Cited Papers

GQA: Training Generalized Multi-Query Transformer Models from Multi-Head Checkpoints
err2023-01-01
err0
errOAAI
errJoshua Ainslie; James Lee-Thorp; Michiel de Jong; Yury Zemlyanskiy; Federico Lebron; Sumit Sanghai
errShare
errSave
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
errShare
errSave
On the Naturalness of Software
err2016-04-26
err164
PREAI
errHindle, Abram; Barr, Earl T.; Gabel, Mark; Su, Zhendong; Devanbu, Premkumar
errShare
errSave
Probabilistic model for code with decision trees
err2016-10-19
err0
PREAI
errVeselin Raychev; Pavol Bielik; Martin Vechev
errShare
errSave
Long Short-Term Memory
err1997-11-01
err0
PREAI
errSepp Hochreiter; Jürgen Schmidhuber
errShare
errSave
researcher View more