EAGLE-4 README

README проекта с github.com/eagle-hq/EAGLE-4. Одним файлом markdown: README.md.

Eagle

EAGLE-4

One Flexible Drafter for All Batch Sizes and Hardware

Paper (EAGLE-4) · EAGLE-4 draft for Qwen3.8-27B · Documentation

eagle-harness on PyPI Maintenance Contributions welcome

Eagle website Eagle on LinkedIn Eagle on X GitHub organization HuggingFace

License


EAGLE-4 single-request speedup over vanilla decoding, from the paper

Figure 1(a) of the EAGLE-4 paper: Qwen3.8-27B on the SPEED-Bench qualitative split, 4× NVIDIA B300, one request, temperature 0. The numbers this release measured with EAGLE-4 are in the support matrix.

EAGLE-4

Leave speculation on. EAGLE-4 adapts to your hardware, batch and workload.

For high load, serve SGLang on four B300 GPUs with the high-load recipe, which keeps pace with plain decoding up to 512 concurrent requests.

EAGLE-4 (Extrapolation Algorithm for Greater Language-model Efficiency) speeds up LLM inference with speculative decoding. EAGLE-4 draft models are built to run with eagle-harness, which decides how far to speculate from measured costs on your setup, so every draft tree fits the batch size, the hardware and the workload. The output stays exactly what the target model would generate on its own: up to 3.4× faster generation on Qwen3.8-27B, with the same answers. Measured speedups

This repository holds eagle-harness, the package that brings EAGLE-4 to SGLang, vLLM and TokenSpeed. Install it, point your engine at an EAGLE-4 draft model, and it serves with EAGLE-4.

Quick start

The quick start serves on one GPU and is tested on one NVIDIA B300 with Linux and a CUDA 13 driver. Qwen3.8-27B and its EAGLE-4 draft download on the first start (about 62 GB). The measured speedups use four B300 GPUs. Add --tp-size 4 to either serve command to serve on four, and see the engine guides for the exact measured commands.

Start an SGLang server with Docker:

docker run --gpus all --ipc host -p 127.0.0.1:30000:30000 \
  -e HF_HOME=/hf -v ~/.cache/huggingface:/hf \
  ghcr.io/eagle-hq/eagle-4-sglang:0.1.3 \
  sglang serve --model-path Qwen/Qwen3.8-27B --host 0.0.0.0 \
  --disable-overlap-schedule --speculative-algorithm EAGLE_HARNESS \
  --speculative-draft-model-path EAGLE-Corp/Qwen3.8-27B-EAGLE4 \
  --speculative-num-steps 12 --speculative-eagle-topk 4 --speculative-num-draft-tokens 16 \
  --speculative-algorithm-config '{}'

Or install with pip, in Python 3.12. Pip installs also need the CUDA toolkit and a C++ compiler:

python3.12 -m venv .venv && source .venv/bin/activate
pip install "eagle-harness[sglang]" "sglang==0.5.23.dev252+eagle.9" \
  --extra-index-url https://eagle-hq.github.io/EAGLE-4/whl/cu130/ \
  --extra-index-url https://download.pytorch.org/whl/cu130 \
  --extra-index-url https://pypi.nvidia.com
sglang serve --model-path Qwen/Qwen3.8-27B \
  --speculative-algorithm EAGLE_HARNESS \
  --speculative-draft-model-path EAGLE-Corp/Qwen3.8-27B-EAGLE4

When the server logs The server is fired up and ready to roll!, send a request from another terminal:

curl http://localhost:30000/v1/chat/completions -H 'Content-Type: application/json' \
  -d '{"model": "Qwen/Qwen3.8-27B", "messages": [{"role": "user", "content": "Explain how a hash table works."}], "max_tokens": 256}'

The first requests after a start compile kernels and measure live costs, so they run slower. Send a few requests before you measure speed, and compare against the same command without the --speculative-* flags (benchmarking).

For vLLM, TokenSpeed and AMD MI355X, follow the engine guides.

Measured speedup

Each speedup divides EAGLE-4 throughput by the same engine's throughput without speculation, on Qwen3.8-27B at temperature 0 on the SPEED-Bench client, with the measured recipe of each engine guide. The support matrix has the tokens/s, the correctness checks and how each number was measured.

Engine GPUs 1 request 8 concurrent 64 concurrent
SGLang 4× B300 3.42× 2.09× 1.39×
vLLM 4× B300 2.83× 1.72× 1.14×
TokenSpeed 4× B300 3.09× 2.02× 1.41×

On one AMD MI355X, SGLang with EAGLE-4 is 2.07× faster at 8 concurrent requests and 1.56× at 32.

More

Citation

If you use EAGLE-4, cite the EAGLE-4 paper. EAGLE-4 builds on EAGLE, EAGLE-2 and EAGLE-3, which CITATION.cff also lists.

