
Show Notes
When a large language model generates text one token at a time, even a fast GPU hits a sequential bottleneck. This episode explains speculative decoding, an inference technique that prepares several tokens at once and checks them together, and when the extra computation pays off.
Ordinary generation makes the target model run a full forward pass for every single token, since each prediction depends on the one before it. Speculative decoding adds a cheap draft step: a smaller model, a lightweight prediction head, or a pattern-matching method proposes a short run of likely next tokens, and the target model verifies the whole batch in one pass. Using the illustrative example "The capital of France is" followed by candidate tokens "Paris," "and," "it," "is," the episode walks through how the target model accepts a correct prefix, rejects a wrong candidate, and continues generating from that rejection point rather than discarding everything. Done with the right verification and sampling procedure, this preserves the target model's exact output distribution — the speedup doesn't require swapping in a weaker model. The original 2023 ICML paper introducing the technique reported a 2x-3x acceleration in its T5 experiments, a result specific to that setup rather than a universal guarantee.
The episode covers the main ways to build a draft: a separate smaller model (which needs a compatible tokenizer with the target), prediction heads or internal-feature-based methods like EAGLE, multi-token prediction, and N-gram or prompt-lookup methods that reuse matching text already in the prompt without a second model at all. It explains why the benefit depends on acceptance rate, draft cost, and available spare compute, and why speculative decoding can even reduce throughput once a GPU is already busy serving many concurrent requests.
The episode closes with concrete evaluation guidance: measure time to first token, inter-token latency, accepted-draft rate, memory overhead, and total throughput across varied workloads and concurrency levels, since a setup that feels faster for one user can perform worse once the server gets busy.
Sources & References Leviathan, Kalman, and Matias: Fast Inference from Transformers via Speculative Decoding (ICML 2023) — https://proceedings.mlr.press/v202/leviathan23a.html vLLM Documentation: Speculative Decoding — https://docs.vllm.ai/en/latest/features/speculative_decoding/index.html NVIDIA TensorRT-LLM Documentation: Speculative Decoding — https://github.com/NVIDIA/TensorRT-LLM/blob/main/docs/source/features/speculative-decoding.md NVIDIA Triton Inference Server Documentation: Speculative Decoding with TensorRT-LLM — https://docs.nvidia.com/deeplearning/triton-inference-server/user-guide/docs/tutorials/Feature_Guide/Speculative_Decoding/TRT-LLM/README.html
Voice narration is AI-generated.
More from Learn AI in Bits
Recursive self-improvement is the idea that an AI can improve the very process it uses to improve itself, and this episode separates what's been demonstrated so far from the dramatic predictions often attached to the term. It draws a clear line between self-correction (revising one answer), automated optimization (keeping the best of several tested variants), and true recursive improvement, where the system changes the process that generates future improvements, so the next round starts with a better improver.
This week's AI News Sunday Wrap-Up covers a week where the industry moved on several fronts at once: new flagship and open models, enterprise agent governance, a serious safety warning, legal pressure, and the physical infrastructure limits behind the AI race.
Meta's Muse story is moving fast, and this episode takes a closer look at Muse Spark, the multimodal reasoning model family behind Meta's push into AI agents, including yesterday's release of an open-weight version for developers.
When an AI model answers slowly, the problem usually isn't its intelligence — it's how the serving system moves data through a GPU. This episode goes one level below the basic inference loop covered in an earlier episode, into GPU memory, the key-value cache, attention kernels, and the scheduling techniques used by systems like vLLM and NVIDIA TensorRT-LLM.
A hidden recording device was found behind a television in an OpenAI executive conference room, concealed in toilet paper and plugged into a USB port, leading to an FBI arrest and federal charges. This episode follows the publicly reported timeline and examines OpenAI's statement that its own AI models helped analyze the device and identify a suspect, while being careful to separate established facts from allegations in an ongoing case.