paper-with-me

Papers

SpecAgent: A Speculative Retrieval and Forecasting Agent for Code Completion

2025-10-20 · George Ma, Anurag Koul, Qi Chen, Yawen Wu, Sachit Kuhar, Yu Yu, Aritra Sengupta, Varun Kumar, Murali Krishna Ramanathan arxiv

Large Language Models (LLMs) excel at code-related tasks but often struggle in realistic software repositories, where project-specific APIs and cross-file dependencies are crucial. Retrieval-augmented methods mitigate this by injecting repository context at inference time. The low inference-time latency budget affects either retrieval quality or the added latency adversely impacts user experience. We address this limitation with SpecAgent, an agent that improves both latency and code-generation quality by proactively exploring repository files during indexing and constructing speculative context that anticipates future edits in each file. This indexing-time asynchrony allows thorough context computation, masking latency, and the speculative nature of the context improves code-generation quality. Additionally, we identify the problem of future context leakage in existing benchmarks, which can inflate reported performance. To address this, we construct a synthetic, leakage-free benchmark that enables a more realistic evaluation of our agent against baselines. Experiments show that SpecAgent consistently achieves absolute gains of 9-11% (48-58% relative) compared to the best-performing baselines, while significantly reducing inference latency.

📄 PDF Abstract BibTeX arXiv:2510.17925

Code (0)

등록된 구현이 없습니다.

Tasks

Code Completion

Similar Papers 제목 키워드 기반

HaS: Accelerating RAG through Homology-Aware Speculative Retrieval

2026-04-22 · Peng Peng, Weiwei Lin, Wentai Wu, Xinyang Wang 외 arxiv

Retrieval-Augmented Generation (RAG) expands the knowledge boundary of large language models (LLMs) at inference by retrieving external documents as context. However, retrieval becomes increasingly time-consuming as the …

RASD: Retrieval-Augmented Speculative Decoding

2025-03-05 · Guofeng Quan, Wenfeng Feng, Chuzhan Hao, Guochao Jiang 외

Speculative decoding accelerates inference in large language models (LLMs) by generating draft tokens for target model verification. Current approaches for obtaining draft tokens rely on lightweight draft models or addit…

Retrieval

REST: Retrieval-Based Speculative Decoding

2023-11-14 · Zhenyu He, Zexuan Zhong, Tianle Cai, Jason D. Lee 외

We introduce Retrieval-Based Speculative Decoding (REST), a novel algorithm designed to speed up language model generation. The key insight driving the development of REST is the observation that the process of text gene…

Language ModelingLanguage ModellingRetrievalText Generation

AsymSpec: Context-Asymmetric Speculative Decoding for Agentic LLMs

2026-08-26 · Sheng Liang, Yongyue Zhang, Nathanael Brian, Hang Lv 외 arxiv

Agentic LLM pipelines face escalating inference costs as context accumulates across retrieval, tool use, and multi-turn interactions. To control latency, deployments routinely compress inputs, but this degrades task accu…

SAM Decoding: Speculative Decoding via Suffix Automaton

2024-11-16 · Yuxuan Hu, Ke Wang, Xiaokang Zhang, Fanjin Zhang 외

Speculative decoding (SD) has been demonstrated as an effective technique for lossless LLM inference acceleration. Retrieval-based SD methods, one kind of model-free method, have yielded promising speedup, but they often…

RetrievalText Generation