@misc{eagle4,
    author = {EAGLE-4 Team},
    title = {{EAGLE-4}: One Flexible Drafter for All Batch Sizes and Hardware},
    year = {2026},
    note = {Preprint}
}

Acknowledgements

License and trademark policy

Eagle 4 is source-available software, not OSI-approved open-source software. The terms of the Eagle 4 Source-Available License govern its use, modification, and distribution, and incorporate the Eagle Trademark Policy. See also the NOTICE file.

Commercial Use of a Competing Offering requires a separate written commercial license regardless of revenue. Other Commercial Use is permitted only within the conditions of the license, including the US $20 million Aggregate Revenue threshold measured over any consecutive 12-month period. If the threshold is exceeded, a separate commercial agreement is required before beginning or continuing any Commercial Use. The license specifies that the requirement continues after a subsequent revenue decrease.

Downloading, cloning, forking, copying, accessing, modifying, using, hosting, distributing, or otherwise exercising any licensed right constitutes acceptance of the Source-Available License and incorporated Eagle Trademark Policy. Mere viewing or inspection does not itself constitute trademark use.

For separate commercial terms, see the Commercial License Agreement and contact [email protected]. Publishing that agreement does not grant commercial-license rights; it becomes binding only as stated in its Section 1. Files derived from sglang, vLLM, FlashInfer and other projects keep those projects' notices, listed in THIRD_PARTY_NOTICES.md.

Contributing

By submitting, uploading, pushing, committing, proposing, or otherwise providing a pull request, patch, issue attachment, model, weight, dataset, documentation, or other contribution to this repository, you agree to the Eagle Contribution License and Submission Terms (PDF). If you do not agree, do not submit a contribution. If you act for an employer, client, partner or other entity, you represent that you have authority to submit the contribution and have obtained all required permissions. Submitting a contribution does not change the license of existing Eagle code; Eagle AI Corp controls outbound licensing for accepted contributions. See CONTRIBUTING.md for the licensing structure and for how to build, test and open a pull request.

EAGLE-4 (eagle-hq/EAGLE-4)

Ищем в базе…

1.3K ·GitHub
Что это такое?EAGLE-4 — это метод спекулятивного декодирования, который ускоряет инференс LLM. В этом репозитории находится eagle-harness, пакет, который позволяет серверным движкам использовать черновые модели EAGLE-4 без изменения вывода модели.
Это отдельный сервер или пакет, который подключается к движку вроде SGLang?Это eagle-harness, пакет, который добавляет EAGLE-4 в уже существующие серверные движки (SGLang, vLLM, TokenSpeed). Сам он не является новым движком: он стоит между движком и черновой моделью.
Как это запустить?Запустите сервер SGLang с готовым Docker-образом или установите eagle-harness через pip под Python 3.12, затем укажите движку черновую модель EAGLE-4 и отправляйте запросы, когда в логе появится сообщение ready.
Нужна ли особая конфигурация GPU?Быстрый старт собран и протестирован на одном NVIDIA B300 под Linux с драйвером CUDA 13. Замеры ускорения выполнялись на четырёх GPU B300, а AMD MI355X тоже поддерживается через порт на ROCm.
Есть ли известные ограничения или пробелы в поддержке оборудования?В репозитории есть отдельная таблица поддержки с данными о токенах в секунду, проверках корректности и известных ограничениях для каждого движка и GPU, так как поведение и ускорение зависят от оборудования, размера батча и нагрузки.
EAGLE-4 — открытое ПО?Нет: исходный код доступен, но лицензия не одобрена OSI, поэтому это не открытое ПО. Коммерческое использование бесплатно при выручке ниже 20 миллионов долларов США в течение 12 месяцев, а любое использование для «Competing Offering» требует отдельной коммерческой лицензии независимо от выручки.
Меняет ли спекулятивное декодирование ответы модели?Нет, EAGLE-4 проверяет черновики по целевой модели, поэтому результат совпадает с тем, что дал бы запуск без спекуляции, только быстрее.
Насколько быстрее работает инференс с EAGLE-4?До 3,42x для одного запроса в SGLang на Qwen3.8-27B на четырёх GPU B300. При большем числе одновременных запросов прирост меньше, но всё же заметен (1,1–2x).
Что именно eagle-harness решает во время работы?Он решает, на сколько шагов вперёд делать спекуляцию, используя измеренные затраты для вашего размера батча, оборудования и нагрузки, а не фиксированную глубину спекуляции.
Работает ли это только с SGLang?Нет, поддерживаются также vLLM и TokenSpeed. Для каждого движка есть отдельные руководства с точными измеренными командами.
Автор
eagle-hq
Размер
2.6 MB
Звёзды
1.3K
Возраст
29 д
Коммиты · 90 дней