speculative-decoding

Accelerate LLM inference with draft-model token speculation and target verification.

Updated Mar 18, 2026
One-click install
npx skills add https://github.com/tadod12/fraud-detection-research --skill speculative-decoding-tadod12
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: speculative-decoding
Source: https://github.com/tadod12/fraud-detection-research/tree/main/.agent/skills/19-emerging-techniques/speculative-decoding
Command: npx skills add https://github.com/tadod12/fraud-detection-research --skill speculative-decoding-tadod12

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Accelerate large-language-model inference by combining fast draft-model speculation with a validating target model, dramatically reducing latency for interactive applications while preserving output quality.

Core Features & Use Cases

  • Speculative decoding with a small draft model to generate candidate tokens in parallel with a larger target model.
  • Medusa-style multiple decoding heads that predict future tokens without external drafts.
  • Lookahead decoding (Jacobi iteration) to generate parallel n-grams and verify them for consistency.
  • Production deployment patterns, including integration with vLLM and parallel generation strategies for real-time workloads.

Quick Start

Run a small draft-model + large target-model inference task to demonstrate speculative decoding in action.

Frequently Asked Questions about speculative-decoding

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How can I speed up LLM inference for real-time chat applications?

Speculative decoding accelerates LLM inference by using a small draft model to propose tokens while a larger target model verifies them, achieving 1.5–3.6× latency reductions for real-time chat. It preserves output quality while enabling parallel generation.

How does Medusa-style decoding predict future tokens without an external draft model?

Medusa-style multiple decoding heads predict future tokens directly without needing an external draft model. They attach to the target model to generate candidate tokens in parallel, streamlining the speculative decoding process for faster LLM speedup.

What is lookahead decoding and how does Jacobi iteration generate parallel n-grams?

Lookahead decoding uses Jacobi iteration to generate parallel n-grams and verify them for consistency. This speculative decoding technique accelerates LLM inference by extracting and validating multiple token sequences simultaneously without a draft model.

Can I integrate speculative decoding with vLLM for production deployment?

Yes, speculative decoding supports production deployment patterns including integration with vLLM. This combination enables parallel generation strategies optimized for real-time workloads, delivering significant latency speedups in interactive assistants and code generation.

Does speculative decoding reduce inference latency without losing output quality?

Speculative decoding reduces inference latency by combining fast draft-model speculation with a validating target model. This approach dramatically reduces latency for interactive applications while fully preserving the output quality of the larger target model.

When should I use a draft model versus Medusa heads for parallel generation?

Use a draft model when you have a compatible small model to propose tokens for the larger target model. Use Medusa-style multiple decoding heads when you want to predict future tokens directly without managing an external draft model.