arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2611.00588cs.LGcs.CL
收藏

TVP:推测解码几乎只需要TV(总变差距离)

TVP: TV is Almost All You Need for Speculative Decoding

Baseten Labs Inc.(巴塞腾实验室公司)

Aaryam Sharma

AI总结:

该研究针对推测解码中草稿模型训练的梯度与资源分配问题,提出TVP损失族,通过幂参数插值优化,在三种架构与目标模型下提升了接受长度。

摘要:

推测解码通过草稿模型(drafter)提出的token由目标模型并行验证,以此加速大语言模型(LLM)推理。在无损推测采样下,草稿token的接受概率为1减去目标模型与草稿模型分布间的总变差(TV)距离,但草稿模型常使用交叉熵(CE)或KL散度训练。我们首先证明,在匹配且微调得当的情况下,TV在微调时表现优于或等同于几种已发表的草稿训练目标,而固定的TV与KL混合目标在从头训练时也能达到相同效果。我们发现两个剩余问题:TV在未覆盖token上的梯度消失,以及前缀乘积导致接受长度目标中后续位置资源不足。为解决这两个问题,我们推导了TVP,一种基于期望接受长度的损失族,其幂参数可在覆盖导向与接受导向目标间插值。将幂参数从0退火至1时,在三种草稿模型架构和三种目标模型(包括更长草稿与块验证)中,TVP的接受长度最高或并列最高。在微调时,TVP的接受长度较CE提升9.8%;在使用公开DFlash2训练方案时,提升6.2%至12.9%。

英文摘要:

Speculative decoding accelerates LLM inference with a drafter whose proposed tokens are verified by the target model in parallel. Under lossless speculative sampling, a draft token is accepted with probability one minus the total variation (TV) distance between the target and draft distributions, yet drafters are often trained with cross-entropy (CE) or KL. We first show that under matched and well-tuned training, TV matches or surpasses several published draft-training objectives when fine-tuning, and a fixed TV and KL mixture does the same when training from scratch. We identify two remaining problems, TV's vanishing gradients on undercovered tokens and the prefix products that starve later positions in acceptance-length objectives. To address both, we derive TVP, a loss family based on expected acceptance length, whose power parameter interpolates between coverage and acceptance oriented objectives. Annealing the power from zero to one gives the highest or tied-highest acceptance length across three drafter architectures and three target models, including longer drafts and block verification. TVP improves acceptance length over CE by 9.8% when fine-tuning, and over the public DFlash2 training recipes by 6.2 to 12.9%.

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

↑