提出可解释的延迟模型,揭示大模型推理中推测解码的性能瓶颈。
An Interpretable Latency Model for Speculative Decoding in LLM Serving

- 基于利特尔定律推导有效批大小,分解请求延迟成分。
- 实测验证模型准确预测延迟,解释负载升高时加速效果下降。
- 适用于混合专家模型,指导生产环境配置推测解码参数。
推测解码(SD)通过小型草稿模型并行生成多个候选词,并由大型目标模型验证以加速大语言模型推理。尽管已有研究在孤立或固定批处理环境下展示显著提速,但生产环境中请求负载动态变化,有效批大小由服务系统自适应决定而非人为控制。本文构建了一个简单且可解释的SD延迟模型:利用利特尔定律从请求率推断有效批大小,并将预填充、草稿和验证阶段的每请求需求分解为负载无关与负载相关部分。我们通过vLLM在多种配置下的大量测量验证了该模型,涵盖验证器与草稿模型尺寸、预填充与解码长度、请求率、草稿长度及接受概率等变量。模型能准确描述实际延迟,解释为何加速效果随服务器负载增加而减弱,并刻画了草稿长度、接受率及验证器-草稿器规模对延迟的影响,对部署系统中的SD配置具有指导意义。此外,该框架还可扩展至混合专家模型,其中稀疏专家激活改变了不同负载区间下的有效服务成本。整体结果为理解真实大模型服务系统中的推测解码提供了结构化分析框架。
原文摘要 · Abstract (English)
Speculative decoding (SD) accelerates large language model (LLM) inference by using a smaller draft model to propose multiple tokens that are verified by a larger target model in parallel. While prior work demonstrates substantial speedups in isolated or fixed-batch settings, the behavior of SD in production serving systems remains poorly understood: request load varies over time, and effective batch size emerges from the serving system rather than being directly controlled or observed. In this work, we develop a simple and interpretable latency model for SD in LLM serving. We infer effective batch size from request rate using Little's Law and decompose per-request demand into load-independent and load-dependent components for prefill, drafting, and verification. We validate our model using extensive measurements from vLLM across verifier and drafter model sizes, prefill and decode lengths, request rates, draft lengths, and acceptance probabilities. The model accurately describes observed latency, explains why speedups often diminish as server load increases, and characterizes how draft length, acceptance rate, and verifier-drafter size shape latency across serving conditions, with implications for configuring SD in deployed systems. We further show how the framework extends to mixture of experts models, where sparse expert activation changes the effective service costs across load regimes. Together, our results provide a structured framework for understanding SD in real LLM serving systems.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。