VOOZH about

URL: https://arxiv.org/abs/2406.16858?context=cs

⇱ [2406.16858] EAGLE-2: Faster Inference of Language Models with Dynamic Draft Trees


Computer Science > Computation and Language

arXiv:2406.16858 (cs)
[Submitted on 24 Jun 2024 (v1), last revised 30 Jun 2024 (this version, v2)]

Title:EAGLE-2: Faster Inference of Language Models with Dynamic Draft Trees

View PDF HTML (experimental)
Abstract:Inference with modern Large Language Models (LLMs) is expensive and time-consuming, and speculative sampling has proven to be an effective solution. Most speculative sampling methods such as EAGLE use a static draft tree, implicitly assuming that the acceptance rate of draft tokens depends only on their position. Interestingly, we found that the acceptance rate of draft tokens is also context-dependent. In this paper, building upon EAGLE, we propose EAGLE-2, which introduces a new technique of context-aware dynamic draft tree into drafting modeling. This improvement leverages the fact that the draft model of EAGLE is well-calibrated: the confidence scores from the draft model approximate acceptance rates with small errors. We conducted extensive evaluations on three series of LLMs and six tasks, with EAGLE-2 achieving speedup ratios 3.05x-4.26x, which is 20%-40% faster than EAGLE-1. EAGLE-2 also ensures that the distribution of the generated text remains unchanged, making it a lossless acceleration algorithm.
Subjects: Computation and Language (cs.CL); Machine Learning (cs.LG)
Cite as: arXiv:2406.16858 [cs.CL]
(or arXiv:2406.16858v2 [cs.CL] for this version)
https://doi.org/10.48550/arXiv.2406.16858
arXiv-issued DOI via DataCite

Submission history

From: Yuhui Li [view email]
[v1] Mon, 24 Jun 2024 17:59:11 UTC (1,463 KB)
[v2] Sun, 30 Jun 2024 15:03:25 UTC (1,464 KB)
Full-text links:

Access Paper:

Current browse context:

cs
< prev   |   next >
Change to browse by:

References & Citations

BibTeX formatted citation

Data provided by:

Bibliographic and Citation Tools

Bibliographic Explorer (What is the Explorer?)
Connected Papers (What is Connected Papers?)
Litmaps (What is Litmaps?)
scite Smart Citations (What are Smart Citations?)

Code, Data and Media Associated with this Article

alphaXiv (What is alphaXiv?)
CatalyzeX Code Finder for Papers (What is CatalyzeX?)
DagsHub (What is DagsHub?)
Gotit.pub (What is GotitPub?)
Hugging Face (What is Huggingface?)
ScienceCast (What is ScienceCast?)

Demos

Replicate (What is Replicate?)
Hugging Face Spaces (What is Spaces?)
TXYZ.AI (What is TXYZ.AI?)

Recommenders and Search Tools

Influence Flower (What are Influence Flowers?)
CORE Recommender (What is CORE?)

arXivLabs: experimental projects with community collaborators

arXivLabs is a framework that allows collaborators to develop and share new arXiv features directly on our website.

Both individuals and organizations that work with arXivLabs have embraced and accepted our values of openness, community, excellence, and user data privacy. arXiv is committed to these values and only works with partners that adhere to them.

Have an idea for a project that will add value for arXiv's community? Learn more about arXivLabs.