arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2511.15898cs.LG
收藏

全局分辨率:通过凸优化实现最优多草稿投机采样

Global Resolution: Optimal Multi-Draft Speculative Sampling via Convex Minimization

Stanford University(斯坦福大学)

Rahul Krishna Thomas, Arka Pal

AI总结:

本文提出了一种基于凸优化的多草稿投机采样算法,通过将最优传输问题转化为最大流问题,实现了高效的高接受率和低开销的生成过程。

摘要:

投机采样通过使用一个廉价的草稿模型来建议候选标记,并通过一个验证标准来接受或重新采样该标记,从而在不牺牲推理质量的情况下减少目标模型LLM的延迟。为了提高接受率和解码效率,近期工作探索了多草稿扩展,即在每一步生成n个草稿标记,并且验证标准是基于这些的分布。当此标准最大化接受某些草稿标记的概率时,称为最优传输(OT)。然而,找到OT是困难的,因为它是一个具有超过V^n个变量的线性规划(OTLP)的解,其中V是词汇大小。两项近期的理论工作将OTLP重新表述为重要性采样或子集选择的术语。在本工作中,我们证明这些公式等价于一个指数级大的放松OTLP,因此仍然无法解决。然后,我们逆向工程子集选择,将OTLP转化为最大流问题。通过新颖的多项式理论应用,我们将指数级大的OTLP减少为最多V个变量的凸优化问题。这使我们能够设计出一种算法,当n个标记从单个草稿模型中独立同分布选择时,实现最优的n-草稿投机采样,该算法可以调节到任意精度。最后,我们测量了不同n和top-k草稿采样设置下的接受率和算法运行时间。我们的发现给出了首个多草稿算法,其接受率为90%,每生成一个标记的开销低于100毫秒,且与目标模型分布的偏差可以忽略不计。

英文摘要:

Speculative sampling reduces the latency of autoregressive decoding for target model LLMs without sacrificing inference quality, by using a cheap draft model to suggest a candidate token and a verification criterion to accept or resample this token. To improve acceptance and decoding efficiency, recent work has explored the multi-draft extension, where at each step $n$ draft tokens are generated, and the verification criterion is a distribution conditioned on these. When this criterion maximizes the probability of accepting some draft token, it is called the optimal transport (OT). However, finding the OT is difficult, as it is the solution of a linear program (OTLP) in over $V^n$ variables, with $V$ being the vocabulary size. Two recent theoretical works have reframed the OTLP in terms of importance sampling or subset selection. In this work, we prove that these formulations are equivalent to an exponentially large relaxed OTLP, so it remains infeasible to solve. Then, we reverse engineer subset selection to formulate the OTLP as a max-flow problem. With a novel application of polymatroid theory, we reduce the exponentially large OTLP to a convex optimization problem in at most $V$ variables. This allows us to devise an algorithm for optimal $n$-draft speculative sampling when the $n$ tokens are chosen i.i.d. from a single draft model, which can be tuned to arbitrary accuracy. Finally, we measure acceptance rates and algorithm runtimes for various $n$ and top-$k$ draft sampling settings. Our findings give the first multi-draft algorithm with 90% acceptance and under 100 ms of overhead per generated token with negligible deviation from the target model distribution.

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

↑