Speculative Decoding
Parallel decoding skill covering draft models, Medusa heads, and Jacobi-based lookahead for faster LLM inference.
- CCM score
- 55 of 100
- skills.sh installs
- 1.1K
- GitHub stars
- 14.9K
- last updated
- Aug 21, 2026
Own this skill? Claim it
What it does
- Covers three speculative approaches: draft-model decoding, Medusa multiple prediction heads, and Lookahead Decoding with Jacobi iteration
- Includes quick-start code for transformers assisted generation, Medusa's
medusa_generate, and aLookaheadDecodingclass with window and n-gram parameters - Explains tree-based attention and the draft-then-verify acceptance loop, which keeps outputs equivalent to the target model
- Designed for latency-sensitive serving and deployments with limited compute, where a claimed 1.5-3.6× speedup is the goal
Install
$ npx -y skills add orchestra-research/ai-research-skills --skill speculative-decoding -yInstalls into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.
Files
Speculative Decoding: Accelerating LLM Inference
When to Use This Skill
Use Speculative Decoding when you need to:
- Speed up inference by 1.5-3.6× without quality loss
- Reduce latency for real-time applications (chatbots, code generation)
- Optimize throughput for high-volume serving
- Deploy efficiently on limited hardware
- Generate faster without changing model architecture
Key Techniques: Draft model speculative decoding, Medusa (multiple heads), Lookahead Decoding (Jacobi iteration)
Papers: Medusa (arXiv 2401.10774), Lookahead Decoding (ICML 2024), Speculative Decoding Survey (ACL 2024)
Installation
# Standard speculative decoding (transformers)
pip install transformers accelerate
# Medusa (multiple decoding heads)
git clone https://github.com/FasterDecoding/Medusa
cd Medusa
pip install -e .
# Lookahead Decoding
git clone https://github.com/hao-ai-lab/LookaheadDecoding
cd LookaheadDecoding
pip install -e .
# Optional: vLLM with speculative decoding
pip install vllm
Quick Start
Basic Speculative Decoding (Draft Model)
from transformers import AutoModelForCausalLM, AutoTokenizer
Details
- Repository
- github.com/orchestra-research/ai-research-skills
- Categories
- AI Agents & LLM Apps, Research & Academic
- First seen
- Jun 3, 2026
Questions
What does the speculative-decoding skill do?
The speculative-decoding skill teaches an agent to speed up LLM inference by 1.5-3.6× without quality loss, using a small draft model, Medusa multiple decoding heads, or lookahead decoding. It covers tree-based attention, Jacobi iteration, parallel token generation and production deployment strategies.
Who should use the speculative-decoding skill?
The speculative-decoding skill suits developers who need lower latency for real-time applications such as chatbots or code generation, or who must serve models on limited compute. It also helps teams that want faster throughput for high-volume serving without changing the model architecture.
How do I install the speculative-decoding skill?
Run npx -y skills add orchestra-research/ai-research-skills --skill speculative-decoding -y inside a project to install the speculative-decoding skill. Once installed, the agent can apply draft model, Medusa and lookahead decoding techniques to inference code.
What does the speculative-decoding skill need to run?
The speculative-decoding skill depends on the transformers and torch packages, and its examples load Llama-2 and Vicuna models. Medusa and lookahead decoding need their own repositories installed with pip install -e, and vLLM is optional.
More from orchestra-research/ai-research-skills
All 92- Hqq Quantization1.1K
- Model Merging1.1K
- Moe Training1.1K
- Sglang1.1K
- Chroma1.1K
- Nemo Curator1.1K
- Llama Factory1.1K
- Pyvene Interventions1.1K
- Gptq1.1K
- Model Pruning1.1K
- Sentencepiece1.1K
- Evaluating Code Models1.1K
- Distributed Llm Pretraining Torchtitan1.1K
- Mamba Architecture1.1K
- Openrlhf Training1.1K
- Sparse Autoencoder Training1.1K
- Llamaindex1.1K
- Ml Training Recipes1.1K
- Outlines1.1K
- Simpo Training1.1K
- Slime Rl Training1.1K
- Training Llms Megatron1.1K
- Guidance1.1K
- Nnsight Remote Interpretability1.1K
Similar to Speculative Decoding
More AI Agents & LLM AppssglangSkillorchestra-research/ai-research-skills1.1K installsFast LLM serving with RadixAttention prefix caching for structured JSON, regex, and agentic tool-call outputs.
model-pruningSkillorchestra-research/ai-research-skills1.1K installsPruning toolkit for LLMs that compresses models one-shot with Wanda, SparseGPT, and N:M sparsity, no retraining needed.
Sequential ThinkingMCP serverfradser308 starsMulti-agent step-by-step reasoning tool that runs each thought through six parallel specialist perspectives.
llmSkillmindrally/skills767 installsBroad LLM development guidance covering architecture, fine-tuning, distributed training, evaluation, and deployment.
conjurePluginathola/claude-night-market356 starsDelegate tasks to external LLMs (Gemini, Qwen) with cheapest-capable model selection while retaining strategic oversight
jetson-speculative-decodingSkillnvidia/skills1.1K installsAdds EAGLE-3 or draft-model speculative decoding to a Jetson vLLM server when per-token latency limits output speed.