Skip to main content
Redhat Developers  Logo
  • AI

    Get started with AI

    • Red Hat AI
      Accelerate the development and deployment of enterprise AI solutions.
    • AI learning hub
      Explore learning materials and tools, organized by task.
    • AI interactive demos
      Click through scenarios with Red Hat AI, including training LLMs and more.
    • AI/ML learning paths
      Expand your OpenShift AI knowledge using these learning resources.
    • AI quickstarts
      Focused AI use cases designed for fast deployment on Red Hat AI platforms.
    • No-cost AI training
      Foundational Red Hat AI training.

    Featured resources

    • OpenShift AI learning
    • Open source AI for developers
    • AI product application development
    • Open source-powered AI/ML for hybrid cloud
    • AI and Node.js cheat sheet

    Red Hat AI Factory with NVIDIA

    • Red Hat AI Factory with NVIDIA is a co-engineered, enterprise-grade AI solution for building, deploying, and managing AI at scale across hybrid cloud environments.
    • Explore the solution
  • Learn

    Self-guided

    • Documentation
      Find answers, get step-by-step guidance, and learn how to use Red Hat products.
    • Learning paths
      Explore curated walkthroughs for common development tasks.
    • Guided learning
      Receive custom learning paths powered by our AI assistant.
    • See all learning

    Hands-on

    • Developer Sandbox
      Spin up Red Hat's products and technologies without setup or configuration.
    • Interactive labs
      Learn by doing in these hands-on, browser-based experiences.
    • Interactive demos
      Click through product features in these guided tours.

    Browse by topic

    • AI/ML
    • Automation
    • Java
    • Kubernetes
    • Linux
    • See all topics

    Training & certifications

    • Courses and exams
    • Certifications
    • Skills assessments
    • Red Hat Academy
    • Learning subscription
    • Explore training
  • Build

    Get started

    • Red Hat build of Podman Desktop
      A downloadable, local development hub to experiment with our products and builds.
    • Developer Sandbox
      Spin up Red Hat's products and technologies without setup or configuration.

    Download products

    • Access product downloads to start building and testing right away.
    • Red Hat Enterprise Linux
    • Red Hat AI
    • Red Hat OpenShift
    • Red Hat Ansible Automation Platform
    • See all products

    Featured

    • Red Hat build of OpenJDK
    • Red Hat JBoss Enterprise Application Platform
    • Red Hat OpenShift Dev Spaces
    • Red Hat Developer Toolset

    References

    • E-books
    • Documentation
    • Cheat sheets
    • Architecture center
  • Community

    Get involved

    • Events
    • Live AI events
    • Red Hat Summit
    • Red Hat Accelerators
    • Community discussions

    Follow along

    • Articles & blogs
    • Developer newsletter
    • Videos
    • Github

    Get help

    • Customer service
    • Customer support
    • Regional contacts
    • Find a partner

    Join the Red Hat Developer program

    • Download Red Hat products and project builds, access support documentation, learning content, and more.
    • Explore the benefits

Smarter data generation for faster Speculator training

