논문 해설
Accelerating Retrieval-Augmented Generation
검색 증강 생성 가속화
- 연구 문제 RAG에서 검색 품질이 생성 정확도와 추론 시간을 좌우하지만, 정확한 검색은 메모리 대역폭 때문에 느립니다.
- 연구 방법 IKS는 CXL 메모리 확장 장치에 근접 메모리 가속기를 배치하고 CXL.cache로 CPU와 협업하여 정확한 검색을 가속합니다.
- 주요 결과 저자들은 512GB 코퍼스에서 검색을 13.4–27.9배, 엔드투엔드 추론을 1.7–26.3배 빠르게 했다고 보고합니다.
RAG 검색 품질과 추론 시간의 딜레마
RAG는 외부 지식 원천에서 찾은 문서를 LLM에 덧붙여 답을 생성하는 방식입니다. 이 논문은 검색 단계가 생성 정확도와 추론 시간에 어떤 영향을 주는지 먼저 프로파일링합니다. 근사 최근접 이웃 검색(ANNS)은 검색 속도를 높이지만 품질을 낮추고, 낮은 품질을 보완하려고 더 많은 문서를 생성 모델에 넣으면 오히려 전체 추론 시간이 늘어납니다. 반면 정확한 최근접 이웃 검색(ENNS)은 모든 임베딩을 훑어야 하므로 메모리 대역폭 제약 때문에 비용이 큽니다. 따라서 이 논문은 정확한 검색을 고성능으로 가속하는 문제를 다룹니다.

Fig. 1 . Overview of the Retrieval-Augmented Generation (RAG) pipeline.
원문 · CC BY 4.0 · Derrick Quinn, Mohammad Nouri, Neel Patel, John Salihu, Alireza Salemi, Sukhan Lee, Hamed Zamani, Mohammad Alian · Accelerating Retrieval-Augmented Generation · 원문 그림 인용 · 원본 PDF 1쪽에서 그림 영역을 추출했습니다.
Fig. 2 . Generation accuracy vs. throughput (Queries/sec) of representative RAG applications for various retrieval algorithms and document counts (K). The corpus size is set to 50 GB and batch size to 16.
원문 · CC BY 4.0 · Derrick Quinn, Mohammad Nouri, Neel Patel, John Salihu, Alireza Salemi, Sukhan Lee, Hamed Zamani, Mohammad Alian · Accelerating Retrieval-Augmented Generation · 원문 그림 인용 · 원본 PDF 4쪽에서 그림 영역을 추출했습니다.IKS의 근접 메모리 ENNS 가속 구조
IKS는 type-2 CXL 장치이며 LPDDR5X 패키지마다 근접 메모리 가속기(NMA)를 하나씩 붙인 확장형 구조입니다. 임베딩 벡터는 블록 단위로 DRAM에 배치되고, 각 NMA는 질의 벡터와 임베딩의 내적을 병렬로 계산한 뒤 부분 top-32 목록을 출력합니다. 호스트 CPU는 CXL.cache 경로의 컨텍스트 버퍼와 도어벨을 통해 작업을 시작하고 완료를 통지받으며, 마지막에 부분 목록을 집계해 최종 top-K를 만듭니다. 이 설계는 ENNS의 메모리 접근이 규칙적이고 데이터 재사용이 적다는 관찰에 기대고 있습니다.

Fig. 4 . Roofline model for ENNS using Batch Size 1 and 16. See Section 6 for the experimental setup.
원문 · CC BY 4.0 · Derrick Quinn, Mohammad Nouri, Neel Patel, John Salihu, Alireza Salemi, Sukhan Lee, Hamed Zamani, Mohammad Alian · Accelerating Retrieval-Augmented Generation · 원문 그림 인용 · 원본 PDF 6쪽에서 그림 영역을 추출했습니다.
Fig. 6 . CPU-IKS interface through cache coherent CXL interconnect. buffers. Next, the host process writes into a doorbell regis- ter, which is mapped to a cache line shared by NMAs. NMAs poll on the doorbell register, and as soon as there is a change, the offload starts (step 4). Once the host updates the doorbell register, it callsumwait() to monitor the register for changes from the IKS side. Before computation in the NMA can start, the NMA reads the offload context from the IKS cache (step 5) and the context written by the host is moved to NMA’s scratchpad. Once the NMA computation is complete, the NMA updates the context buffers with the partial list of similarity scores and physical addresses of the corresponding embedding vectors. Lastly, the NMA writes into the doorbell register, and the host gets notified of the completion of the offload through theumwait() mechanism (step 11). Our experimental results on a two-socket Sapphire Rapids CPU show that communicating the offload context through cache-coherent shared memory provides 1.6× higher through- put compared with using non-temporal writes that mimic the PCIe MMIO datapath (i.e., CXL.io). Using a cache-coherent in- terconnect to implement the notification mechanism through the producer/consumer-style doorbell register eliminates the need for expensive interrupt or polling mechanisms.
원문 · CC BY 4.0 · Derrick Quinn, Mohammad Nouri, Neel Patel, John Salihu, Alireza Salemi, Sukhan Lee, Hamed Zamani, Mohammad Alian · Accelerating Retrieval-Augmented Generation · 원문 그림 인용 · 원본 PDF 8쪽에서 그림 영역을 추출했습니다.검색 가속과 엔드투엔드 추론 시간 결과
원문은 512GB 벡터 데이터베이스에서 IKS가 정확한 검색을 CPU 대비 13.4–27.9배 빠르게 수행한다고 보고합니다. 같은 설계를 대표 RAG 응용에 적용했을 때 엔드투엔드 추론 시간은 1.7–26.3배 낮아졌다고 보고합니다. 이 수치는 저자들이 구현한 시뮬레이터와 측정 조건에서 얻은 것이며, 배치 크기와 문서 수 K에 따라 범위가 달라집니다.

