Introduction
Retrieval-Augmented Generation (RAG) has become a cornerstone for enhancing Large Language Models (LLMs) with external knowledge. However, a significant challenge arises from the "data split" between massive public datasets in the cloud and sensitive personal data on edge devices. Centralized RAG often compromises privacy by requiring data uploads, while traditional distributed RAG suffers from extreme latency due to the overhead of synchronizing Key-Value (KV) caches across networks.
The DRAGON Framework
To address these bottlenecks, we introduce DRAGON (Distributed RAG framework). DRAGON treats the RAG process as a parallel operation across the cloud and the device, utilizing several key innovations:
Distributed Retrieval and Speculative Aggregation
Instead of merging documents before processing, DRAGON allows the cloud and device to independently retrieve documents and generate "draft" token distributions. Inspired by speculative decoding, the Speculative Aggregation algorithm enables both sides to generate tokens asynchronously. An aggregator verifies these tokens; if they align (common for frequent words), the system accelerates. Disagreements trigger a rollback and correction, effectively hiding network latency behind local computation.
Greedy Scheduling and Preemption
DRAGON employs a real-time Greedy Scheduler that monitors network jitter and decoding speeds to dynamically assign the "Aggregator" role to the side that minimizes total wait time. Furthermore, Layer-wise Preemption allows the model to interrupt generation mid-layer upon receiving a rejection signal, saving valuable computational resources.
Experimental Evaluation
The framework was evaluated using models like Qwen2.5-1.5B and OPT-1.3B on standard benchmarks (WikiText-2/103) and a 21-million document Wikipedia corpus.
Performance and Latency
DRAGON achieved up to 1.9x performance gains in perplexity compared to standalone models. Crucially, it reduced per-token latency by nearly 50% in high-latency (300ms) network environments compared to standard synchronized distributed RAG.
Time to First Token (TTFT)
One of the most significant advantages of DRAGON is its impact on the Time to First Token. Traditional distributed methods often struggle with massive KV cache transfers, leading to significant delays. As shown in the experimental results, DRAGON maintains a near-instantaneous TTFT regardless of network latency, whereas other methods can be up to 15.3x slower.
Conclusion
DRAGON successfully bridges the gap between cloud-scale knowledge and device-side privacy. By leveraging speculative aggregation and intelligent scheduling, it provides a high-performance, low-latency solution for distributed RAG, making sophisticated AI more accessible on edge devices without compromising data security.
Summary updated