Official Implementation of EAGLE-1 (ICML'24), EAGLE-2 (EMNLP'24), and EAGLE-3 (NeurIPS'25).
Official Implementation of EAGLE-1 (ICML'24), EAGLE-2 (EMNLP'24), and EAGLE-3 (NeurIPS'25).
| Paper (EAGLE) | Paper (EAGLE-2) | Paper (EAGLE-3) | Blog |
EAGLE (Extrapolation Algorithm for Greater Language-model Efficiency) is a new baseline for fast decoding of Large Language Models (LLMs) with provable performance maintenance. This approach involves extrapolating the second-top-layer contextual feature vectors of LLMs, enabling a significant boost in generation efficiency.
EAGLE-2 uses the confidence scores from the draft model to approximate acceptance rates, dynamically adjusting the draft tree structure, which further enhances performance.
EAGLE-3 removes the feature prediction constraint in EAGLE and simulates this process during training using training-time testing. Considering that top-layer features are limited to next-token prediction, EAGLE-3 replaces them with a fusion of low-, mid-, and high-level semantic features. EAGLE-3 further improves generation speed while ensuring lossless performance.
Inference is conducted on 2x RTX 3090 GPUs at fp16 precision using the Vicuna 13B model.
EAGLE has been merged in the following mainstream LLM serving frameworks (listed in alphabetical order).
2025.9.18: EAGLE-3 is accepted to NeurIPS'25.
2025.7.23: We strongly recommend using SpecForge for out-of-the-box training of EAGLE-3 with SGLang.
2025.3.19: EAGLE-3 is released.
2024.8.8: We now support Qwen-2.
2024.6.27: EAGLE-2 is released.
2024.2.25: EAGLE is certified by the third-party evaluation as the fastest speculative method.
2024.1.17: We now support Mixtral-8x7B-Instruct.
2023.12.8: EAGLE v1.0 is released.
git clone https://github.com/SafeAILab/EAGLE.git
cd EAGLE
python -m venv ~/venvs/ea_env
source ~/venvs/ea_env/bin/activate
pip install -r requirements.txtNote: This repository recognizes only official EAGLE-3 checkpoints. Performance of unofficial checkpoints may vary. If you want to compare with EAGLE-3, please compare with official checkpoints and official draft tree setups.
Note: The current code defaults to using EAGLE-3. If you want to use EAGLE weights, please specify use_eagle3=False in EaModel.from_pretrained.
Note: When Qwen2 is the target model, please use bf16 precision instead of fp16 to avoid numerical overflow. The training dataset for the draft model of Qwen2 is ShareGPT, which has removed non-English data. Therefore, if you want to use it on non-English data such as Chinese, please train with the corresponding data.
| Base Model | EAGLE Model | # EAGLE Parameters | Official |
|---|---|---|---|
| Vicuna-7B v1.3 | yuhuili/EAGLE-Vicuna-7B-v1.3 | 0.24B | Yes |
| Vicuna-13B v1.3 | [yuhu |
No open issues yet, or sync has not completed.