Introduction
Large Language Models (LLMs) have revolutionized natural language processing, yet their deployment remains constrained by the inherent latency of autoregressive decoding. In standard Next Token Prediction (NTP), generating a sequence requires a full forward pass for every token. Because these models are massive, inference is typically memory-bound: the time spent transferring weights from memory to the processor far exceeds the actual computation time.
To address this, researchers at FAIR (Meta) introduced Set Block Decoding (SBD). SBD is a novel inference acceleration method that allows models to predict multiple future tokens in parallel without requiring auxiliary "draft" models or fundamental architectural changes. By fine-tuning existing models to predict a "set" of future tokens, SBD achieves a 3x to 5x speedup in generation.
Methodology
The core innovation of SBD lies in treating a block of future tokens as a set that can be predicted simultaneously. This is achieved through three primary components:
1. Hybrid Architecture and Attention
SBD integrates standard NTP with Masked Token Prediction (MATP) within a single Transformer. During training and inference, the model employs standard causal attention for past tokens. However, for the "future block" of tokens being predicted, it utilizes bidirectional attention. This allows the tokens within the future block to interact with one another, ensuring that the parallel predictions are contextually consistent.
2. The Entropy Bounded (EB) Sampler
Rather than predicting a fixed-length sequence, SBD uses an Entropy Bounded (EB) Sampler to determine which tokens to accept. The model evaluates the uncertainty (entropy) of the masked tokens in the future block. If the model exhibits high confidence in multiple tokens—even if they are non-consecutive—it accepts them all in a single forward pass. This flexibility avoids the "brittleness" of traditional speculative decoding, where a single incorrect guess in a sequence can invalidate the entire block.
3. Fine-tuning with Joint Loss
SBD is implemented by fine-tuning pre-trained NTP models (such as Llama-3.1 8B and Qwen-3 8B). The training process uses a joint loss function that combines standard NTP loss with MATP loss. Ablation studies indicate that maintaining the NTP loss is critical; without it, the model's general reasoning capabilities tend to degrade.
Experimental Results
The researchers evaluated SBD using Llama-3.1 8B and Qwen-3 8B models fine-tuned on a 70-billion token dataset comprising reasoning, math, and instruction-following data.
Speedup and Accuracy
SBD demonstrated significant efficiency gains across various benchmarks, including LiveCodeBench and GSM8K. As shown in the performance analysis, SBD-tuned models achieved speedups ranging from 3.6x to 4.7x compared to their standard NTP counterparts. Crucially, this acceleration was achieved with zero loss in performance; in several cases, the SBD models slightly outperformed the original NTP models in accuracy (Pass@1).
Hardware Efficiency
Using "Roofline Analysis" on NVIDIA H100 GPUs, the authors confirmed that the reduction in the number of forward passes (NFEs) translates directly into wall-clock speedups. Because LLM decoding is memory-bound, computing a block of tokens (e.g., 16 tokens) requires nearly the same amount of time as computing a single token, provided the computation fits within the GPU's arithmetic intensity limits.
Conclusion and Future Work
Set Block Decoding provides a "drop-in" optimization for LLM deployment, offering substantial speedups without the complexity of managing multiple models. While currently validated on 8B parameter models, future work will focus on scaling SBD to frontier models (70B+) and developing hardware-aware kernels to further optimize the bidirectional attention masks used during inference.
Summary updated