Fig. 9 . Comparison of ENNS retrieval time for CPU, AMX, GPU (1, 2, 4, and 8 devices), and IKS (1, and 4 devices) for various corpus sizes. The absence of bars in specific GPU and IKS configurations indicates that the corpus exceeds the capacity of the accelerator memory. The Y-axis is in log-scale.
원문 · CC BY 4.0 · Derrick Quinn, Mohammad Nouri, Neel Patel, John Salihu, Alireza Salemi, Sukhan Lee, Hamed Zamani, Mohammad Alian · Accelerating Retrieval-Augmented Generation · 원문 그림 인용 · 원본 PDF 10쪽에서 그림 영역을 추출했습니다.
Fig. 10 . Inference time breakdown of CPU vs. IKS retrieval forFiDT5, Llama-8B, and Llama-70B. Generative model runs on GPU.
원문 · CC BY 4.0 · Derrick Quinn, Mohammad Nouri, Neel Patel, John Salihu, Alireza Salemi, Sukhan Lee, Hamed Zamani, Mohammad Alian · Accelerating Retrieval-Augmented Generation · 원문 그림 인용 · 원본 PDF 11쪽에서 그림 영역을 추출했습니다.전체 코퍼스 탐색과 적용 범위
IKS는 전체 코퍼스를 빠짐없이 검색하므로 에너지를 소모하고 메모리 대역폭을 포화시킵니다. 이 때문에 IKS를 메모리 확장 장치로 함께 쓰는 다른 응용에 대역폭 간섭이 생길 수 있습니다. 원문은 데이터셋이 군집화에 적합하면 ANNS와의 정확도 차이가 줄어들어 ANNS가 더 매력적일 수 있다고 설명합니다.

Fig. 11 . Comparison of accuracy and throughput ofFiDT5, Llama-8B, and Llama-70B for various configurations. ANNS-2 is an HNSW index withM, efConstruction, and efSearch of 32, 128, and 2048, respectively.
원문 · CC BY 4.0 · Derrick Quinn, Mohammad Nouri, Neel Patel, John Salihu, Alireza Salemi, Sukhan Lee, Hamed Zamani, Mohammad Alian · Accelerating Retrieval-Augmented Generation · 원문 그림 인용 · 원본 PDF 12쪽에서 그림 영역을 추출했습니다.논문 정보
- 저자
- Derrick Quinn, Mohammad Nouri, Neel Patel, John Salihu, Alireza Salemi, Sukhan Lee, Hamed Zamani, Mohammad Alian
- 학회·저널
- arXiv · 프리프린트
- 최초 공개일
- 2024년 12월 14일
- 등록일
- 2026년 11월 5일
- 수정일
- 2024년 12월 14일
- 버전
- v1
- arXiv
- 2412.15246
- 분류
- cs.CL · cs.AI · cs.AR · cs.DC · cs.IR
- 원문 이용 조건
- CC BY 4.0
- 제공 범위
- 논문 정보, 해설, 허용된 원문 그림
AI 해설은 논문 원문과 별개의 설명이며 오류가 있을 수 있습니다. 원문과 그림은 각 출처의 이용 조건과 따로 표시된 권리를 따릅니다.
초록
An evolving solution to address hallucination and enhance accuracy in large language models (LLMs) is Retrieval-Augmented Generation (RAG), which involves augmenting LLMs with information retrieved from an external knowledge source, such as the web. This paper profiles several RAG execution pipelines and demystifies the complex interplay between their retrieval and generation phases. We demonstrate that while exact retrieval schemes are expensive, they can reduce inference time compared to approximate retrieval variants because an exact retrieval model can send a smaller but more accurate list of documents to the generative model while maintaining the same end-to-end accuracy. This observation motivates the acceleration of the exact nearest neighbor search for RAG. In this work, we design Intelligent Knowledge Store (IKS), a type-2 CXL device that implements a scale-out near-memory acceleration architecture with a novel cache-coherent interface between the host CPU and near-memory accelerators. IKS offers 13.4-27.9x faster exact nearest neighbor search over a 512GB vector database compared with executing the search on Intel Sapphire Rapids CPUs. This higher search performance translates to 1.7-26.3x lower end-to-end inference time for representative RAG applications. IKS is inherently a memory expander; its internal DRAM can be disaggregated and used for other applications running on the server to prevent DRAM, which is the most expensive component in today's servers, from being stranded.
원문 인용
Derrick Quinn, Mohammad Nouri, Neel Patel, John Salihu, Alireza Salemi, Sukhan Lee, Hamed Zamani, Mohammad Alian (2024). Accelerating Retrieval-Augmented Generation. arXiv:2412.15246v1. https://arxiv.org/abs/2412.15246v1
BibTeX
@misc{quinn2024accelerating,
title = {{Accelerating Retrieval-Augmented Generation}},
author = {Derrick Quinn and Mohammad Nouri and Neel Patel and John Salihu and Alireza Salemi and Sukhan Lee and Hamed Zamani and Mohammad Alian},
year = {2024},
eprint = {2412.15246},
archivePrefix = {arXiv},
url = {https://arxiv.org/abs/2412.15246v1}
}