TL;DR
Combining block diffusion language models (BDLMs) with Mamba state-space mixers has historically been blocked by Mamba's bidirectional scanning requirements, which ruin prefix caching. This paper introduces BDLM Mamba-H, a hybrid model that restricts the reverse Mamba scan to the active denoising block, enabling exact prefix caching across blocks. This architecture achieves state-of-the-art perplexity at the 87M scale and delivers up to a 19.7x inference throughput speedup over full-sequence diffusion baselines at long contexts.
What Problem Does This Paper Address?
Serving large language models for long-context generation is notoriously bottlenecked by memory bandwidth rather than compute. In standard autoregressive decoding, every generated token requires streaming a massive Key/Value (KV) cache from memory, meaning bandwidth demand scales poorly with context length.
To alleviate this pressure, two parallel paradigms have emerged:
- Linear-time sequence mixers like Mamba, which replace heavy attention mechanisms with recurrent state-space scans.
- Block Diffusion Language Models (BDLMs), which generate chunks of tokens in parallel via iterative denoising, processing text from left to right in blocks.
However, combining Mamba with block diffusion introduces a major technical hurdle. Existing diffusion models with Mamba backbones (like DiffuMamba) rely on fully bidirectional scans. Because the reverse-direction scan looks at the entire sequence, the hidden states are no longer strictly dependent on just the prefix. This completely breaks the ability to cache prefix blocks and reuse them across denoising steps, defeating the core efficiency benefit of block diffusion.
Methods
The authors propose BDLM Mamba-H, a native Mamba-attention hybrid that achieves exact block-level caching by introducing partial bidirectionality. Instead of running the reverse Mamba scan over the entire sequence, they restrict it strictly to the active denoising block.
For completed prefix blocks, the model runs a forward-only Mamba scan to construct stable, reusable boundary states. These states act as a prefix cache alongside standard attention KV caches.
Additionally, standard diffusion models inject timestep information at every layer via adaptive layer normalization (AdaLN), which would normally make the prefix cache depend on the specific diffusion step. To prevent this, the authors factor the layers into a timestep-free prefix operator and a timestep-conditioned active-block continuation. This ensures the prefix cache remains invariant across reverse diffusion steps.
Datasets
- Training: The models were trained on tokens sampled from the DCLM (DataComp-LM) baseline dataset (5 billion tokens for the 87M sweep, 17.65 billion tokens for the 350M scale-up).
- Validation & Evaluation: Language modeling quality was evaluated using Negative Evidence Lower Bound (NELBO) perplexity on C4-en and Paloma-C4. Downstream zero-shot performance was evaluated using a Multiple Choice Question Answering (MCQA) suite consisting of HellaSwag, PIQA, ARC-Easy, ARC-Challenge, BoolQ, and WinoGrande.
Key Insights and Ideas
- Localizing Bidirectionality Saves Caching: Full-sequence bidirectionality isn't strictly necessary throughout the entire diffusion model to maintain high generation quality. Restricting the reverse scan to the active block preserves the context-mixing benefits of diffusion while unlocking $O(1)$ prefix reuse.
- Timestep Isolation is Crucial for BDLMs: If prefix tokens absorb timestep embeddings, the cache must be recomputed at every single denoising step. Isolating the timestep modulation to the active block keeps the prefix cache truly static and reusable across the entire denoising trajectory.
- Mamba Scaling Outpaces Attention at Extreme Contexts: While attention-based BDLMs are highly efficient for shorter sequences, the hybrid Mamba architecture scales dramatically better as context lengths reach hundreds of thousands of tokens, bypassing the quadratic memory growth of pure attention.
Key Results
- Superior Perplexity at 87M: In an 87M parameter sweep on DCLM, BDLM Mamba-H achieved a C4-en validation perplexity of 61.59, significantly outperforming BDLM attention (76.46) and full-sequence attention (87.64).
- Massive Long-Context Speedups: At 350M parameters, BDLM Mamba-H remains competitive in quality with BDLM attention while unlocking massive throughput gains during inference. At a 65K token context, BDLM Mamba-H achieves 19.7x the inference throughput of full-sequence DiffuMamba-H. At an extreme context of 262K tokens, it achieves 3.7x the throughput of BDLM attention.
Limitations and Future Work
- Training Throughput Overhead: Evaluating the all-block BDLM objective adds training complexity. At 350M parameters, BDLM Mamba-H trains 25.5% slower (in tokens/sec) than its full-sequence counterpart due to the overhead of evaluating block boundaries in parallel.
- Hyperparameter Scaling Laws: While the authors successfully used a Complete(d)P-style learning rate transfer rule to scale from 87M to 350M parameters, exact optimal scaling laws for hybrid discrete diffusion language models remain an open area of research.
Summary updated