自回归解码使得大型语言模型 ( LLMs ) 的推理非常耗时。在本文中,我们重新考虑推测性抽样并得出两个关键观察结果。


Introduction

瓶颈和已有工作


我们的方法

基于两个观察



效果


Preliminaries

!EAGLE Speculative Sampling Requires Rethinking Feature Uncertainty 2024-11-29.excalidraw


EAGLE

Drafting phase

overview

不同的方法👀

图片说明

模型架构

原图

Training of the draft models

训练目标

\hat{p_{i+2}}=\text{Softmax}(\text{LM_Head}(\hat{f_{i+1}}))\ \
L_{cls}=\text{Cross_Entrophy}(p_{i+2},\hat{p_{i+2}})
\end{array}
$$

训练数据

Verification phase

Experiments

Models and tasks

和其他方法比较的加速比

Lookahead仅限于贪婪解码,Medusa的非贪婪生成并不能保证无损性能。因此,EAGLE 不与这些方法进行比较

不同模型/数据集上的表现

image-20241129151256645.png

image-20241129151248481.png

image-20241129151444176.png

Train

Case study: EAGLE + gpt-fast

image-20241129153015236.png

Ablation study

tree attention


Figure 7:Speedup ratios of EAGLE with and without the use of tree attention. The evaluation dataset is MT-bench, with the temperature parameter set to 0.

image-20241129154016502.png

Inputs of draft models


The target LLM is Vicuna 7B, and the test dataset is MT-bench.

观察结果:

Training data

image-20241129154619541.png

Batch size and throughput

image-20241129154946806.png