Gumiho:一种在投机解码中优先处理早期Token的混合架构
Gumiho: A Hybrid Architecture to Prioritize Early Tokens in Speculative Decoding
AI总结:
本文提出Gumiho混合架构,通过理论证明草稿序列早期Token更重要,结合串行Transformer头提升早期Token准确性与并行轻量级MLP头提高后续效率,实验验证其优于现有方法。
摘要:
投机解码(SPD)旨在加速目标大型语言模型(LLM)的自回归Token生成过程。一些方法采用具有多个头的草稿模型来预测未来Token序列,其中每个头处理序列中的一个Token。目标LLM验证预测序列并接受对齐的Token,从而实现高效的多Token生成。然而,现有方法假设序列中的所有Token同等重要,采用相同的头结构,并依赖单一生成范式,无论是串行还是并行。为此,我们从理论上证明草稿序列中的初始Token比后续Token更重要。基于这一见解,我们提出了Gumiho,一种结合串行和并行头的混合模型。具体而言,鉴于早期Token的关键重要性,我们采用复杂的Transformer架构以串行配置处理早期草稿头以提高准确性。对于后续Token,我们利用多个轻量级MLP头并行运行以提高效率。通过为早期头分配更先进的模型结构和更长的运行时间,Gumiho实现了更好的整体性能。实验结果表明,我们的方法优于现有方法,充分验证了其有效性。
英文摘要:
Speculative decoding (SPD) aims to accelerate the auto-regressive token generation process of a target Large Language Model (LLM). Some approaches employ a draft model with multiple heads to predict a sequence of future tokens, where each head handles a token in the sequence. The target LLM verifies the predicted sequence and accepts aligned tokens, enabling efficient multi-token generation. However, existing methods assume that all tokens within a sequence are equally important, employing identical head structures and relying on a single-generation paradigm, either serial or parallel. To this end, we theoretically demonstrate that initial tokens in the draft sequence are more important than later ones. Building on this insight, we propose Gumiho, a hybrid model combining serial and parallel heads. Specifically, given the critical importance of early tokens, we employ a sophisticated Transformer architecture for the early draft heads in a serial configuration to improve accuracy. For later tokens, we utilize multiple lightweight MLP heads operating in parallel to enhance efficiency. By allocating more advanced model structures and longer running times to the early heads, Gumiho achieves improved overall performance. The experimental results demonstrate that our method outperforms existing approaches, fully validating its effectiveness.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。