Skip to main content

FLy Verification

FLy Verification

FLy is an approximate verification policy that can defer a native rejection at a high-entropy position when the following draft tokens remain aligned with native verification.

Warning

FLy is intentionally lossy. Unlike standard speculative decoding, it does not preserve the target distribution and may degrade model outputs.

Usage

from vllm import LLM

llm = LLM(
    model="Qwen/Qwen3-8B",
    speculative_config={
        "method": "draft_model",
        "model": "Qwen/Qwen3-0.6B",
        "num_speculative_tokens": 8,
        "rejection_sample_method": "fly",
        "fly_window_size": 6,
        "fly_entropy_threshold": 0.3,
        "fly_entropy_top_k": 3,
    },
)

FLy requires at least two speculative tokens. fly_window_size is the number of subsequent native acceptance decisions checked; it must be smaller than num_speculative_tokens and defaults to min(6, num_speculative_tokens - 1). The entropy gate uses the three largest processed target probabilities by default. Set fly_entropy_top_k in speculative_config to change that number; it must be positive and is capped at the vocabulary size.

FLy supports greedy draft sampling with target-only acceptance and probabilistic draft sampling with standard p/q acceptance. Token-Level Intersection can be used for cross-vocabulary draft models with greedy draft sampling, but is incompatible with use_local_argmax_reduction.

FLy is supported by both model runners. With ModelRunnerV2, use a supported proposer such as MTP, EAGLE, or DFlash; standalone draft_model proposing still requires ModelRunnerV1.

Validated Configurations

The following evaluation covers the V1 draft_model proposer; MRV2 validation is summarized below. Configurations not listed here are not necessarily unsupported, but have not yet been experimentally validated.

FLy was faster than Standard SD in all 40 primary configurations. Across all four target/draft pairs, the 29 configurations with ratio-based quality measurements had a minimum quality retention of 97.9%.

AcceleratorModel configurationWorkloadsSamplingMeasured speedup
AMD MI355XLlama-3.1-70B-Instruct / Llama-3.1-8B-Instruct10-benchmark suiteTemperature 0, greedy draft1.092x–1.335x vs Standard SD
AMD MI355XDeepSeek-R1-Distill-Llama-70B / DeepSeek-R1-Distill-Llama-8B10-benchmark suiteTemperature 0, greedy draft1.147x–1.467x vs Standard SD
AMD MI355XLlama-3.1-405B-Instruct-FP8-KV / Llama-3.1-8B-Instruct10-benchmark suiteTemperature 0, greedy draft1.189x–1.938x vs Standard SD
AMD MI355XQwen3-235B-A22B-Thinking-2507-FP8 / Qwen3-8B10-benchmark suiteTemperature 0, greedy draft1.067x–1.478x vs Standard SD
NVIDIA B300DeepSeek-R1-Distill-Llama-70B / DeepSeek-R1-Distill-Llama-8BMATH-500, HumanEval, HLETemperature 0, greedy draft1.26x–1.43x vs Standard SD
NVIDIA B300Qwen2.5-72B-Instruct / Qwen2.5-7B-InstructGSM8K, MGSM, GPQA-Diamond, Spec-BenchTemperature 0, greedy draft1.07x–1.32x vs Standard SD
AMD MI300XKimi-K2.5 (1T)Random 8K input / 1K outputDFlash comparison>1.09x vs DFlash

The 10-benchmark suite contains GSM8K, MGSM, MATH-500, AIME 2024, AIME 2025, GPQA-Diamond, HumanEval, MBPP, Spec-Bench, and HLE. Subsets of GSM8K and MATH-500 were also validated with temperature 1 and probabilistic draft sampling.

ModelRunner V2

MRV2 runs used greedy draft sampling, fly_window_size=2, fly_entropy_threshold=0.3, and fly_entropy_top_k=3. Decode throughput was measured with 1,024 output tokens per request at batch sizes 1, 4, 8, 16, 32, and 64, excluding prefill.

AcceleratorModelSpeculative methodDraft tokens (K)Measured decode speedup
AMD MI355XDeepSeek-V4-Flash-0731DSpark71.103x–1.168x vs Standard SD
AMD MI355XQwen3.8-27BMTP31.055x–1.116x vs Standard SD
AMD MI355XGLM-5.2-FP8MTP51.110x–1.229x vs Standard SD
AMD MI355XQwen3.5-122B-A10B-FP8MTP81.251x–1.310x vs Standard SD
NVIDIA B300DeepSeek-V4-Flash-0731DSpark71.099x–1.253x vs Standard SD
NVIDIA B300Qwen3.8-27BMTP31.041x–1.095x vs Standard SD
NVIDIA B300GLM-5.2-FP8MTP51.120x–1.207x vs Standard SD
NVIDIA B300Qwen3.5-122B-A10B-FP8MTP81.202x–1.273x vs Standard SD

Single-pass quality evaluations compared Target-only, Standard SD, and FLy on GSM8K (100 examples), MATH-500 (100), AIME25 (30), and GPQA-Diamond (198). Relative to Target-only, the minimum measured accuracy retention was 96.43% on AMD and 96.30% on NVIDIA; both corresponded to one fewer correct answer on AIME25.