HybridFlow: Adaptive Task Scheduling for Fast and Token-Efficient LLM Inference in Edge-Cloud Collaboration
Jiangwen Dong, Jiayu Li, Tianhang Zheng, Wanyu Lin
TL;DR
HybridFlow tackles the latency and token-cost challenges of real-time LLM inference on resource-constrained edge devices by enabling fine-grained, dependency-aware collaboration with a cloud model. It combines a DAG-based task planner with a resource-aware router that uses offline utility estimation and online budget management, grounded in a 0–1 knapsack formulation and a Lagrangian dual thresholding framework. The approach is augmented with online calibration via contextual bandits to adapt to shifts in latency and pricing, yielding an adaptive, parallelizable inference pipeline. Empirical results on GPQA, AIME, LiveBench-Reasoning, and MMLU-Pro show that HybridFlow reduces end-to-end latency and cloud token usage while maintaining competitive accuracy, offering a practical path to fast, token-efficient edge–cloud reasoning. Key mathematical ideas include modeling per-subtask offloading as a knapsack problem with normalized cost $c_i$ and value $\Delta q_i$, solved approximately via an online threshold $\tau_t$ linked to a dual price $\lambda_t$, and a learned utility predictor $\hat{u}_i$ that guides subtask routing under budget constraints. Offline profiling yields embeddings $z_i$ and a predictor $\hat{u}_i=\sigma(f_{\theta}(z_i))$ trained by MSE to the target $u_i = \frac{\Delta q_i}{c_i + \varepsilon}$. The combination of DAG planning, parallel execution, and budget-aware routing enables improved latency–cost–accuracy trade-offs in edge–cloud LLM inference.
Abstract
Large language models (LLMs) exhibit impressive reasoning and problem-solving abilities, yet their substantial inference latency and token consumption pose major challenges for real-time deployment on resource-limited edge devices. Recent efforts toward edge-cloud collaboration have attempted to mitigate this issue, but most existing methods adopt coarse-grained task allocation strategies-assigning entire queries either to the edge or the cloud. Such rigid partitioning fails to exploit fine-grained reasoning parallelism and often leads to redundant computation and inefficient resource utilization. To this end, we propose HybridFlow, a resource-adaptive inference framework that enables fast and token-efficient collaborative reasoning between edge and cloud LLMs. HybridFlow operates in two stages: (1) task decomposition and parallel execution, which dynamically splits a complex query into interdependent subtasks that can execute as soon as their dependencies are resolved; and (2) resource-aware subtask routing, where a learned router adaptively assigns each subtask to the edge or cloud model according to predicted utility gains and real-time budget states. Comprehensive evaluations on GPQA, MMLU-Pro, AIME, and LiveBench-Reasoning demonstrate that HybridFlow effectively reduces end-to-end inference time and overall token usage while maintaining competitive accuracy.
