VELO: A Vector Database-Assisted Cloud-Edge Collaborative LLM QoS Optimization Framework

Zhi Yao, Zhiqing Tang, Jiong Lou, Ping Shen, Weijia Jia · DOI

Abstract

As Large Language Models (LLMs) become increasingly integrated into real-time applications, the challenges of high inference latency and significant operational costs associated with cloud-based deployments have become more pronounced. This paper presents VELO, a non-invasive framework designed to optimize Quality of Service (QoS) through a cloud-edge collaborative approach. By deploying vector databases at the network edge to cache and retrieve historical request results, VELO intelligently manages LLM requests using a Multi-Agent Reinforcement Learning (MARL) scheduler. Experimental results demonstrate that VELO reduces latency and improves overall system reward by up to 15.31% compared to standard baselines, offering a scalable solution for efficient LLM deployment.

Introduction

The transformative potential of Large Language Models (LLMs) is often hindered by their computational intensity. Currently, most high-performance LLMs are hosted in centralized cloud data centers, leading to two primary bottlenecks for edge users: substantial network latency and high query costs. While model compression techniques like quantization and pruning offer some relief, they are often "invasive," requiring modifications to the model architecture that can degrade performance and limit generalizability.

VELO (Vector database-assisted cloud-Edge collaborative LLM QoS Optimization) addresses these challenges by leveraging the repetitive nature of LLM queries. By implementing an edge-based caching mechanism using vector databases, VELO can serve similar requests locally, bypassing the cloud when appropriate. The framework introduces a dynamic scheduling algorithm that balances the trade-off between response accuracy (satisfaction) and processing speed (delay).

The VELO Framework

Architecture and Action Space

VELO positions vector databases (such as Milvus) on edge servers to store historical "Question-Answer" pairs as embeddings. When a user request arrives at the edge, the system evaluates three potential execution paths:

  1. Action A (Local Retrieval): The system returns a cached answer directly from the edge vector database. This is the fastest path, minimizing latency.
  2. Action B (Cloud Inference): The request is forwarded directly to the cloud-based LLM. This ensures high-quality responses but incurs maximum latency and cost.
  3. Action C (Hybrid Boosting): The edge database retrieves relevant local context to "enhance" the user's prompt before sending it to the cloud. This Retrieval-Augmented Generation (RAG) approach at the edge aims to improve the cloud model's efficiency or accuracy.

LLM Request Scheduling (LRS)

To navigate this action space, the authors developed the LLM Request Scheduling (LRS) algorithm based on Multi-Agent Proximal Policy Optimization (MAPPO). Each edge server operates as an RL agent, learning to optimize a composite reward function of user satisfaction and system delay.

To process raw text, a Transformer Encoder converts requests into feature vectors, allowing the RL agents to perceive semantic nuances. To overcome the "cold start" problem inherent in reinforcement learning, the framework incorporates expert demonstrations into the training loop, accelerating the convergence of the scheduling policy.

Cache Management

Effective caching requires intelligent data retention. VELO employs a dynamic eviction policy where cached items are assigned a "cache value." This value is calculated based on the item's contribution to user satisfaction versus the delay it causes. Low-value data is periodically purged to maintain database efficiency and relevance.

Experimental Evaluation

Methodology

The framework was evaluated using the oasst1 (Open Assistant) dataset, expanded into five languages (English, Spanish, German, Chinese, and Russian) via the Qwen14b model to test multilingual versatility. The prototype utilized Towhee for embedding generation, Milvus for vector storage, and Qwen7b as the cloud-based LLM.

Performance Results

The LRS algorithm demonstrated significant improvements over traditional scheduling strategies:

  • QoS Improvement: VELO outperformed baseline strategies (including Greedy and Random scheduling) by up to 15.31% in overall reward.
  • Comparative Gains: Compared to a standard "Greedy-LLM" approach, the LRS algorithm increased average reward by 4.59%. When compared to a simple threshold-based greedy approach (Greedy-0.3), the improvement was a substantial 25.10%.
  • System Efficiency: The system maintained a small memory footprint (12.2 GB for 11 million vectors) and achieved significantly lower edge query delays (approx. 0.81s) compared to full cloud round-trips (approx. 3.34s).

Discussion and Conclusion

VELO represents a significant step toward non-invasive LLM optimization. By treating the edge and cloud as a collaborative pipeline rather than isolated entities, it achieves a synergy that reduces costs and latency without compromising model integrity. The inclusion of "Action C" (Hybrid Boosting) is particularly noteworthy, as it provides a middle ground that leverages local data to improve cloud-based generation.

Future research will focus on more granular hardware resource management on edge servers and exploring the scalability of the framework across thousands of heterogeneous edge nodes in highly dynamic environments.

Summary updated

BibTeX
@inproceedings{yao2024velo,
  author = {Zhi Yao and Zhiqing Tang and Jiong Lou and Ping Shen and Weijia Jia},
  title = {{VELO: A Vector Database-Assisted Cloud-Edge Collaborative LLM QoS Optimization Framework}},
  booktitle = {ICWS},
  year = {2024},
  doi = {10.1109/icws62655.2024.00105},
}
Figure