Detail View

LoRA-RAG: Scalable Long-Context Augmentation for LLM Serving

Citations

WEB OF SCIENCE

Citations

SCOPUS

Metadata Downloads

DC Field Value Language
dc.contributor.advisor 김예성 -
dc.contributor.author Chanwoo Moon -
dc.date.accessioned 2026-01-23T10:56:20Z -
dc.date.available 2026-01-24T06:00:37Z -
dc.date.issued 2026 -
dc.identifier.uri https://scholar.dgist.ac.kr/handle/20.500.11750/59704 -
dc.identifier.uri http://dgist.dcollection.net/common/orgView/200000947911 -
dc.description AI System|LLM|RAG|AI Optimization|AI 시스템|대규모 언어 모델|검색증강생성|AI 최적화 -
dc.description.abstract 본 논문은 실시간 LLM 서빙 환경에서 기존 RAG(Retrieval-Augmented Generation)가 갖는 근본적 한계, 즉 검색된 청크를 프롬프트에 직접 붙이면서 입력 길이가 길어지고 그 결과 추론 지연시간(latency) 과 KV cache 메모리 사용량이 증가하는 문제를 출발점으로 삼는다. 최근 LLM의 최대 context length가 확장되면서 RAG 실험에서 사용되는 입력 토큰 수 역시 전반적으로 증가하는 추세이며, 이는 실제 서비스에서 비용(TCO)과 성능(SLO) 측면의 부담을 더욱 키운다. 이러한 배경에서, 청크를 텍스트로 주입하는 대신 모델 파라미터에 지식을 주입하는 Parametric RAG가 대안으로 제시되었지만, 이를 대규모 서비스에 적용하기에는 (1) LoRA 저장 공간 폭증, (2) 여러 LoRA 병합 시 정확도 저하, (3) 모든 청크에 대한 LoRA 학습 비용이라는 세 가지 핵심 문제가 존재한다.
이를 해결하기 위해 본 논문은 LoRA-RAG를 제안한다. LoRA-RAG는 서빙 로그에서 얻은 쿼리–청크–답변(Query log) 정보를 기반으로, 실제 요청에서 함께 사용(공동 검색)되는 청크들을 하이퍼엣지(hyperedge) 로 묶어 시간적 접근 패턴(temporal locality) 을 반영하는 방식으로 청크를 클러스터링한다. 그리고 각 클러스터 단위로 여러 청크를 하나의 LoRA에 공동 학습시켜, 추론 시 여러 LoRA를 합치는 병합(merge) 상황을 구조적으로 줄인다. 또한 일부 청크만 LoRA로 커버되더라도, 커버된 청크는 LoRA로 대체하고 커버되지 않은 청크는 기존 RAG처럼 프롬프트에 붙이는 하이브리드 서빙 전략을 통해 시스템 효율을 유지한다. 이때 병합으로 인한 정확도 손실을 방지하기 위해 단일 LoRA 정책을 적용하여, 여러 후보 LoRA가 존재하더라도 가장 많은 청크를 포함하는 하나의 LoRA만 선택해 사용한다.
학습 오버헤드 측면에서는, 기존 Parametric RAG처럼 청크마다 별도의 QA를 생성하기 위해 추가 LLM 호출을 수행하는 대신, 서빙 과정에서 자연스럽게 생성되는 답변을 pseudo answer로 활용해 학습 데이터를 구성함으로써 데이터 생성 비용을 절감한다. 더 나아가, 실제 서비스에서는 피크 트래픽을 기준으로 하드웨어를 프로비저닝하기 때문에 비피크 시간대에 idle resource가 발생하는데, LoRA-RAG는 이 idle time을 활용해 온라인 학습을 수행하도록 설계하였다. 스케줄러는 요청 큐가 비었을 때만 학습을 트리거하며, 학습 중에도 신규 요청이 들어오면 즉시 추론으로 전환할 수 있도록 학습을 preemptible하게 구성하여 SLO를 보장한다. 동시에, 별도의 리소스에서 수행되는 offline 학습을 병행한다.
실험 결과, LoRA-RAG는 기존 Parametric RAG 대비 정확도를 유의미하게 향상시키고, 클러스터 단위 학습을 통해 저장 공간 부담을 크게 줄이며, LoRA 커버리지가 증가할수록 프롬프트 길이 및 prefill 비용이 감소하여 end-to-end latency를 크게 절감할 수 있음을 확인하였다. 종합적으로 LoRA-RAG는 Parametric RAG의 장점은 유지하면서도, 실제 서빙 시스템에서 문제가 되는 비용·정확도·운영 측면의 난제를 해결하는 실용적인 설계로서, 대규모 RAG 기반 LLM 서비스의 효율적 운영을 위한 유망한 접근임을 보여준다

