arXiv:2507.02620cs.DCcs.AI2025-07被引 4

提出流式推测解码框架,提升边缘端大模型分布式推理效率。

FlowSpec: Continuous Pipelined Speculative Decoding for Efficient Distributed LLM Inference

  • 基于评分的逐步验证,优先确认重要候选词
  • 动态扩展高质量推测输入,提升管道利用率
  • 适合边缘设备上低频请求的大模型高效推理

分布式推理是实现大语言模型(LLM)在边缘网络部署的可行方案,通过将推理过程分布到多个设备以适应设备内存限制。现有流水线方法虽能并行通信与计算,降低延迟,但在边缘端请求稀疏时效率下降,流水线利用率低。为此,本文提出 FlowSpec,一种基于树结构的流水线并行推测解码框架。其核心机制包括:1)基于得分的逐步验证,优先确认重要候选令牌;2)高效的草稿管理,剔除无效令牌的同时保持因果一致性;3)动态草稿扩展策略,持续供给高质量推测输入。上述技术协同提升流水线利用率与推测效率。在真实测试平台上对比基线,实验表明,该框架在多种模型与配置下显著加速推理,速度提升达1.37×至1.73×。代码已开源。

原文摘要 · Abstract (English)

Distributed inference serves as a promising approach to enabling the inference of large language models (LLMs) at the network edge. It distributes the inference process to multiple devices to ensure that the LLMs can fit into the device memory. Recent pipeline-based approaches have the potential to parallelize communication and computation, which helps reduce inference latency. However, the benefit diminishes when the inference request at the network edge is sparse, where pipeline is typically at low utilization. To enable efficient distributed LLM inference at the edge, we propose \textbf{FlowSpec}, a pipeline-parallel tree-based speculative decoding framework. FlowSpec incorporates three key mechanisms to improve decoding efficiency: 1) score-based step-wise verification prioritizes more important draft tokens to bring earlier accepted tokens; 2) efficient draft management to prune invalid tokens while maintaining correct causal relationship during verification; 3) dynamic draft expansion strategies to supply high-quality speculative inputs. These techniques work in concert to enhance both pipeline utilization and speculative efficiency. We evaluate FlowSpec on a real-world testbed with other baselines. Experimental results demonstrate that our proposed framework significantly improves inference speed across diverse models and configurations, achieving speedup ratios 1.37$\times$-1.73$\times$ compared to baselines. Our code is publicly available at \href{https://github.com/Leosang-lx/FlowSpec#}{https://github.com/Leosang-lx/FlowSpec\#}.

大模型推理分布式推测解码边缘计算

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