CoRoVA:用于向量增强代码补全的压缩表示
CoRoVA: Compressed Representations for Vector-Augmented Code Completion
AI总结:
CoRoVA通过压缩上下文提升代码补全效率,减少提示扩展并降低延迟,提升生成质量。
摘要:
检索增强生成已成为增强代码补全的有效方法,尤其在重要时需仓库级上下文。然而,添加额外检索上下文显著增加序列长度,提高预填充成本,并降低时间到第一个标记(TTFT),从而减慢推理速度——这对交互式环境如IDEs至关重要。本文介绍CoRoVA框架,该框架将上下文压缩为紧凑且语义丰富的表示,仍能被代码LLM解释。这提高了生成质量,同时将提示扩展减少到仅几个压缩单标记向量。我们的方法只需训练一个小型投影模块,引入的额外延迟可忽略不计,但显著提高了代码LLM的预测质量。我们的实验表明,与未压缩RAG相比,CoRoVA在补全任务中使TTFT减少了20-38%。
英文摘要:
Retrieval-augmented generation has emerged as one of the most effective approaches for code completion enhancement, especially when repository-level context is important. However, adding this extra retrieved context significantly increases sequence length, raises prefill cost, and degrades time-to-first-token (TTFT), which slows down inference -- a critical limitation for interactive settings such as IDEs. In this work, we introduce CoRoVA, a framework that compresses context into compact, semantically rich representations that remain interpretable to code LLMs. This improves generation quality while reducing prompt augmentation to only a few compressed single-token vectors. Our approach requires training only a small projector module and introduces negligible additional latency, yet it significantly improves the prediction quality of code LLMs. Our experiments show that CoRoVA enables a 20-38\% reduction in TTFT on completion tasks compared to uncompressed RAG.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。