Views
No views yet
| Configuration | Temperature = 0 | Temperature = 1 |
|---|---|---|
| MEDUSA + KL | 2.19 | 1.85 |
| MEDUSA + LK (ours) | 2.21 | 2.00 |
1from vllm import LLM, SamplingParams
2
3llm = LLM(
4 model="meta-llama/Llama-3.1-8B-Instruct",
5 speculative_config={
6 "method": "medusa",
7 "model": "nebius/MEDUSA-Llama-3.1-8B-Instruct",
8 "num_speculative_tokens": 6,
9 },
10)
11
12sampling_params = SamplingParams(temperature=0.7)
13outputs = llm.generate(["Explain speculative decoding in simple terms."], sampling_params)Note: The current vLLM implementation samples draft tokens greedily regardless of temperature settings, which can underestimate acceptance rates at temperature > 0. A community fix is under development (see vllm-project/vllm#20459). The acceptance metrics reported above were measured with proper rejection sampling.
@misc{samarin2026lklosses,
title = {LK Losses: Direct Acceptance Rate Optimization for Speculative Decoding},
author = {Alexander Samarin and Sergei Krutikov and Anton Shevtsov and Sergei Skvortsov and Filipp Fisin and Alexander Golubev},
year = {2026},
eprint = {2602.23881},
archivePrefix = {arXiv},
primaryClass = {cs.LG},
url = {https://arxiv.org/abs/2602.23881}
}