paper-with-me

Papers

Hierarchical Context Pruning: Optimizing Real-World Code Completion with Repository-Level Pretrained Code LLMs

2024-06-26 · Lei Zhang, Yunshui Li, Jiaming Li, Xiaobo Xia, Jiaxi Yang, Run Luo, Minzheng Wang, Longze Chen, Junhao Liu, Min Yang

Some recently developed code large language models (Code LLMs) have been pre-trained on repository-level code data (Repo-Code LLMs), enabling these models to recognize repository structures and utilize cross-file information for code completion. However, in real-world development scenarios, simply concatenating the entire code repository often exceeds the context window limits of these Repo-Code LLMs, leading to significant performance degradation. In this study, we conducted extensive preliminary experiments and analyses on six Repo-Code LLMs. The results indicate that maintaining the topological dependencies of files and increasing the code file content in the completion prompts can improve completion accuracy; pruning the specific implementations of functions in all dependent files does not significantly reduce the accuracy of completions. Based on these findings, we proposed a strategy named Hierarchical Context Pruning (HCP) to construct completion prompts with high informational code content. The HCP models the code repository at the function level, maintaining the topological dependencies between code files while removing a large amount of irrelevant code content, significantly reduces the input length for repository-level code completion. We applied the HCP strategy in experiments with six Repo-Code LLMs, and the results demonstrate that our proposed method can significantly enhance completion accuracy while substantially reducing the length of input. Our code and data are available at https://github.com/Hambaobao/HCP-Coder.

📄 PDF Abstract BibTeX arXiv:2406.18294

Code (1)

hambaobao/hcp-coder 공식 구현

Tasks

Code Completion

Methods 이 논문이 사용한 방법론

Pruning 설명 없음

Similar Papers 제목 키워드 기반

Structural Pruning in Deep Neural Networks: A Small-World Approach

2019-11-11 · Gokul Krishnan, Xiaocong Du, Yu Cao

Deep Neural Networks (DNNs) are usually over-parameterized, causing excessive memory and interconnection cost on the hardware platform. Existing pruning approaches remove secondary parameters at the end of training to re…

CATP: Confidence-Aware Token Pruning for Camouflaged Object Detection

2026-04-18 · Yuhan Gao, Shuhao Kang, Xin He, Bing Li 외 arxiv

Camouflaged Object Detection (COD) aims to segment targets that share extreme textural and structural similarities with their complex environments. Leveraging their capacity for long-range dependency modeling, Transforme…

Object Detection

BFA++: Hierarchical Best-Feature-Aware Token Prune for Multi-View Vision Language Action Model

2026-02-24 · Haosheng Li, Weixin Mao, Zihan Lan, Hongwei Xiong 외 arxiv

Vision-Language-Action (VLA) models have achieved significant breakthroughs by leveraging Large Vision Language Models (VLMs) to jointly interpret instructions and visual inputs. However, the substantial increase in visu…

Computational Efficiency

Adaptive Federated Pruning in Hierarchical Wireless Networks

2023-05-15 · Xiaonan Liu, Shiqiang Wang, Yansha Deng, Arumugam Nallanathan

Federated Learning (FL) is a promising privacy-preserving distributed learning framework where a server aggregates models updated by multiple devices without accessing their private datasets. Hierarchical FL (HFL), as a …

Federated LearningPrivacy Preserving

Multi-Source Knowledge Pruning for Retrieval-Augmented Generation: A Benchmark and Empirical Study

2024-09-03 · Shuo Yu, Mingyue Cheng, Jiqian Yang, Jie Ouyang 외

Retrieval-augmented generation (RAG) is increasingly recognized as an effective approach for mitigating the hallucination of large language models (LLMs) through the integration of external knowledge. While numerous effo…

BenchmarkingHallucinationRAGRetrieval+1