Accelerating Retrieval-Augmented Language Model Serving with Speculation
Zhihao Zhang, Alan Zhu, Lijie Yang, Yihua Xu, Lanting Li, Phitchaya, Mangpo Phothilimthana, Zhihao Jia

TL;DR
This paper introduces RaLMSpec, a framework that accelerates retrieval-augmented language model serving by speculative retrieval and batched verification, achieving significant speed-ups while maintaining output quality.
Contribution
RaLMSpec is a novel speculation-inspired approach that reduces retrieval overhead in iterative RaLM, incorporating prefetching and asynchronous verification for optimal acceleration.
Findings
Achieves up to 2.39x speed-up in iterative RaLM with exact dense retrievers.
Achieves up to 7.59x speed-up in KNN-LM serving with exact dense retrievers.
Maintains comparable generation quality to baseline models.
Abstract
Retrieval-augmented language models (RaLM) have demonstrated the potential to solve knowledge-intensive natural language processing (NLP) tasks by combining a non-parametric knowledge base with a parametric language model. Instead of fine-tuning a fully parametric model, RaLM excels at its low-cost adaptation to the latest data and better source attribution mechanisms. Among various RaLM approaches, iterative RaLM delivers a better generation quality due to a more frequent interaction between the retriever and the language model. Despite the benefits, iterative RaLM usually encounters high overheads due to the frequent retrieval step. To this end, we propose RaLMSpec, a speculation-inspired framework that provides generic speed-up over iterative RaLM while preserving the same model outputs through speculative retrieval and batched verification. By further incorporating prefetching,…
Peer Reviews
Decision·Submitted to ICLR 2024
1. It presents several techniques to speedup the retrieval-augmented language model serving. 2. It achieves speedup over the baseline approach and seems satisfactory.
1. The overall contribution of the paper is not quite enough to present in ICLR. 2. The novelty of the paper is limitted.
The idea of speculative retrieval sounds interesting and may reduce the number of calls to the large external corpora. It can potentially save cost of serving an iterative RAG system.
I am primarily concerned about the significance of this work. Firstly, I am unsure about the practicality of iterative RAG. From my understanding, current AI-powered search engines like Bing Chat do not operate iteratively. Instead, they perform retrieval all at once and then apply RAG. These systems typically have a cache system that stores the results of common queries, thereby saving the cost of performing retrieval for each query. The only difference between this paper and these common prac
1. Empirical results are impressive: RaLMSpec achieved better performance in terms of speed and accuracy. In the meantime, RaLMSpec achieved comparable or better accuracy than the baseline approach while providing a significant speed-up. 2. The presentation and the technique proposed are clear: batching, prefetching, asynchronicity, and scheduling. While none of this is new standalone, the authors combine them clearly and cleverly to boost the overall performance of augmented retrieval.
1. The ablation study does not shed light on which component contributes the most to the performance gain. It would be nice to have a breakdown on how much batching, prefetching, asynchronicity, and scheduling contributed to the overall performance improvement to give more insights about the characteristics of the workload.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsTopic Modeling · Natural Language Processing Techniques · Multimodal Machine Learning Applications
MethodsBalanced Selection