핵심어: AI 시스템, 대규모 언어 모델, 검색증강생성, AI 최적화
|Retrieval-Augmented Generation (RAG) is widely adopted to mitigate knowledge cutoff and hallucination by appending retrieved text chunks to the input prompt. However, prompt augmentation inevitably increases input length, which amplifies end-to-end latency and KV-cache memory consumption and can further degrade answer quality under long-context effects. Parametric RAG addresses this bottleneck by distilling each chunk into a lightweight adapter (e.g., LoRA) and serving queries without inserting chunk text, but it remains difficult to deploy in real serving systems due to three practical challenges: (1) prohibitive storage overhead when assigning one LoRA per chunk, (2) accuracy degradation caused by merging multiple LoRAs for a single request, and (3) excessive training overhead, including costly construction of chunk–query–answer pairs.

We propose LoRA-RAG, a serving-oriented framework that makes parametric retrieval practical at scale. LoRA-RAG clusters chunks that are frequently co-retrieved and trains a single cluster-level LoRA per cluster, reducing the need for multi-adapter merging and drastically lowering storage cost. To minimize training overhead, LoRA-RAG reuses query logs collected during normal serving—storing (query, retrieved chunks, generated answer) tuples—to construct training data without additional LLM-based QA synthesis. Furthermore, LoRA-RAG exploits off-peak idle resources via an SLO-aware scheduler that triggers preemptible online training when the request queue is empty, while also supporting offline training on dedicated resources.

Experimental results show that LoRA-RAG achieves 1.78× higher accuracy than a Parametric RAG baseline, reduces adapter storage by up to 500×, and lowers maximum end-to-end latency by up to 61% compared to conventional RAG. These results demonstrate that workload-aware clustering and log-driven training can deliver the benefits of parametric retrieval without sacrificing deployability in real-time LLM services

Keywords: AI System, LLM, RAG, AI Optimization
-
dc.description.tableofcontents List of Contents
Abstract i
List of contents ii
List of tables iv
List of figures v
Ⅰ. Introduction 1
II. Background and Related Works 2
2.1 Retrieval-Augmented Generation (RAG) 2
2.2 Optimization of RAG 4
2.2.1 Prompt Compression 5
2.2.2 KV Cache Caching 5
2.2.3 Parametric RAG (P-RAG) 6
III. Motivation 8
3.1 The Challenges of Parametric RAG 8
3.1.1 Storage overhead of LoRA 8
3.1.2 Accuracy Degradation Caused by LoRA Merging 9
3.1.3 LoRA Training Overhead 10
3.2 Ideas for Overcoming Challenges 11
3.2.1 Training Singe LoRA Adapter with Multiple Chunks 11
3.2.2 Clustering Co-occurring Chunks 13
3.2.3 Leveraging Chunk Locality 13
3.2.4 Reusing User Inference Outputs for LoRA Training 14
3.2.5 Exploiting Idle Time for LoRA Training 14
IV. Design 15
4.1 Overview 15
4.2 Hybrid Serving 15
4.3 Chunk Clustering 17
4.4 Online & Offline LoRA Training 18
V. Evaluation 19
5.1 Experimental Setup 19
5.2 Top-k Coverage with Clustered Chunks 19
5.3 Robustness to Cross-Dataset Query Shifts 20
5.4 F1 Score Comparison with RAG and Parametric RAG 20
5.5 Latency Comparison with RAG Baseline 22
VI. Discussion 23
VII. Conclusion 23
-
dc.format.extent 27 -
dc.language eng -
dc.publisher DGIST -
dc.title LoRA-RAG: Scalable Long-Context Augmentation for LLM Serving -
dc.type Thesis -
dc.identifier.doi 10.22677/THESIS.200000947911 -
dc.description.degree Master -
dc.contributor.department Department of Electrical Engineering and Computer Science -
dc.date.awarded 2026-02-01 -
dc.publisher.location Daegu -
dc.description.database dCollection -
dc.citation XT.IM 문82 202602 -
dc.date.accepted 2026-01-19 -
dc.contributor.alternativeDepartment 전기전자컴퓨터공학과 -
dc.subject.keyword AI System|LLM|RAG|AI Optimization|AI 시스템|대규모 언어 모델|검색증강생성|AI 최적화 -
dc.contributor.affiliatedAuthor Chanwoo Moon -
dc.contributor.affiliatedAuthor Yeseong Kim -
dc.contributor.alternativeName 문찬우 -
dc.contributor.alternativeName Yeseong Kim -
Show Simple Item Record

File Downloads

  • There are no files associated with this item.

공유

qrcode
공유하기

Total Views & Downloads

???jsp.display-item.statistics.view???: , ???jsp.display-item.statistics.download???: