arXiv:2504.11197cs.LGcs.AI2025-04被引 5

让小模型在设备上高效用上云端和本地知识,不泄露隐私还更快。

Efficient Distributed Retrieval-Augmented Generation for Enhancing Language Model Performance

  • 将检索生成拆成云端和设备并行处理,本地独立生成
  • 实测比单机小模型快1.9倍,延迟大幅降低
  • 适合边缘设备部署,兼顾性能与隐私安全

小型语言模型(SLMs)能在资源受限的边缘设备上高效部署,但其容量有限影响推理性能。检索增强生成(RAG)通过集成外部数据库提升模型表现,无需频繁重新训练。然而,大规模公共数据库和用户私有文档通常分处云端与设备端,现有RAG多为集中式架构。为此,我们提出分布式RAG框架DRAGON,通过融合通用与个人知识,在不泄露文档隐私的前提下增强设备端SLM性能。DRAGON将多文档RAG分解为云端与设备端独立并行的分段生成过程,并引入新型推测聚合机制——一种双向推测算法,避免频繁输出同步。此外,设计动态调度算法根据实时网络状况选择最优聚合侧。真实硬件测试表明,相较于独立小模型,DRAGON性能提升达1.9倍;相比集中式RAG,显著降低每标记延迟,且首次生成时间(TTFT)开销可忽略。

原文摘要 · Abstract (English)

Small language models (SLMs) support efficient deployments on resource-constrained edge devices, but their limited capacity compromises inference performance. Retrieval-augmented generation (RAG) is a promising solution to enhance model performance by integrating external databases, without requiring intensive on-device model retraining. However, large-scale public databases and user-specific private contextual documents are typically located on the cloud and the device separately, while existing RAG implementations are primarily centralized. To bridge this gap, we propose DRAGON, a distributed RAG framework to enhance on-device SLMs through both general and personal knowledge without the risk of leaking document privacy. Specifically, DRAGON decomposes multi-document RAG into multiple parallel token generation processes performed independently and locally on the cloud and the device, and employs a newly designed Speculative Aggregation, a dual-side speculative algorithm to avoid frequent output synchronization between the cloud and device. A new scheduling algorithm is further introduced to identify the optimal aggregation side based on real-time network conditions. Evaluations on real-world hardware testbed demonstrate a significant performance improvement of DRAGON-up to 1.9x greater gains over standalone SLM compared to the centralized RAG, substantial reduction in per-token latency, and negligible Time to First Token (TTFT) overhead.

小模型分布式RAG边缘计算

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。