---
title: "Achieve state-of-the-art inference latencies with speculative decoding"
description: "Speculative decoding is the dominant lever for low-latency LLM serving because decode steps dominate latency and speculation yields multiplicative speedups roughly linear in acceptance length."
url: "https://swe.quest/articles/achieve-state-of-the-art-inference-latencies-with-speculative-decoding-29855d3aec239f45"
canonical: "https://modal.com/blog/achieve-sota-specdec"
source: "Modal"
published: "2026-06-24"
difficulty: "hard"
kind: "Case study"
reading_minutes: 9
tags: ["inference","llms","performance","model-training"]
---

# Achieve state-of-the-art inference latencies with speculative decoding

A post on [Modal](https://swe.quest/sources/modal.md), published 2026-06-24, 9 min read, Case study. Original: [https://modal.com/blog/achieve-sota-specdec](https://modal.com/blog/achieve-sota-specdec)

## Summary

Speculative decoding is the dominant lever for low-latency LLM serving because decode steps dominate latency and speculation yields multiplicative speedups roughly linear in acceptance length. Working with Decagon's voice agents, Modal combined regional serving, SGLang host-overhead fixes, and open-source kernels with DFlash draft models that reuse target-model KV projections and draft tokens in parallel. Fine-tuning ("mid-training") the speculator on synthetic data generated by the target model from public prompts in the task's output grammar avoids exposing user data. The custom speculator cut about 100ms from a ~290ms p50 baseline, roughly 40% of server-side decode latency, and beat proprietary providers by over 60ms. Out-of-distribution evaluation was used to guard against overfitting.

Written by swe.quest, not by the author.

**Difficulty:** Hard: written for specialists in the field

## Topics

- [Inference & serving](https://swe.quest/tags/inference.md) (AI & ML)
- [LLMs](https://swe.quest/tags/llms.md) (AI & ML)
- [Performance engineering](https://swe.quest/tags/performance.md) (Reliability & operations)
- [Model training](https://swe.quest/tags/model-training.md) (AI & ML)

## Prerequisites

- transformer prefill and decode
- speculative decoding basics
- GPU memory bandwidth bounds ([easy posts on Hardware](https://swe.quest/tags/hardware.md?difficulty=easy))
- model fine-tuning ([easy posts on Model training](https://swe.quest/tags/model-training.md?difficulty=easy))

## Keywords

speculative decoding, DFlash, SGLang, Modal Auto Endpoints, Decagon, multi-token prediction, Qwen 3.5, Blackwell

## Related posts

- [Speculation Is All You Need](https://swe.quest/articles/speculation-is-all-you-need-dffc126cb5233807.md): Modal · 2026-06-19 · Hard · 17 min read · Inference & serving, LLMs, Performance engineering, Model training
  Speculative decoding delivers integral-factor (2-3x+) LLM decode speedups, far beyond the few-percent gains from kernel or host-side optimization, and its benefit scales roughly linearly with acceptance length.
- [Accelerate RL rollouts by up to 50% with distribution-aware speculative decoding](https://swe.quest/articles/accelerate-rl-rollouts-by-up-to-50-with-distribution-aware-speculative-decoding-1fa2a300c01f2135.md): Together AI · 2026-04-24 · Hard · 5 min read · Inference & serving, Model training, LLMs, Performance engineering, Data structures
  Distribution-aware speculative decoding (DAS) speeds up the rollout phase of LLM RL post-training, which can consume ~70% of training time due to long-tail straggler generations, while keeping outputs identical to standard decoding.
- [How Decagon shipped real-time voice AI on Modal](https://swe.quest/articles/how-decagon-shipped-real-time-voice-ai-on-modal-b1a29f8666a68e7d.md): Modal · 2025-11-13 · Hard · 4 min read · Inference & serving, Model training, Speech & audio, LLMs, Performance engineering
  Decagon Voice 2.0 cut latency by 65% by replacing large frontier models with small open-source models fine-tuned through augmented multi-domain data, curriculum and mixed-objective SFT, and reinforcement learning.
- [Faster Assisted Generation with Dynamic Speculation](https://swe.quest/articles/faster-assisted-generation-with-dynamic-speculation-d8a65fbd607c86ac.md): Hugging Face · 2024-10-08 · Medium · 7 min read · Inference & serving, LLMs, Performance engineering
  Dynamic speculative decoding stops the draft model's token generation as soon as its softmax confidence falls below a threshold (assistant\_confidence\_threshold), rather than always drafting a fixed or heuristically adjusted number of tokens before verification by the target model.
- [Faster Text Generation with Self-Speculative Decoding](https://swe.quest/articles/faster-text-generation-with-self-speculative-decoding-0171e077befc3347.md): Hugging Face · 2024-11-20 · Hard · 13 min read · Inference & serving, LLMs, Performance engineering
  Self-speculative decoding from the LayerSkip paper drafts tokens by exiting early from a model's own intermediate layers and verifies them with the remaining layers.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
