From Retrieved Context to Runtime Control: Adaptive Compression for Edge-based RAG
엣지 기기에서 RAG 돌릴 때, 검색된 문서를 얼마나 압축할지 '실시간으로' 정해야 에너지를 아낄 수 있다
RAG는 외부 문서를 참고해 답변을 만들지만, 검색된 문서가 길어질수록 엣지 기기에서 시간과 전력을 많이 잡아먹는다. 이 논문은 젯슨 AGX Thor라는 엣지 기기에서 문서를 얼마나 압축해야 하는지 실측했는데, 압축을 너무 적게 하면 오히려 손해고 너무 많이 하면 답변 품질이 떨어지는 '적정 구간'이 있음을 확인했다. 적당한 수준의 압축은 GPU 에너지를 최대 53.2%, 전체 기기 에너지를 최대 48.2% 줄이면서도 답변 품질은 거의 유지했다.
무엇을 했나
- 7B~8B 크기의 큰 언어모델을 쓸 때는 문서 검색이나 압축이 아니라 답변을 생성하는 단계가 전체 시간의 약 90%, GPU 에너지의 약 91%를 차지한다는 것을 실측으로 확인했다
- LLMLingua-2라는 압축 도구로 압축 비율(rate)을 0.15부터 1.0까지 바꿔가며 실험한 결과, 압축률 1.0~0.3 구간에서는 답변 품질(F1 점수)이 거의 그대로 유지되다가 0.15로 가면 품질이 4~10점 뚝 떨어진다
- 압축률 0.9처럼 살짝만 압축하면 압축 작업 자체에 드는 고정 비용(130~310밀리초) 때문에 오히려 전체 에너지가 늘어나고, 0.7 이하로 압축해야 에너지 절감 효과가 나타난다
- 압축률 0.3을 '안전하면서도 공격적인' 지점으로 제시했으며, 모델 크기와 검색 문서 개수(top-k)가 클수록 절감 효과가 30%에서 53%까지 커진다
- 고정된 압축률을 미리 정해두는 대신, 기기의 실시간 상태(지연시간, 에너지, 온도 등)를 보고 압축 여부와 강도를 그때그때 결정하는 '제어기'가 필요하다고 주장한다

