ImageNet classification with deep convolutional neural networks
Alex Krizhevsky, Ilya Sutskever et al.
133
Citations
17
Influential Citations
ACM Transactions on Computer Systems
Venue
2025
Year
Retrieval-Augmented Generation (RAG) has demonstrated substantial advancements in various natural language processing tasks by integrating the strengths of large language models (LLMs) and external knowledge databases. However, the retrieval step introduces long sequence generation and extra data dependency, resulting in long end-to-end latency. Our analysis benchmarks current RAG systems and reveals that, while the retrieval step poses performance challenges, it also offers optimization opportunities through its retrieval pattern and streaming search behavior. We propose RAGCache, a latency-optimized serving system tailored for RAG. RAGCache leverages the retrieval pattern to organize and cache the intermediate states of retrieved knowledge in a knowledge tree across the GPU and host memory hierarchy, reducing LLM generation time. RAGCache employs dynamic speculative pipelining to exploit the streaming search behavior, overlapping retrieval with LLM generation to minimize end-to-end latency. We implement RAGCache based on vLLM and Faiss, and evaluate it on both open-source and production datasets. Experimental results demonstrate that RAGCache reduces the time to first token (TTFT) by up to 4× and improves the throughput by up to 2.1× compared to vLLM integrated with Faiss.
Retrieval-Augmented Generation (RAG) has become a cornerstone for integrating external knowledge into large language models, but its practical deployment is hampered by high latency due to long sequence generation and retrieval dependencies. This paper identifies that while retrieval introduces performance challenges, it also offers unique optimization opportunities through its retrieval pattern and streaming search behavior. By addressing these, RAGCache provides a systematic solution to reduce end-to-end latency, which is crucial for real-time applications like chatbots and question answering.
The significance is underscored by the growing adoption of RAG in industry. As models scale and knowledge bases expand, the latency bottleneck becomes more pronounced. RAGCache's approach of caching intermediate states and overlapping retrieval with generation is a novel contribution that could influence future RAG serving architectures.
The evaluation on both open-source and production datasets shows that RAGCache reduces time to first token (TTFT) by up to 4× and improves throughput by up to 2.1× compared to a baseline of vLLM integrated with Faiss. These gains are substantial, indicating that the caching and pipelining strategies effectively mitigate the latency overhead of retrieval.
RAGCache addresses a critical bottleneck in RAG serving, making it more viable for latency-sensitive applications. Its techniques could be extended to other retrieval-augmented systems and inspire further research in caching and pipelining for LLM inference. The work also highlights the importance of co-designing retrieval and generation for end-to-end performance, a direction likely to gain traction as RAG becomes more prevalent.
Alex Krizhevsky, Ilya Sutskever et al.
Ashish Vaswani, Noam Shazeer et al.
Douglas M. Bates, Martin Mächler et al.
Diederik P. Kingma, Jimmy Ba