Skip to content
PodSubs
ShowsPeopleGuestsJobsNewsEvents
More
BlogPodCred
Menu
ShowsPeopleGuestsJobsNewsEventsBlogPodCredNetworksSign in
Join nowSign in
  • Shows
  • People
  • Jobs
  • News
  • More
    • Guests
    • Events
    • Blog
    • PodCred
    • Networks
    Join nowSign in

Learn AI in Bits

Learn AI in Bits artwork

084 - Speculative Decoding: Making LLMs Generate Faster

Oct 15, 20267 minAudioSeason 1, Episode 84
ShareXLinkedInFacebookWhatsAppEmail

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.

Audio and video play straight from the show's own hosting. PodSubs stores and serves no media.

Hosts and Guests

Nobody is credited on this episode yet.

Credit the people on this episode

Be the first to rate this episode

More episodes

All episodes
  1. 099 - How Does an LLM Generate Text?

    Nov 23, 20265 minAudio

    Follow a prompt through the inner workings of a large language model. This episode explains tokenization, embeddings, transformer layers, attention, logits, probability selection, and the KV cache. It also compares...

    Credit the people on this episode

  2. 098 - Product Managers: What AI Skills Are Companies Looking for?

    Nov 23, 20265 minAudio

    Explore the AI skills employers increasingly expect from product managers working on AI products. This episode covers core product management, AI literacy, model and agent fundamentals, evaluation, product metrics, and...

    Credit the people on this episode

  3. 097 - Developers: What AI Skills Are Companies Looking?

    Nov 23, 20266 minAudio

    Companies are looking for developers who can combine strong software fundamentals with practical AI skills. This episode looks at AI-assisted development, model APIs, RAG, agents, evaluation, debugging, and system...

    Credit the people on this episode

  4. 096 - Structured Outputs — How to Make AI Return Valid JSON

    Nov 22, 20265 minAudio

    Structured outputs help AI models return data that software can reliably read. This episode explains JSON, JSON Schema, and the difference between JSON mode and schema-constrained responses. It also compares how OpenAI,...

    Credit the people on this episode

  5. 095 - Function Calling: How AI Uses Tools

    Nov 22, 20265 minAudio

    Function calling lets AI models work with external tools, APIs, and business systems. This episode explains the tool-calling loop, how applications define and execute functions, and how OpenAI, Claude, Gemini, and...

    Credit the people on this episode