arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2610.28619cs.AIcs.LGcs.SYeess.SY
收藏

自适应多令牌预测:我们应该走多远?

Adaptive Multi-Token Prediction: How far should we go?

Georgia Institute of Technology(佐治亚理工学院)

Emile Anand, Mohammed Rehan Parwani, Xinyuan Cao

AI总结:

本研究针对多令牌预测的固定长度缺陷,提出自适应多令牌预测(AMTP),通过在线控制动态选择推测长度,在多组模型与数据集上实现解码加速及吞吐量提升。

摘要:

多令牌预测(MTP)可通过生成多个令牌并在单次目标模型前向传播中验证,加速语言模型解码。然而,最佳推测长度随上下文变化:当推测可靠时,较长的推测能带来更大的摊销收益,但会在被拒绝后丢弃的后缀上浪费计算资源。与自回归推测中可逐令牌决定停止规则不同,MTP必须在推测前固定长度,因为所有头部在同一前向传播中激活。因此,我们将长度选择建模为在线控制问题,利用验证反馈学习每个上下文中推测的可信程度,并提出自适应多令牌预测(AMTP):一种无需重新训练且保持验证器完全不变的轻量级控制器。为指导长度选择,我们通过接受存活度(即推测前缀被完全接受的概率)表征每个长度下承诺令牌的期望数量。在每一轮前,AMTP预测推测可能存活的长度,并选择每秒期望令牌数最高的长度,从每次验证传播中自由学习。理论上,我们证明任何在线学习者的预测误差会转化为针对每个上下文最佳长度的吞吐量遗憾,进而转化为 wall-clock 完成时间的边界。采用在线梯度下降时,该遗憾为亚线性。在基于 Llama-3.1-8B-Instruct 搭配 Medusa 头部、Meta 的 MTP 模型及 Qwen3-4B-Inst-2507-MTP 构建的五组推测-目标配对上,在 AIME 2025 和 GSM8K 数据集上评估显示,AMTP 的解码速度比标准解码快达 4.1 倍,且在 10 个设置中的 8 个里与固定窗口相当或更优,吞吐量提升最高达 10%。

英文摘要:

Multi-token prediction (MTP) can accelerate language-model decoding by drafting several tokens and verifying them in a single target-model pass. However, the best speculation horizon changes with context: longer drafts offer greater amortization when reliable, but can waste compute on suffixes discarded after a rejection. Unlike autoregressive drafting, where a stopping rule can decide token by token, MTP must fix the horizon before drafting, as all heads fire in the same forward pass. We therefore formulate horizon selection as an online control problem, using verification feedback to learn how far the draft can be trusted in each context, and introduce Adaptive Multi-Token Prediction (AMTP): a lightweight controller that requires no retraining and leaves the exact verifier unchanged. To guide horizon selection, we characterize the expected number of tokens committed at each horizon via acceptance survival, the probability that a draft prefix is fully accepted. Before each round, AMTP predicts how far the draft is likely to survive and picks the horizon with the highest expected tokens per second, learning freely from every verification pass. Theoretically, we show that any online learner's prediction error translates into throughput regret against the best horizon for each context, and in turn into a bound on wall-clock completion time. With online gradient descent, this regret is sublinear. Across five draft-target pairings built on Llama-3.1-8B-Instruct with Medusa heads, Meta's MTP models, and Qwen3-4B-Inst-2507-MTP, evaluated on AIME 2025 and GSM8K, AMTP decodes up to 4.1x faster than standard decoding and matches or outperforms the fixed window in 8 of 10 settings, with throughput gains of up to 10%.

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

↑