EAGLE-3: Scaling up Inference Acceleration of Large Language Models via Training-Time Test
Paper • 2503.01840 • Published • 10
How to use RedHatAI/Qwen3-8B-Thinking-speculator.eagle3 with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-generation", model="RedHatAI/Qwen3-8B-Thinking-speculator.eagle3", trust_remote_code=True) # Load model directly
from transformers import AutoModel
model = AutoModel.from_pretrained("RedHatAI/Qwen3-8B-Thinking-speculator.eagle3", trust_remote_code=True, dtype="auto")How to use RedHatAI/Qwen3-8B-Thinking-speculator.eagle3 with vLLM:
# Install vLLM from pip:
pip install vllm
# Start the vLLM server:
vllm serve "RedHatAI/Qwen3-8B-Thinking-speculator.eagle3"
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:8000/v1/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "RedHatAI/Qwen3-8B-Thinking-speculator.eagle3",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'docker model run hf.co/RedHatAI/Qwen3-8B-Thinking-speculator.eagle3
How to use RedHatAI/Qwen3-8B-Thinking-speculator.eagle3 with SGLang:
# Install SGLang from pip:
pip install sglang
# Start the SGLang server:
python3 -m sglang.launch_server \
--model-path "RedHatAI/Qwen3-8B-Thinking-speculator.eagle3" \
--host 0.0.0.0 \
--port 30000
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:30000/v1/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "RedHatAI/Qwen3-8B-Thinking-speculator.eagle3",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'docker run --gpus all \
--shm-size 32g \
-p 30000:30000 \
-v ~/.cache/huggingface:/root/.cache/huggingface \
--env "HF_TOKEN=<secret>" \
--ipc=host \
lmsysorg/sglang:latest \
python3 -m sglang.launch_server \
--model-path "RedHatAI/Qwen3-8B-Thinking-speculator.eagle3" \
--host 0.0.0.0 \
--port 30000
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:30000/v1/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "RedHatAI/Qwen3-8B-Thinking-speculator.eagle3",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'How to use RedHatAI/Qwen3-8B-Thinking-speculator.eagle3 with Docker Model Runner:
docker model run hf.co/RedHatAI/Qwen3-8B-Thinking-speculator.eagle3
This is a speculator model designed for use with Qwen3-8B, based on the EAGLE-3 speculative decoding algorithm.
It was trained using the speculators library on a combination of the Magpie-Align/Magpie-Pro-300K-Filtered and the HuggingFaceH4/ultrachat_200k datasets.
The model was trained with thinking enabled.
This model should be used with the Qwen3-8B chat template, specifically through the /chat/completions endpoint.
vllm serve Qwen/Qwen3-8B \
-tp 1 \
--speculative-config '{
"model": "RedHatAI/Qwen3-8B-Thinking-speculator.eagle3",
"num_speculative_tokens": 5,
"method": "eagle3"
}'
| Dataset | k=1 | k=2 | k=3 | k=4 | k=5 |
|---|---|---|---|---|---|
| HumanEval | 1.83 | 2.43 | 2.90 | 3.23 | 3.42 |
| math_reasoning | 1.85 | 2.53 | 3.04 | 3.44 | 3.74 |
| qa | 1.77 | 2.30 | 2.67 | 2.90 | 3.11 |
| question | 1.80 | 2.37 | 2.78 | 3.12 | 3.31 |
| rag | 1.77 | 2.30 | 2.69 | 2.94 | 3.11 |
| summarization | 1.70 | 2.15 | 2.42 | 2.59 | 2.69 |
| translation | 1.74 | 2.25 | 2.59 | 2.81 | 2.93 |
Configuration
Command
GUIDELLM__PREFERRED_ROUTE="chat_completions" \
GUIDELLM__MAX_CONCURRENCY=128 \
guidellm benchmark \
--target "http://localhost:8000/v1" \
--data "RedHatAI/speculator_benchmarks" \
--data-args '{"data_files": "HumanEval.jsonl"}' \
--rate-type throughput \
--max-seconds 300 \
--backend-args '{"extra_body": {"chat_completions": {"temperature": 0.0}}}'