通过协作式猜测推理,让多节点协同生成并验证文本,显著提升大模型推理效率。
Collaborative Speculative Inference for Efficient LLM Inference Serving
- 拆分生成与验证流程,多节点按专长分工协作。
- 在同等资源下,延迟降低23.2%,吞吐量提升32.5%。
- 适合需要高并发、低延迟的大模型服务场景。
推测性推理是一种高效的大语言模型(LLM)推理范式,利用小型推测模型(SSM)作为起草者生成候选词元,并由目标大模型并行验证。该方法在保持生成质量的同时降低推理延迟和成本。然而,现有方法存在资源利用率低、推测接受率有限等问题,制约其扩展性与整体效果。为此,我们提出 CoSine 系统,将串行推测解码与并行验证解耦,实现多个节点间的高效协作。CoSine 根据节点专长路由请求,并采用基于置信度的词元融合机制,合成多个起草者的输出,保障草案质量。同时,系统动态调度推测与验证任务,采用批处理分组与自适应推测控制策略,减少空闲时间。通过异构节点协同优化并行工作流,实现实时平衡生成与验证吞吐量,最大化资源利用率。实验表明,与当前最优方法相比,在等量资源下,CoSine 延迟降低 23.2%,吞吐量提升 32.5%。
原文摘要 · Abstract (English)
Speculative inference is a promising paradigm employing small speculative models (SSMs) as drafters to generate draft tokens, which are subsequently verified in parallel by the target large language model (LLM). This approach enhances the efficiency of inference serving by reducing LLM inference latency and costs while preserving generation quality. However, existing speculative methods face critical challenges, including inefficient resource utilization and limited draft acceptance, which constrain their scalability and overall effectiveness. To overcome these obstacles, we present CoSine, a novel speculative inference system that decouples sequential speculative decoding from parallel verification, enabling efficient collaboration among multiple nodes. Specifically, CoSine routes inference requests to specialized drafters based on their expertise and incorporates a confidence-based token fusion mechanism to synthesize outputs from cooperating drafters, ensuring high-quality draft generation. Additionally, CoSine dynamically orchestrates the execution of speculative decoding and verification in a pipelined manner, employing batch scheduling to selectively group requests and adaptive speculation control to minimize idle periods. By optimizing parallel workflows through heterogeneous node collaboration, CoSine balances draft generation and verification throughput in real-time, thereby maximizing resource utilization. Experimental results demonstrate that CoSine achieves superior performance compared to state-of-the-art speculative approaches. Notably, with equivalent resource costs, CoSine achieves up to a 23.2% decrease in latency and a 32.5% increase in throughput compared to baseline methods.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。