arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2606.20591cs.NIcs.AI
收藏

面向低延迟边缘-云LLM推理的延迟自适应推测控制

Delay-Adaptive Speculation Control for Low-Latency Edge-Cloud LLM Inference

Shanghai Key Laboratory of Integrated Administration Technologies for Information Security, School of Computer Science, Shanghai Jiao Tong University(上海信息安全集成管理技术重点实验室,上海交通大学计算机科学学院);School of Science and Engineering, The Chinese University of Hong Kong, Shenzhen(深圳大学理学院,香港中文大学(深圳))

Kangkang Sun, Jianhua Li, Xiuzhen Chen, Junyi He, Minyi Guo

AI总结:

针对分布式边缘-云推理中推测解码的草稿长度在线控制问题,提出延迟单调阈值最优策略,并设计在线算法UCB-SpecStop,在真实测试台上验证了相变预测,延迟降低达22.4%。

摘要:

推测解码通过使用轻量级草稿模型提出令牌并由更大的目标模型并行验证,从而加速大型语言模型(LLM)推理。然而,在分布式边缘-云推理中,草稿长度必须在线控制:较长的草稿摊销通信延迟但降低令牌接受率,而较短的草稿保持接受率但触发更多通信轮次。我们将此权衡建模为比率型最优停止问题,并证明最优草稿长度是有限延迟单调阈值。分析识别出一个临界延迟,低于该延迟时单令牌推测是最优的,并表明最优长度仅随通信延迟对数增长。对于时变网络,我们将模型扩展到马尔可夫调制信道,并在有界时域和单调停止区域条件下,建立状态相关阈值策略。对于未知环境,我们提出UCB-SpecStop,一种在线控制算法,具有无间隙和依赖间隙的期望遗憾界,分别为$O(L_{\max}\sqrt{K_{\max}T\log(K_{\max}T)})$和$O(\sum_{k:\Delta_k>0}L_{\max}^2\log(K_{\max}T)/\Delta_k)$。我们在真实的边缘-云测试台上实现该方法,该测试台配备Jetson Orin Nano Super边缘节点和RTX~3090 Ti云节点,使用Qwen和Llama草稿-目标对。实验验证了预测的相变,转变点分别在83~ms和111~ms附近。Qwen符合几何预测,而Llama由于重头接受需要经验前缀校准。在测试的延迟网格上,UCB-SpecStop相比SpecDec++将每令牌延迟降低高达22.4%,在通信主导区域接近离线最优解(差距0.2--2.4%),比朴素UCB提升高达7.5%,消除延迟漂移下静态调优导致的14.0--18.7%差距,并利用上下文信道状态信息获得3.0--6.8%的提升。

英文摘要:

Speculative decoding accelerates large language model (LLM) inference by using a lightweight draft model to propose tokens and a larger target model to verify them in parallel. In distributed edge-cloud inference, however, draft length must be controlled online: longer drafts amortize communication delay but reduce token acceptance, whereas shorter drafts preserve acceptance but trigger more communication rounds. We formulate this tradeoff as a ratio-type optimal stopping problem and prove that the optimal draft length is a finite delay-monotone threshold. The analysis identifies a critical delay below which single-token speculation is optimal and shows that the optimal length grows only logarithmically with communication delay. For time-varying networks, we extend the model to Markov-modulated channels and establish, under a bounded horizon and monotone stopping-region conditions, a state-dependent threshold policy. For unknown environments, we propose UCB-SpecStop, an online control algorithm with gap-free and gap-dependent expected regret bounds of $O(L_{\max}\sqrt{K_{\max}T\log(K_{\max}T)})$ and $O(\sum_{k:Δ_k>0}L_{\max}^2\log(K_{\max}T)/Δ_k)$. We implement the method on a real edge-cloud testbed with a Jetson Orin Nano Super edge node and an RTX~3090 Ti cloud node, using Qwen and Llama draft--target pairs. Experiments validate the predicted phase transition, with transition points near 83~ms and 111~ms. Qwen matches the geometric prediction, while Llama requires empirical-prefix calibration due to heavy-head acceptance. Across the tested delay grid, UCB-SpecStop reduces per-token latency over SpecDec++ by up to 22.4\%, approaches an offline oracle within 0.2--2.4\% in communication-dominated regimes, improves over naive UCB by up to 7.5\%, removes the 14.0--18.7\% gap caused by static tuning under delay drift, and gains 3.0--6.8\% with contextual channel-state information.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