| Item | Configuration |
|---|---|
| Platform | Jetson AGX Thor: Blackwell GPU, 128 GB LPDDR5x, 273 GB/s, 130 W. |
| Corpus / index | English Wikipedia 2018, sentence-split via FlashRAG (∼9.4 M passages) (16); e5-base-v2 encoder (50); FAISS GPU IndexFlatL2 ( 28.2 GB). |
| QA Datasets | Natural Questions (20) and HotpotQA (54); 100 seed-paired queries per config. |
| Models | Llama-3.2 1B/3B, Llama-3.1 8B (9); Qwen-2.5 1.5B/3B/7B (53). All fp16. |
| Compression | None, or LLMLingua-2 (34) |
| Sweeps | Exp. 1 uses k∈{1,5,10} with compression off. Exp. 2 uses HotpotQA, k∈{5,10}, and LLMLingua-2 rates 1.0, 0.9, 0.7, 0.5, 0.3, and 0.15. |
| Controls | Single-query mode, reranker off, standard pipeline, randomized config order, first 3 queries dropped as warm-up. |
| Metrics/telemetry | EM, token-level F1, retrieval recall; end-to-end and per-stage latency; GPU/SoC energy, power, memory, and temperature from tegrastats at 100 ms cadence. |
| Model | k | Δlat. | ΔEGPU | ΔESoC | ΔEM | ΔF1 |
|---|---|---|---|---|---|---|
| Llama-3B | 5 | +8.5% | +30.2% | +28.2% | +0.000 | −0.005 |
| Llama-3B | 10 | +15.6% | +40.6% | +35.1% | +0.010 | +0.012 |
| Llama-8B | 5 | +25.2% | +44.9% | +38.5% | +0.052 | +0.016 |
| Llama-8B | 10 | +32.6% | +53.2% | +48.2% | +0.000 | −0.011 |
왜 중요한가
스마트폰, 로봇, AR 기기처럼 배터리와 발열 제약이 있는 엣지 기기에서 RAG를 쓰려는 개발자에게, 문서 압축을 무작정 세게 걸면 오히려 손해라는 사실과 안전한 압축 지점(0.3)을 알려준다. 압축을 정적인 전처리가 아니라 기기 상태에 따라 조절하는 실시간 자원 관리 문제로 봐야 한다는 방향을 제시한다.
이 논문의 용어
- RAG(검색증강생성) · 질문에 답하기 전 외부 문서를 검색해 그 내용을 참고하여 답변을 만드는 방식
- 컨텍스트 압축 · 검색된 문서에서 덜 중요한 부분을 잘라내거나 요약해 모델에 넣는 입력 길이를 줄이는 기법
- 압축률(rate) · 압축 후에도 남겨두는 원문 토큰의 비율. rate=0.3이면 원문의 30%만 남긴다는 뜻
- LLMLingua-2 · 중요하지 않은 토큰을 골라 제거하는 방식의 대표적인 텍스트 압축 도구
- 엣지 SoC · 스마트폰이나 로봇 등에 들어가는, 배터리와 발열 제약이 있는 저전력 시스템온칩(예: 젯슨 AGX Thor)
논문 원문 초록 (영문)
Retrieval-augmented generation (RAG) improves language-model responses by grounding generation in external passages, which comes with overhead: retrieved context lengthens the prompt, increasing prefill work, KV-cache footprint, memory traffic, latency, and energy. Context compression offers a natural remedy by pruning retrieved text before generation. However, state-of-the-art context-compression methods are typically used with a fixed compression budget, or with the rate selected offline and then applied at inference time. This static view ignores both workload variation and the live state of the edge device. On an edge SoC, compression is not free: the compressor itself runs on the same SoC and consumes latency and energy that can offset any generation savings. This paper proposes a vision for telemetry-informed adaptive compression in edge RAG, grounded in experimental evidence. We characterize the compression tradeoff on the NVIDIA Jetson AGX Thor using Llama and Qwen generators, Natural Questions and HotpotQA datasets, and LLMLingua-2 compression. Our measurements show that generation dominates the RAG budget for larger models, reaching roughly 90% of per-query latency and 91% of GPU energy for 7B-8B generators. Exploring the impact of the compression rate reveals an adaptive operating region: mild compression can miss energy opportunities, and overly aggressive compression can hurt inference quality. Intermediate compression can reduce GPU energy by up to 53.2%, and SoC energy by up to 48.2%, with negligible quality loss. We argue for runtime policies that dynamically manage compression, guided by workload features and edge telemetry.
arXiv에서 원문 보기최신 논문
- Specification-delta-driven data governance: an empirical study of the {\guillemotleft}spec-delta{\guillemotright} as the unit of change in lakehouse data platforms데이터 플랫폼 변경도 코드처럼 '설계도 조각'을 붙여서 검토하면 어떨까: 실험 설계 논문
- Are LLMs becoming similarly creative? Evidence from three years of models최신 AI 챗봇일수록 서로 비슷한 답을 내놓는다는 3년치 조사 결과
- Auditing Cross-Lingual Fairness in Language Model WatermarkingAI 생성 텍스트를 잡아내는 워터마크 기술이 영어 아닌 언어에서는 훨씬 부실하게 작동하고, 그 격차는 개별 언어가 아니라 언어 계열 단위로 나타난다
- TESTNAV: Pareto-Guided Search for Compositional Robustness TestingAI 모델을 여러 손상이 겹친 입력으로 시험할 때, 굳이 다 테스트하지 않고도 '진짜 위험한 실패'만 골라내는 탐색법
- Optimal Skill Selection for LLM Agents with Provable Bicriteria GuaranteesAI 에이전트에게 어떤 '스킬 문서'를 몇 개나 줘야 잘 작동하는지, 수학적으로 최적해를 보장하며 골라주는 방법
- Reliable Financial Named Entity Recognition under Domain Shift금융 AI가 서류체 문장에서 배운 자신감은 트위터로 가면 거짓말이 된다
- FlashPrefill V2: Block-Sparse Prefill Attention for Long-Context LLM Serving논문 속 시연이 아니라 실제 서비스에 넣을 수 있는 희소 어텐션 만들기
- Robust Incomplete Multimodal Sentiment Analysis via Iterative Proxy Correction텍스트가 빠지거나 망가져도, AI가 그 자리를 대신할 '가짜 텍스트'를 한 번에 만들지 않고 여러 번 고쳐가며 감정을 더 정확히 읽어낸다
METAL LAB 최신 기사
그림 출처: Zlatan Feric et al., arXiv:2608.19535, arxiv-nonexclusive