From Retrieved Context to Runtime Control: Adaptive Compression for Edge-based RAG
Edge devices running RAG need to decide on the fly how much to compress retrieved text, or they waste energy
RAG systems make answers more accurate by pulling in outside documents, but longer retrieved text costs edge devices extra time and power. This paper measures that tradeoff on an NVIDIA Jetson AGX Thor edge device and finds a sweet-spot compression range: too little compression wastes energy, too much hurts answer quality. A middle-ground compression level cut GPU energy use by up to 53.2% and total device energy by up to 48.2%, with almost no drop in answer quality.
What they did
- For 7B-8B parameter language models, the answer-generation step alone (not retrieval or compression) eats up about 90% of per-query time and 91% of GPU energy
- Sweeping the compression rate of LLMLingua-2 from 1.0 down to 0.15 showed answer quality (F1 score) staying stable between rate 1.0 and 0.3, then dropping sharply by 4-10 points at rate 0.15
- Mild compression at rate 0.9 actually wastes energy overall because the compressor itself has a fixed cost (130-310 milliseconds per query) that outweighs the small savings; real energy savings only kick in from rate 0.7 downward
- Rate 0.3 emerges as the 'safe but aggressive' sweet spot, with energy savings growing from 30% to 53% depending on model size and how many documents are retrieved
- The authors argue for a runtime controller that watches live device signals like latency, energy, and temperature to decide when and how much to compress, instead of using one fixed compression setting

| 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 |
Why it matters
For developers building RAG on phones, robots, or AR devices with limited battery and heat budgets, this shows that aggressive fixed compression can backfire and identifies a safe operating point (rate 0.3). It reframes compression as a live resource-management decision tied to device state, not a one-time preprocessing choice.
Terms in this paper
- RAG (Retrieval-Augmented Generation) · A method where a language model retrieves outside documents before answering, to ground its response in real information
- context compression · Trimming or shortening retrieved documents before feeding them to the model, to reduce input length
- compression rate · The fraction of original text kept after compression; rate=0.3 means only 30% of the text remains
- LLMLingua-2 · A text compression tool that removes less-important tokens while keeping the rest of the text intact
- edge SoC · A power- and heat-constrained system-on-chip used in devices like phones or robots, such as the Jetson AGX Thor tested here
Original abstract (English)
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.
Read on arXivLatest papers
- LoRA-GA$^2$: Low Rank Adaptation with Multi-step Gradient Adaptive AlignmentPeeking at a few early training gradients before fine-tuning starts to set up LoRA smarter
- Remember, Verify, or Ask? Cross-Family Evaluation of Memory Commitment in LLM AgentsAI assistants would rather double-check facts than ask you a question, even when asking is the right call
- Robust Incomplete Multimodal Sentiment Analysis via Iterative Proxy CorrectionWhen text input is missing or broken, this AI doesn't guess once and move on—it revises its guess step by step to read emotions more reliably
- Generating Diverse Personas for User Simulators to Test Interview Dialogue SystemsTo test interview-style chatbots you need many different fake users, so this work has an LLM automatically generate those fake user personalities
- Rethinking Patch Based Multivariate Time Series Forecasting with Semantic Structured PartitioningA new way to slice time series into meaningful chunks instead of arbitrary equal-length pieces
- Reliable Financial Named Entity Recognition under Domain ShiftAn AI's confidence trained on formal filings turns unreliable once it reads tweets
- Bringing analytic rigor to agentic AI for science: The Brain Researcher platform for neuroimaging data analysisA system that makes AI show its work when analyzing brain-imaging data, not just deliver an answer
- GenMatch: An End-to-End Generative Matching Framework for Micro-View Order-Dispatching in Ride-HailingDiDi replaced its multi-step ride-hailing dispatch pipeline with one generative model and saw real-world gains
Latest from METAL LAB
- Google Discover adds chatbot that adjusts your feed based on spoken preferences
- OpenAI Closes In on Anthropic Again in Enterprise Spending Share
- Meta Unveils First 10 Tasks in WildArtifactBench, a Benchmark for AI Agents
- Musk: "Optimus + Grok will one day handle healthcare for all humanity"
- 35% of Web Pages Published Since ChatGPT Show Signs of AI Authorship
Figures: Zlatan Feric et al., arXiv:2608.19535, arxiv-nonexclusive