Introduction
Deploying Large Language Models (LLMs) on edge devices, such as smart home hubs or connected vehicles, presents a complex trade-off between privacy, latency, and operational cost. While existing research often focuses on simple model routing—deciding between a local small language model (SLM) and a powerful cloud-based LLM—this approach overlooks the broader serving pipeline. A modern LLM workflow involves multiple stages, including query preprocessing, context retrieval (RAG), and post-retrieval refinement.
ECO-LLM (Edge-Cloud Orchestrator for LLMs) addresses this by treating edge-cloud deployment as a joint optimization problem across the entire pipeline. By dynamically selecting the optimal "resolution path" for each query, ECO-LLM achieves superior accuracy compared to cloud-only models like GPT-4o while significantly reducing latency and costs.
The ECO-LLM Framework
The core innovation of ECO-LLM lies in its holistic orchestration of the serving pipeline. Rather than optimizing components in isolation, it identifies synergies between preprocessing, retrieval, and model selection.
The framework consists of two primary modules:
1. ECO-LLM Emulator (Offline Optimization)
The emulator explores the vast combinatorial space of possible configurations. To handle this efficiently, it employs Adaptive Stratified Budget Allocation (SBA). By clustering queries and evaluating paths on representative subsets, it prunes the search space effectively. Additionally, a Context Generator produces domain-specific training data directly from technical documentation, ensuring the system is grounded in relevant knowledge. To accelerate the emulator, the system utilizes prefix caching for intermediate results, such as retrieved context, allowing for rapid evaluation of different LLM components.
2. ECO-LLM Runtime (Online Execution)
At runtime, the system processes incoming queries using Domain-Specific Query Encoding (DSQE) to map them to requirement prototypes. Critical Component Analysis (CCA) then identifies which pipeline stages (e.g., specific prompting or RAG) are essential for the given query. Finally, the runtime selects a path that satisfies user-defined Service Level Objectives (SLOs) for cost and latency.
Evaluation and Results
The system was evaluated across two domain-specific scenarios: a Smart Home Assistant (based on product documentation) and an Automotive Assistant (derived from 3,000 pages of technical manuals).
Performance Benchmarks
ECO-LLM demonstrates that coordinated orchestration significantly outperforms traditional routing methods:
- Accuracy vs. GPT-4o: On known queries, ECO-LLM reached 90% accuracy, surpassing GPT-4o's 74%. This was achieved alongside a 90% reduction in cost and a 55% reduction in latency.
- Efficiency vs. RouteLLM: For unseen queries, ECO-LLM provided substantial gains. In cost-optimized modes, it reduced expenses by 62%; in latency-optimized modes, it improved response times by 62%.
Key Insights
- Resolution Path Synergy: The optimal outcome depends on the entire path, not just the model. A local SLM with high-quality context can often outperform a cloud LLM with poor context.
- Component Criticality: Not every query requires the full pipeline. ECO-LLM identifies when context augmentation is unnecessary, saving resources without sacrificing performance.
- Pareto-Optimal Frontiers: Joint optimization allows the system to find superior trade-offs between accuracy, cost, and speed, maintaining strict SLO adherence even in complex domains.
Conclusion and Future Work
ECO-LLM shifts the focus from model selection to pipeline orchestration. While the current framework relies on a one-shot training workflow, future iterations could incorporate continuous learning from real-world feedback. Additionally, deeper integration with specific edge hardware constraints, such as memory and power consumption, remains an area for further exploration to enhance deployment on battery-constrained devices.
Summary updated