DNeo: Your Parallel Draft Model Needs Better Target Feature Encoding
DNeo: Your Parallel Draft Model Needs Better Target Feature Encoding
Speculative-diffusion decoding uses a small parallel drafter model to generate $b$ draft tokens in one forward pass, which then undergo parallel verification via a larger target model. Faster inference can be achieved when multiple draft tokens pass verification simultaneously.
推测扩散解码(Speculative-diffusion decoding)使用一个小型并行草稿模型在一次前向传递中生成 $b$ 个草稿标记,然后通过一个更大的目标模型进行并行验证。当多个草稿标记同时通过验证时,可以实现更快的推理速度。
Recent parallel draft architectures (DFlash, DSpark) improve draft quality by conditioning on rich features computed by the target, through a mechanism known as feature encoding. However, standard feature encoding mechanisms have three limitations: (1) they are lossy, applying encoding projections that are destructive to the underlying target feature-space via a discovered effect known as residual mixing, (2) they are memory-less, with no record of previously processed proposals, and (3) they utilize features sampled uniformly from across the target layers, omitting important hidden states.
近期的并行草稿架构(DFlash, DSpark)通过一种称为特征编码的机制,利用目标模型计算出的丰富特征来改善草稿质量。然而,标准的特征编码机制存在三个局限性:(1)它们是有损的,通过一种被称为残差混合(residual mixing)的发现效应,应用了对底层目标特征空间具有破坏性的编码投影;(2)它们是无记忆的,没有先前处理过的建议记录;(3)它们利用从目标层中均匀采样的特征,忽略了重要的隐藏状态。
To address these issues, we propose Mixture-of-Features Attention (MoFA), a lightweight feature-encoding approach equipped with a working memory that encodes previously rejected proposals. Leveraging MoFA, rejection memory, and a set of further enhancements, including 2-tap causal convolutions, prefix-only cross-attention, and non-uniform target layer selection, the final architecture, DNeo, achieves 1.3x faster generation speed than SoTA (DFlash-2) without impacting drafter footprint or generation quality. DNeo marks a new state of the art in high quality, fast LLM inference.
为了解决这些问题,我们提出了特征混合注意力(MoFA),这是一种轻量级的特征编码方法,配备了能够编码先前被拒绝建议的工作记忆。利用 MoFA、拒绝记忆以及一系列进一步的增强功能(包括 2-tap 因果卷积、仅前缀交叉注意力和非均匀目标层选择),最终架构 DNeo 在不影响草稿模型占用空间或生成质量的情况下,实现了比当前最佳(SoTA,DFlash-2)快 1.3 倍的生成速度。DNeo 标志着高质量、快速 LLM 推理领域的一个新水平。