A unified library for building, evaluating, and storing speculative decoding algorithms for LLM inference in vLLM
824
stars
577
commits
Python
primary language
Sep 10, 2026
updated
Speculators is a library for training speculative decoding draft models that deploy directly to LLM inference engines like vLLM. Speculative decoding is a lossless technique that speeds up LLM inference by using a smaller, faster draft model (i.e. "the speculator") to propose tokens, which are then verified by the larger base model, reducing latency without compromising output quality. The speculator intelligently drafts multiple tokens ahead of time, and the base model verifies them in a single forward pass. This approach boosts performance without sacrificing output quality, as every accepted token is guaranteed to match what the main model would have generated on its own.
Speculators standardizes this process by providing a productionized end-to-end framework to train draft models with reusable formats and tools. Trained models can seamlessly run in vLLM, enabling the deployment of speculative decoding in production-grade inference servers.
π¬ Join us on the vLLM Community Slack and share your questions, thoughts, or ideas in:
#speculators#feat-spec-decodeπ₯ Watch our Office Hours presentation: Video | Slides
Big updates have landed in Speculators! To get a more in-depth look, check out the Speculators documentation.
Some of the exciting new features include:
hs_connectors plugin package with pluggable backends for transferring hidden states between vLLM and the trainer across nodes. The file-based backend uses a shared filesystem, while the Mooncake backend leverages a distributed store for environments without shared storage, enabling online speculator training at multi-node scale.--sliding-window to set the window size and --full-attention-indices to opt specific layers into full attention. Sliding window attention reduces KV cache allocation for long-context sequences and can improve per-position acceptance rates compared to full attention.[!TIP] Read more about Speculators features in this vLLM blog post.
The following table summarizes the models that have been trained end-to-end by our team as well as others in the roadmap:
| Verifier Architecture | Verifier Size | Training Support | vLLM Deployment Support |
|---|---|---|---|
| Llama | 8B-Instruct | EAGLE-3 β | β |
| 70B-Instruct | EAGLE-3 β | β | |
| Qwen3 | 8B | EAGLE-3 β
DFlash β P-EAGLE β | β |
| 14B | EAGLE-3 β | β | |
| 32B | EAGLE-3 β | β | |
| gpt-oss | 20b | EAGLE-3 β | β |
| 120b | EAGLE-3 β | β | |
| Qwen3 MoE | 30B-Instruct |
EAGLE-3
β
DFlash β | β |
| 30B | DFlash β | β | |
| 235B-Instruct | EAGLE-3 β | β | |
| 235B | EAGLE-3 β | β | |
| Qwen3-VL | 235B-A22B | EAGLE-3 β | β |
| Mistral Small 4 | 119B | DFlash β
DSpark β | β |
| Gemma 4 | 31B-it | EAGLE-3 β
DFlash β | β |
| Gemma 4 MoE | 26B-A4B-it | EAGLE-3 β | β |
| NVIDIA Nemotron 3 Ultra | 550B-A55B | DFlash β | β |
| NVIDIA Nemotron 3 Super | 120B-A12B | DFlash β | β |
| Kimi K3 | - | DSpark β | β |
| Qwen3.6 MoE | 35B-A3B | DSpark β | β |
| GLM 5.2 | - | DSpark β | β |
β = Supported, β³ = In Progress, β = Not Yet Supported
Models trained through Speculators can run seamlessly in vLLM using a simple vllm serve <speculator_model> command. This will run the model in vLLM using default arguments, defined in the speculator_config of the model's config.json.
vllm serve RedHatAI/Qwen3-8B-speculator.eagle3
Served models can then be benchmarked using GuideLLM. Below, we show sample benchmark results where we compare our speculator with its dense counterpart. We also additionally compare quantization to explore additional performance improvements by swapping the dense verifier, Qwen/Qwen3-8B with the quantized FP8 model, RedHatAI/Qwen3-8B-FP8-dynamic in the speculator_config.
Before installing, ensure you have the following:
Install the latest stable release from PyPI:
pip install speculators
For the latest development version or to contribute to the project:
git clone https://github.com/vllm-project/speculators.git
cd speculators
pip install -e .
For development with additional tools:
pip install -e ".[dev]"
You can verify your installation by checking the version:
speculators --version
Or by importing the package in Python:
import speculators
print(speculators.__version__)
Speculators is licensed under the Apache License 2.0.
If you find Speculators helpful in your research or projects, please consider citing it:
@misc{speculators2025,
title={Speculators: A Unified Library for Speculative Decoding Algorithms in LLM Serving},
author={Red Hat},
year={2025},
howpublished={\url{https://github.com/vllm-project/speculators}},
}
(top 30 of 58)
Python
99.0%
A unified library for building, evaluating, and storing speculative decoding algorithms for LLM inference in vLLM
824
stars
577
commits
Python
primary language
Sep 10, 2026
updated
Speculators is a library for training speculative decoding draft models that deploy directly to LLM inference engines like vLLM. Speculative decoding is a lossless technique that speeds up LLM inference by using a smaller, faster draft model (i.e. "the speculator") to propose tokens, which are then verified by the larger base model, reducing latency without compromising output quality. The speculator intelligently drafts multiple tokens ahead of time, and the base model verifies them in a single forward pass. This approach boosts performance without sacrificing output quality, as every accepted token is guaranteed to match what the main model would have generated on its own.
Speculators standardizes this process by providing a productionized end-to-end framework to train draft models with reusable formats and tools. Trained models can seamlessly run in vLLM, enabling the deployment of speculative decoding in production-grade inference servers.
π¬ Join us on the vLLM Community Slack and share your questions, thoughts, or ideas in:
#speculators#feat-spec-decodeπ₯ Watch our Office Hours presentation: Video | Slides
Big updates have landed in Speculators! To get a more in-depth look, check out the Speculators documentation.
Some of the exciting new features include:
hs_connectors plugin package with pluggable backends for transferring hidden states between vLLM and the trainer across nodes. The file-based backend uses a shared filesystem, while the Mooncake backend leverages a distributed store for environments without shared storage, enabling online speculator training at multi-node scale.--sliding-window to set the window size and --full-attention-indices to opt specific layers into full attention. Sliding window attention reduces KV cache allocation for long-context sequences and can improve per-position acceptance rates compared to full attention.[!TIP] Read more about Speculators features in this vLLM blog post.
The following table summarizes the models that have been trained end-to-end by our team as well as others in the roadmap:
| Verifier Architecture | Verifier Size | Training Support | vLLM Deployment Support |
|---|---|---|---|
| Llama | 8B-Instruct | EAGLE-3 β | β |
| 70B-Instruct | EAGLE-3 β | β | |
| Qwen3 | 8B | EAGLE-3 β
DFlash β P-EAGLE β | β |
| 14B | EAGLE-3 β | β | |
| 32B | EAGLE-3 β | β | |
| gpt-oss | 20b | EAGLE-3 β | β |
| 120b | EAGLE-3 β | β | |
| Qwen3 MoE | 30B-Instruct |
EAGLE-3
β
DFlash β | β |
| 30B | DFlash β | β | |
| 235B-Instruct | EAGLE-3 β | β | |
| 235B | EAGLE-3 β | β | |
| Qwen3-VL | 235B-A22B | EAGLE-3 β | β |
| Mistral Small 4 | 119B | DFlash β
DSpark β | β |
| Gemma 4 | 31B-it | EAGLE-3 β
DFlash β | β |
| Gemma 4 MoE | 26B-A4B-it | EAGLE-3 β | β |
| NVIDIA Nemotron 3 Ultra | 550B-A55B | DFlash β | β |
| NVIDIA Nemotron 3 Super | 120B-A12B | DFlash β | β |
| Kimi K3 | - | DSpark β | β |
| Qwen3.6 MoE | 35B-A3B | DSpark β | β |
| GLM 5.2 | - | DSpark β | β |
β = Supported, β³ = In Progress, β = Not Yet Supported
Models trained through Speculators can run seamlessly in vLLM using a simple vllm serve <speculator_model> command. This will run the model in vLLM using default arguments, defined in the speculator_config of the model's config.json.
vllm serve RedHatAI/Qwen3-8B-speculator.eagle3
Served models can then be benchmarked using GuideLLM. Below, we show sample benchmark results where we compare our speculator with its dense counterpart. We also additionally compare quantization to explore additional performance improvements by swapping the dense verifier, Qwen/Qwen3-8B with the quantized FP8 model, RedHatAI/Qwen3-8B-FP8-dynamic in the speculator_config.
Before installing, ensure you have the following:
Install the latest stable release from PyPI:
pip install speculators
For the latest development version or to contribute to the project:
git clone https://github.com/vllm-project/speculators.git
cd speculators
pip install -e .
For development with additional tools:
pip install -e ".[dev]"
You can verify your installation by checking the version:
speculators --version
Or by importing the package in Python:
import speculators
print(speculators.__version__)
Speculators is licensed under the Apache License 2.0.
If you find Speculators helpful in your research or projects, please consider citing it:
@misc{speculators2025,
title={Speculators: A Unified Library for Speculative Decoding Algorithms in LLM Serving},
author={Red Hat},
year={2025},
howpublished={\url{https://github.com/vllm-project/speculators}},
}
(top 30 of 58)
Python
99.0%