July 6, 2026
Shubhra Pandit Alexandre Marques
Related topics:
Artificial intelligence
Related products:
Red Hat AI

    Large language models generate text autoregressively: one token at a time. Every generated token requires a full forward pass—and that serial, per-token cost is the fundamental bottleneck in LLM serving, especially for large models. As models get larger and deployments scale, the gap between what hardware can theoretically do and what autoregressive generation actually delivers becomes increasingly expensive to close.

    Speculative decoding is one of the most effective techniques available today for closing that gap—delivering two to three times the throughput gains and dramatically lower latency across a wide range of production workloads, with no changes to the model and no loss in output quality. The key idea is to use a small, fast “speculator” model to propose several tokens at once, then let the large “verifier” model validate them all in a single parallel pass. Accepted tokens are almost free.

    However, the speedup provided by speculative decoding depends entirely on one thing: how well the speculator model is aligned with the verifier model. A well aligned speculator yields more accepted tokens per step, whereas a poorly aligned speculator wastes compute on rejected proposals.

    This brings us to a critical question: How do you train a good speculator model as fast and efficiently as possible?

    One of the biggest bottlenecks in the training process is obtaining high-quality data that aligns closely with the distribution generated by the verifier model. The standard approach is to run the verifier model on a set of prompts and collect its responses, but for massive verifier models this process is slow and expensive. We wanted to see whether smarter choices about training data and training duration could reduce that cost without sacrificing speculator quality. This post covers our findings as we tackle two main questions:

    • Can you avoid expensive response generation by training on outputs from distinct LLMs?
    • How many training epochs does a speculator actually need?

    We also look at how well these findings generalize across reasoning and instruct variants, and share real production inference numbers. We conducted all training using the Speculators library, an open source framework built by the Red Hat team for training speculator models. This framework supports multiple algorithms, including EAGLE3, DFlash, and P-EAGLE. We ran inference benchmarks using GuideLLM, and speculators deploy directly into vLLM.

    Experimental setup and key metrics

    Before diving into the data, it's worth reinforcing a vital property of speculative decoding: it is completely lossless. Because the verifier model validates the output, the output distribution matches what the model would have produced on its own. You gain massive speedups while giving up nothing in output quality.

    And because the gains come entirely from how many draft tokens the verifier model accepts, the key metric throughout this post is mean acceptance length—the average number of draft tokens accepted per step. For example, an acceptance length of 2.5 at k=5 means the verifier model accepts 2.5 out of every five proposed tokens on average, effectively more than doubling useful output per step.

    Most of our benchmarks use EAGLE3, a speculative decoding algorithm that generates draft tokens recursively. We also display an experiment with DFlash, a newer parallel drafting algorithm designed for higher compute utilization. Both of these state-of-the-art algorithms achieve high prediction accuracy by extracting and fusing a snapshot of the verifier model’s intermediate hidden states.

    Methodology overview

    To test how these data strategies perform in practice, we set up a controlled environment across several verifier models, hardware configurations, and real-world workloads.

    • Verifier models evaluated: gpt-oss-20b, gpt-oss-120b, Qwen3-30B-A3B, Qwen3-32B, and Laguna-XS.2.
    • Training dataset: Training data combined 500K prompt-response pairs: 300K from Magpie and 200K from UltraChat.
    • Hardware setup: We conducted training on either 8xA100 or 8xH100 GPUs. Initial runs went for six epochs, though later optimized runs were shortened to two to four epochs based on our convergence findings.
    • Evaluation workloads: We evaluated the models across seven datasets representing real-world production use cases: HumanEval (coding), math reasoning, QA (multi-sentence factual), question answering (concise/direct), RAG, summarization, and translation.

    Self-distillation vs. cross-distillation: Can we skip expensive data generation?

    The standard way to train a speculator is self-distillation: run the verifier model on a set of prompts, collect its responses, and train the speculator to predict them. This ensures your training data perfectly mirrors the target model's distribution.

    The problem is cost. In practice, we typically train with roughly 500K examples; generating that many responses from a massive verifier model is a major compute expense. Depending on hardware, prompt/output lengths, and serving configuration, this step can take multiple days, and it must be repeated for every new model you want to accelerate. We wanted to know whether that expensive step could be reduced or skipped entirely by cross-distillation: using (pre-existing) responses generated by another model.

    We tested two cross-distillation scenarios:

    • Same-family: Distilling from a larger model within the same architecture family (for example, using Qwen3-235B-A22B responses to train a Qwen3-30B-A3B speculator)
    • Cross-family: Distilling from a larger model from a different architecture family (for example, Qwen3-235B-A22B responses to train a gpt-oss-120b speculator)

    Same-family distillation (large model → small model)

    Let’s first take a look at the same-family architecture scenario. We trained EAGLE3 speculators for the reasoning and instruct variants of Qwen3-30B-A3B and Qwen3-32B, comparing self-distillation and cross-distillation with responses from Qwen3-235B-A22B.

    Result: As displayed in Figures 1 through 4, speculators trained with data from the larger model consistently outperform self-distillation, sometimes by wide margins.

    Figure 1
    Figure 1: Qwen3-30B-A3B speculator quality (EAGLE3,  5 draft tokens): same-family cross-distillation from Qwen3-235B-A22B outperforms self-distillation across all seven workloads, with mean acceptance length increasing from 2.77 to 3.05 (about 10% gain), and the largest absolute improvements in math reasoning and HumanEval.
    Figure 2
    Figure 2: Qwen3-30B-A3B-Instruct-2507 speculator quality (EAGLE3, 5 draft tokens): same-family cross-distillation leads overall, with modest gains concentrated in HumanEval, question answering, and RAG (about 4–5%), while QA is nearly unchanged and translation slightly favors self-distillation.
    Figure 3
    Figure 3: Qwen3-32B speculator quality (reasoning mode, EAGLE3, 5 draft tokens): same-family cross-distillation and self-distillation are close overall, with cross-distillation holding a modest mean lead (3.09 vs 3.06). The largest gains are in translation, summarization, and RAG, math reasoning is effectively tied, and question answering slightly favors self-distillation.
    Figure 4
    Figure 4: Qwen3-32B speculator quality (non-reasoning mode, EAGLE3, 5 draft tokens): same-family cross-distillation shows a strong advantage, driven mainly by coding (+37%) and math (+47%), while QA and translation slightly favor self-distillation.

    We observed the same pattern on a completely different model family, training a gpt-oss-20b speculator using responses from gpt-oss-120b (see figure 5).

    Figure 5
    Figure 5: gpt-oss-20b speculator quality (EAGLE3, 5 draft tokens): same-family cross-distillation from gpt-oss-120b improves mean acceptance length versus self-distillation model (2.30 vs 2.17), with largest gains in question answering, RAG, QA, and coding, and near parity in math reasoning, summarization, and translation.

    It is not surprising that responses produced from a large model can be used to train effective speculators for smaller models within the same family, as smaller family variants are often distilled from larger models during initial training. However, the fact that cross-distillation can lead to higher acceptance rates is a major win.

    The takeaway: For any given model family, you only need to perform expensive response generation once on the largest model. Those same responses can then be reused to train highly effective speculators across the entire family variation spectrum, generating significant compute savings.

    Despite the savings, extracting responses from the largest (and most expensive) model within a family can still be expensive. What if we try to reuse data across different model families? Let’s look at that next.

    Cross-family distillation

    We tested exactly this scenario by training an EAGLE3 speculator for gpt-oss-120b and a DFlash speculator for Laguna-XS.2 using both self-distillation and data from Qwen3-235B-A22B. In this setup, the teacher is larger than the verifier models but has distinct architecture and training ancestry. The resulting acceptance lengths are displayed in Figures 6 and 7.

    Figure 6
    Figure 6: gpt-oss-120b speculator quality (EAGLE3, 5 draft tokens): in this cross-family setting, self-distillation outperforms cross-distillation from Qwen3-235B-A22B across most workloads (mean acceptance length 2.65 vs 2.40), with translation near parity.
    Figure 7
    Figure 7: Laguna-XS.2 speculator quality (DFlash, 7 draft tokens): in this cross-family setup, cross-distillation improves overall mean acceptance length versus the self-distillation baseline (2.80 vs 2.71), and leads on four of seven datasets. The largest gains are in math reasoning (3.75 vs 3.32), HumanEval (3.07 vs 2.70), and question answering (2.61 vs 2.51), with a small gain in RAG (2.69 vs 2.67). Baseline remains higher on QA (2.39 vs 2.48), summarization (2.48 vs 2.62), and translation (2.63 vs 2.67).

    These results show that cross-distillation across model families is a bit more nuanced. While it can introduce a persistent performance gap in some targets, it can also produce highly competitive or better speculators in others. For gpt-oss-120b, cross-distillation resulted in significantly lower acceptance rates than self-distillation. For Laguna-XS.2, the cross-distilled DFlash model is competitive overall and ahead on many workloads. Since these two examples use different speculator algorithms (EAGLE3 for gpt-oss-120b and DFlash for Laguna-XS.2), we should interpret them as practical outcomes on two targets, not as a direct algorithm-to-algorithm comparison.

    So if cross-family distillation can leave a gap and self-distillation is expensive, the practical question becomes: how much of that gap can a mixed strategy recover? Let’s see if a hybrid approach will work.

    The hybrid approach

    A natural middle ground between pure cross-family distillation and pure self-distillation is mixing data from both approaches. We tested this scenario by starting from the cross-distillation speculator for gpt-oss-120b from above and further training it on self-distillation data. Figure 8 shows how the mean acceptance length (averaged across all the use cases) shifts as a function of the number of self-distillation samples.

    Figure 8
    Figure 8: gpt-oss-120b hybrid training after 5 epochs (EAGLE3, 5 draft tokens): adding self-distillation data to a cross-distilled checkpoint improves mean acceptance length from 2.40 (cross only) to 2.60 at 500K samples, but still falls short of the self-distillation ceiling (2.65), with most gains captured by the first 50K–100K samples.

    Adding a modest amount of self-distillation data (up to 50K samples) delivers a stark positive jump in acceptance rates. However, the cross-distillation data has a lasting impact on the speculator behavior. Even when the speculator was eventually trained on a full 500K self-distillation samples, it never quite matched the peak acceptance length achieved by training purely on self-distillation data from the start.

    The data strategy verdict

    Taken together across all three results:

    • Generating responses from the largest model within the verifier family results in the highest acceptance rates. This is expensive, but the cost is amortized if the data is used to train speculators for multiple models within the same family.
    • Adding a limited number of self-distillation samples (around 50K) to pre-existing data generated by other models is a relatively cheap and effective alternative, although it may not result in the same quality.

    How many training epochs are needed?

    With the data strategy settled, the next practical question is how long to train. For our particular data mix (300K samples from Magpie and 200K samples from UltraChat) all models show the same convergence pattern: the bulk of improvement arrives in the first two to three epochs, and the value of additional training drops sharply after that.

    Figure 9
    Figure 9: gpt-oss-120b epoch progression (EAGLE3, 5 draft tokens): both self-distillation and cross-distillation improve most in the first 2–3 epochs and then flatten, but the self-distillation curve stays consistently higher. The cross-family gap is established early and remains largely unchanged through epoch 6.

    As shown in Figure 9, acceptance gains for the gpt-oss-120b EAGLE3 speculator flatten out rapidly regardless of data strategy. For self-distillation, the mean acceptance length (out of five draft tokens) only crawls from 2.49 at epoch 1 to 2.65 at epoch 6—a modest 6.4% gain—with two-thirds of that gain arriving in the first two epochs. Cross-distillation follows the same dynamics: rapid gains early, flattening sharply past epoch 3. Both strategies converge by epoch 4.

    Figure 10 shows the acceptance rate per dataset for Qwen3-30B-A3B trained with cross-distillation data. Acceptance rates rise steadily and flatten together, with the mean settled around epoch 4.

    Figure 10
    Figure 10: Qwen3-30B-A3B cross-distillation (teacher: Qwen3-235B-A22B), per-dataset acceptance length across training epochs (EAGLE3, 5 draft tokens). All datasets rise early, then flatten, with the mean effectively settled by epoch 4.

    Practical recommendation: When using our recommended data mix, three to four epochs is the optimal sweet spot for stopping speculator training runs.

    What does this look like in production?

    Training better speculator models pays off directly at serving time. The checkpoints produced by our training runs slot directly into vLLM's speculative decoding pipeline and substantially reduce inter-token latency with no changes to the serving stack.

    Figure 11 shows Inter-Token Latency (ITL) measured with a GuideLLM sweep across a range of request rates. Two things stand out.

    First, speculative decoding lowers the ITL floor dramatically:

    • Approximately three times for gpt-oss-120b on math reasoning (using EAGLE3)
    • Approximately 3.2 times for Laguna-XS.2 on coding (using DFlash).
    Figure 11
    Figure 11: Inter-token latency (ms) vs. request rate (req/s) for gpt-oss-120b on math reasoning (EAGLE, 5 draft tokens) and Laguna-XS.2 on HumanEval coding (DFlash, 7 draft tokens), compared against their BF16 baselines. Shaded region marks the latency reduction over the overlapping request-rate range; the speculative decode line extending beyond reflects additional throughput headroom. Measured with GuideLLM on an A100 server with TP=4 per model.

    Second, the reduction in total request time through speculative decoding allows the system to delay saturation. This shift enables the infrastructure to handle a higher volume of requests per second before performance begins to decline. Ultimately, this leads to accelerated token generation across all levels of demand and increases the operational ceiling before the system reaches its limit.

    Conclusion

    Training data strategy is the biggest lever for speculator quality: same-family cross-distillation wins where a larger sibling model's responses are available, a hybrid cross-family distillation with limited self-distillation is a viable alternative, and three to four epochs is enough for either. The result is two to three times throughput and dramatically lower latency with no changes to the verifier model.

    The training framework used for all experiments in this post is the open source library Speculators. You can find the best-performing speculators for Llama, Qwen, gpt-oss, and Gemma (including EAGLE3, DFlash and P-EAGLE) at our Red Hat AI Speculator Models collection. More experiments are underway, including exploring broader training datasets and the effect of mixing responses from different models.

    Questions and contributions are welcome in the vLLM Community Slack at #speculators and #feat-spec-decode.

    Related Posts

    • Speculators: Standardized, production-ready speculative decoding

    • How spec-driven development improves AI coding quality

    • Speculators v0.5.0: DFlash support and online training

    • Performance improvements with speculative decoding in vLLM for gpt-oss

    • Vibes, specs, skills, and agents: The four pillars of AI coding

    • How speculative decoding delivers faster LLM inference

    Recent Posts

    • Smarter data generation for faster Speculator training

    • 5 anti-patterns that cause Kubernetes operator vulnerabilities

    • Track model usage with the OpenShift AI 3.4 usage dashboard

    • Red Hat build of Quarkus 3.33: Stability and performance advancements for enterprise Java

    • Batch inference on OpenShift AI with llm-d: Architecture, integration, and workflows

    What’s up next?

    RedHat AI platform card

    Red Hat AI

    Accelerate the development and deployment of enterprise AI solutions across...

    Red Hat Developers logo LinkedIn YouTube Twitter Facebook

    Platforms

    • Red Hat AI
    • Red Hat Enterprise Linux
    • Red Hat OpenShift
    • Red Hat Ansible Automation Platform
    • See all products

    Build

    • Developer Sandbox
    • Developer tools
    • Interactive tutorials
    • API catalog

    Quicklinks

    • Learning resources
    • E-books
    • Cheat sheets
    • Blog
    • Events
    • Newsletter

    Communicate

    • About us
    • Contact sales
    • Find a partner
    • Report a website issue
    • Site status dashboard
    • Report a security problem

    RED HAT DEVELOPER

    Build here. Go anywhere.

    We serve the builders. The problem solvers who create careers with code.

    Join us if you’re a developer, software engineer, web designer, front-end designer, UX designer, computer scientist, architect, tester, product manager, project manager or team lead.

    Sign me up

    Red Hat legal and privacy links

    • About Red Hat
    • Jobs
    • Events
    • Locations
    • Contact Red Hat
    • Red Hat Blog
    • Inclusion at Red Hat
    • Cool Stuff Store
    • Red Hat Summit
    © 2026 Red Hat

    Red Hat legal and privacy links

    • Privacy statement
    • Terms of use
    • All policies and guidelines
    • Digital accessibility

    Chat Support

    Please log in with your Red Hat account to access chat support.