paper-with-me

홈 › Papers

Retrieval-augmented code completion for local projects using large language models

2024-08-09 · Marko Hostnik, Marko Robnik-Šikonja

The use of large language models (LLMs) is becoming increasingly widespread among software developers. However, privacy and computational requirements are problematic with commercial solutions and the use of LLMs. In this work, we focus on using relatively small and efficient LLMs with 160M parameters that are suitable for local execution and augmentation with retrieval from local projects. We train two open transformer-based models, the generative GPT-2 and the retrieval-adapted RETRO, on open-source Python files, and empirically compare them, confirming the benefits of embedding-based retrieval. Furthermore, we improve our models' performance with In-context retrieval-augmented generation (RAG), which retrieves code snippets using the Jaccard similarity of tokens. We evaluate In-context RAG on larger models and determine that, despite its simplicity, the approach is more suitable than using the RETRO architecture. Experimental results indicate that In-context RAG improves the code completion baseline by over 26%, while RETRO improves over the similarly sized GPT-2 baseline by 12%. We highlight the key role of proper tokenization in achieving the full potential of LLMs in code completion.

📄 PDF Abstract BibTeX arXiv:2408.05026

Code (0)

등록된 구현이 없습니다.

Tasks

Code CompletionRAGRetrievalRetrieval-augmented Generation

Methods 이 논문이 사용한 방법론

Linear Warmup With Linear Decay Linear Warmup With Linear Decay is a learning rate schedule in which we increase the learning rate linearly for $n$ updates and then linearly decay afterwards.
Refunds@Expedia|||How do I get a full refund from Expedia? “How do I get a full refund from Expedia? How do I get a full refund from Expedia? – Call ☎️ +1-(888) 829 (0881) or +1-805-330-4056 or +1-805-330-4056 for Quick Help &…
BERT BERT, or Bidirectional Encoder Representations from Transformers, improves upon standard Transformers by removing the…
BART BART is a denoising autoencoder for pretraining sequence-to-sequence models. It is trained by (1) corrupting text…
RAG Retriever-Augmented Generation, or RAG, is a type of language generation model that combines pre-trained parametric and non-parametric memory for language generation.…
Attention 설명 없음
Linear Layer A Linear Layer is a projection $\mathbf{XW + b}$.
Attention Dropout Attention Dropout is a type of dropout used in attention-based architectures, where elements are randomly dropped out of the…

Similar Papers 제목 키워드 기반

Enhancing Project-Specific Code Completion by Inferring Internal API Information

2025-07-28 · Le Deng, Xiaoxue Ren, Chao Ni, Ming Liang 외 arxiv

Project-specific code completion is a critical task that leverages context from a project to generate accurate code. State-of-the-art methods use retrieval-augmented generation (RAG) with large language models (LLMs) and…

Code Completion

RAG-Verus: Repository-Level Program Verification with LLMs using Retrieval Augmented Generation

2025-02-07 · Sicheng Zhong, Jiading Zhu, Yifang Tian, Xujie Si

Scaling automated formal verification to real-world projects requires resolving cross-module dependencies and global contexts, which are challenges overlooked by existing function-centric methods. We introduce RagVerus, …

Language ModelingLanguage ModellingRAGRetrieval+1

HDLxGraph: Bridging Large Language Models and HDL Repositories via HDL Graph Databases

2025-05-21 · Pingqing Zheng, Jiayin Qin, Fuqi Zhang, Shang Wu 외

Large Language Models (LLMs) have demonstrated their potential in hardware design tasks, such as Hardware Description Language (HDL) generation and debugging. Yet, their performance in real-world, repository-level HDL pr…

RAGRetrievalRetrieval-augmented GenerationSemantic Retrieval

Benefit from Reference: Retrieval-Augmented Cross-modal Point Cloud Completion

2025-07-19 · Hongye Hou, Liu Zhan, Yang Yang arxiv

Completing the whole 3D structure based on an incomplete point cloud is a challenging task, particularly when the residual point cloud lacks typical structural characteristics. Recent methods based on cross-modal learnin…

Point Cloud CompletionCross-Modal RetrievalPoint Clouds

CodeRAG: Finding Relevant and Necessary Knowledge for Retrieval-Augmented Repository-Level Code Completion

2025-09-19 · Sheng Zhang, Yifan Ding, Shuquan Lian, Shun Song 외 arxiv

Repository-level code completion automatically predicts the unfinished code based on the broader information from the repository. Recent strides in Code Large Language Models (code LLMs) have spurred the development of r…

Code Completion