Judge Decoding:更快的投机采样需要超越模型对齐
Judge Decoding: Faster Speculative Sampling Requires Going Beyond Model Alignment
AI总结:
针对投机采样中因模型对齐导致高拒绝率限制加速的问题,提出 Judge Decoding,通过训练紧凑判断模块识别正确但未对齐的续写,在 Llama-3.1 上实现 9 倍加速且保持质量。
摘要:
大型语言模型(LLMs)的性能与其底层规模密切相关,导致网络日益庞大从而推理变慢。投机采样被提出作为一种加速自回归生成的技术,利用快速的草稿模型提出候选 token,然后根据它们在目标模型下的似然进行并行验证。虽然该方法保证重现目标输出,但它带来了巨大惩罚:许多高质量的草稿 token 被拒绝,即使它们客观上是有效的续写。事实上,我们表明,即使是强大的草稿模型如 GPT-4o,以及人类文本,在标准验证方案下也无法达到高接受率。这严重限制了当前投机采样方法的加速潜力,因为仅依赖草稿和目标的对齐时,早期拒绝变得极有可能。因此我们提出问题:能否调整验证以识别正确但未对齐的回复?为此,我们从 LLM-as-a-judge 框架汲取灵感,该框架表明 LLMs 能够以多样方式评估答案。我们精心设计数据集,通过在嵌入之上训练紧凑模块来产生当前续写的“判断”,以在目标模型中激发相同能力。我们在 Llama-3.1 系列上展示策略,其中 8b/405B-Judge 相比 Llama-405B 实现 9 倍加速,同时在大量基准上保持质量。这些优势在优化推理框架中依然存在,其中方法在 2 和 8 个 H100 上分别达到 8B/70B-Judge 每秒 141 token 和 8B/405B 每秒 129 token。
英文摘要:
The performance of large language models (LLMs) is closely linked to their underlying size, leading to ever-growing networks and hence slower inference. Speculative decoding has been proposed as a technique to accelerate autoregressive generation, leveraging a fast draft model to propose candidate tokens, which are then verified in parallel based on their likelihood under the target model. While this approach guarantees to reproduce the target output, it incurs a substantial penalty: many high-quality draft tokens are rejected, even when they represent objectively valid continuations. Indeed, we show that even powerful draft models such as GPT-4o, as well as human text cannot achieve high acceptance rates under the standard verification scheme. This severely limits the speedup potential of current speculative decoding methods, as an early rejection becomes overwhelmingly likely when solely relying on alignment of draft and target. We thus ask the following question: Can we adapt verification to recognize correct, but non-aligned replies? To this end, we draw inspiration from the LLM-as-a-judge framework, which demonstrated that LLMs are able to rate answers in a versatile way. We carefully design a dataset to elicit the same capability in the target model by training a compact module on top of the embeddings to produce ``judgements" of the current continuation. We showcase our strategy on the Llama-3.1 family, where our 8b/405B-Judge achieves a speedup of 9x over Llama-405B, while maintaining its quality on a large range of benchmarks. These benefits remain present even in optimized inference frameworks, where our method reaches up to 141 tokens/s for 8B/70B-Judge and 129 tokens/s for 8B/405B on 2 and 8 H100s respectively.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。