{"id": "http://arxiv.org/abs/2607.02805v1", "title": "Training Hybrid Block Diffusion Language Models with Partial Bidirectionality", "abstract": "High-throughput long-context generation is one of the central challenges for large language models. Generation is typically memory-bandwidth-bound rather than compute-bound: each decoding step must stream the accumulated key/value (KV) cache from memory, so bandwidth demand grows with context length while only one token is emitted. Two parallel approaches have therefore emerged: reducing memory access with efficient attention variants and linear-time mixers such as Mamba, or increasing parallel computation by generating blocks of tokens at once. However, technical challenges arise when combining these two ideas. Earlier hybrid diffusion models such as DiffuMamba use bidirectional Mamba mixing, including a reverse-direction scan relative to causal generation. This reverse scan needs to scan the entire sequence, so its states are not prefix-only and cannot be precisely reused as a cache even when diffusion is performed block by block. We propose a BDLM Mamba--attention hybrid that addresses this challenge by restricting the reverse Mamba scan to the active denoising block, which enables exact caching across blocks. In an 87M-parameter DCLM sweep, BDLM Mamba-H achieves the best C4-en validation perplexity compared to BDLM attention and full-sequence baselines. At 350M parameters, it remains competitive with BDLM attention. For long-context inference, BDLM Mamba-H reaches 19.7x the throughput of full-sequence DiffuMamba-H at 65K tokens and 3.7x the throughput of BDLM attention at 262K, showing that Mamba hybrids are a potential long-context diffusion architecture.", "published_at": "2026-07-02T22:37:43+00:00", "source_updated_at": null, "source_url": "https://arxiv.org/abs/2607.02805v1", "source_hash": "a1cbbd005a41d97e3e1d8a12bce6d381e9a68425ffa52d9b1cb4d35b8ed0cdad", "source_version": "v1", "full_text_available": true, "evidence_kind": "full_text_excerpt", "analysis_scope": "full_text_excerpt", "scope": "core", "topics": ["inference-acceleration", "long-context"], "code_url": "https://github.com/MoonshotAI/Kimi-Linear", "has_code": true, "indexable": true, "authors": [], "related_ids": ["http://arxiv.org/abs/2609.11998v1", "http://arxiv.org/abs/2609.04531v1", "http://arxiv.org/abs/2609.04010v1"], "related_work": {"version": "related-work-v1", "status": "not_assessed", "reason": "missing_context", "items": []}, "review": null, "explanations": {}, "full_article_summary": {"format": "research_guide_v14", "analysis_scope": "full_article_map_reduce", "source_hash": "a1cbbd005a41d97e3e1d8a12bce6d381e9a68425ffa52d9b1cb4d35b8ed0cdad", "source_url": "https://arxiv.org/abs/2607.02805v1", "source_version": "v1", "revision_id": "bfc45342ae03ee71ae7bd3d0a1290bcc073887eb14bd85ae8fc86ca295717eb9", "canonical_text_hash": "1b45565038c4f4893d518868bb22d7873834a0b000d1b437d8413a4acff207ed", "prompt_version": "full-article-research-guide-v14", "sections": {"verdict": {"ru": "BDLM Mamba-H — убедительный гибридный метод для длинного контекста: он сохраняет качество, улучшает обработку очень длинных последовательностей и делает кэширование префикса точным для блочной диффузии. Однако преимущество по качеству зависит от масштаба и не является универсальным: при 350M BDLM attention имеет лучшую C4-en perplexity.", "en": "BDLM Mamba-H is a convincing hybrid method for long-context generation: it preserves quality, improves very-long-sequence efficiency, and makes prefix caching exact for block diffusion. However, its quality advantage is scale-dependent rather than universal: at 350M, BDLM attention has better C4-en perplexity."}, "main_idea": {"ru": "Метод разделяет вычисление чистого префикса и денойзинг активного блока. Состояния префикса вычисляются без зависимости от шага диффузии и переиспользуются, а обратное смешивание Mamba ограничивается текущим блоком.", "en": "The method separates clean-prefix computation from active-block denoising. Prefix states are computed independently of the diffusion timestep and reused, while reverse Mamba mixing is confined to the current block."}, "claims": {"ru": "По данным авторов, при 87M параметров BDLM Mamba-H достигает 61,6 C4-en validation perplexity против 76,5 у BDLM attention и 83,7/87,6 у полноsequence-моделей. При 350M он показывает 38,2 perplexity и 43,3 MCQA против 37,0 и 41,3 у BDLM attention. В длинном контексте он обгоняет BDLM attention примерно после 16K генерируемых токенов и достигает 3,7× ускорения при 262K токенах.", "en": "According to the authors, at 87M parameters BDLM Mamba-H reaches 61.6 C4-en validation perplexity versus 76.5 for BDLM attention and 83.7/87.6 for full-sequence models. At 350M, it achieves 38.2 perplexity and 43.3 MCQA versus 37.0 and 41.3 for BDLM attention. For long-context inference, it overtakes BDLM attention at roughly 16K generated tokens and reaches a reported 3.7× speedup at 262K tokens."}, "mechanism": {"ru": "Состояния: кэш чистого префикса содержит KV attention, рекуррентные состояния Mamba или другие layer-specific summaries; активный блок остается timestep-conditioned. Архитектура: выбранные слои используют attention, промежуточные — Mamba-2. Для каждого блока модель один раз сканирует чистый префикс, сохраняет forward Mamba boundary states и attention KV, затем денойзит активный блок через forward continuation и reverse scan, ограниченный этим блоком. AdaLN shifts/scales/gates применяются только к активному продолжению, поэтому кэш не зависит от diffusion timestep. Обучение: all-block objective строит inference-matching prefix cache на каждой границе и распространяет downstream denoising losses через сканирование, создающее кэш. Основные условия: 5B DCLM tokens, sequences 8192, blocks 256, 16 diffusion steps, diffusion-NELBO validation. Инференс: chunked prefix prefill, read-only recurrent caches, compiled fixed-shape continuations и graph-captured denoising steps. Воспроизведение: 1) собрать гибридные attention/Mamba-2 слои; 2) реализовать timestep-free prefix scan; 3) ограничить reverse scan активным блоком; 4) обучать все границы блоков с градиентом через cache construction; 5) применить fixed-shape compilation и CUDA graphs; 6) сравнить throughput и качество на указанных масштабах. Не указаны точные параметры размещения attention-слоев и полный набор гиперпараметров.", "en": "State variables: the clean-prefix cache contains attention KV, Mamba recurrent states, or other layer-specific summaries; the active block remains timestep-conditioned. Architecture: selected layers use attention and intervening layers use Mamba-2. For each block, the model scans the clean prefix once, stores forward Mamba boundary states and attention KV, then denoises the active block using forward continuation plus a reverse scan restricted to that block. AdaLN shifts, scales, and gates are applied only to the active continuation, so the cache is independent of diffusion timestep. Training: the all-block objective builds an inference-matching prefix cache at every block boundary and backpropagates downstream denoising losses through the scan that produces the cache. Main conditions: 5B DCLM tokens, 8192-token sequences, 256-token blocks, 16 diffusion steps, and diffusion-NELBO validation. Inference uses chunked prefix prefill, read-only recurrent caches, compiled fixed-shape continuations, and graph-captured denoising steps. Reproduction: 1) assemble the hybrid attention/Mamba-2 layers; 2) implement the timestep-free prefix scan; 3) restrict the reverse scan to the active block; 4) train all block boundaries with gradients through cache construction; 5) apply fixed-shape compilation and CUDA graphs; 6) compare quality and throughput at the reported scales. Exact attention-layer placement and the full hyperparameter set are not provided."}, "evidence": {"ru": "Наблюдаемые результаты включают C4-en perplexity, MCQA, скорость обучения и throughput инференса. При 87M Mamba-H имеет лучшую указанную perplexity; при 350M он уступает BDLM attention по C4-en, но превосходит его по MCQA. На 8 A100 его обучение составляет 166 849 tokens/s против 151 976 у BDLM attention и 229 957 у полноsequence attention. Заявленное ускорение относится к указанным фиксированным конфигурациям и инженерным оптимизациям; превосходство по качеству над всеми baseline не установлено.", "en": "Observed results include C4-en perplexity, MCQA, training speed, and inference throughput. At 87M, Mamba-H has the best reported perplexity; at 350M, it trails BDLM attention on C4-en but exceeds it on MCQA. On 8 A100 GPUs, its training speed is 166,849 tokens/s versus 151,976 for BDLM attention and 229,957 for full-sequence attention. The reported speedup applies to the stated fixed configurations and engineering optimizations; superiority in quality over all baselines is not established."}, "applicability": {"ru": "Метод особенно полезен для блочных диффузионных языковых моделей с длинным префиксом и многими последовательными шагами денойзинга, где повторное вычисление префикса становится доминирующей стоимостью. Он подходит для систем с поддержкой Mamba-ядер, chunked prefill, компиляции фиксированных форм и CUDA graph capture.", "en": "The method is especially useful for block diffusion language models with long prefixes and many sequential denoising steps, where recomputing the prefix becomes a dominant cost. It fits systems supporting Mamba kernels, chunked prefill, fixed-shape compilation, and CUDA graph capture."}, "limitations": {"ru": "All-block objective повышает стоимость обучения: при 350M BDLM Mamba-H обучается медленнее полноsequence DiffuMamba-H и не достигает скорости полноsequence attention. Качество не доминирует по всем метрикам и масштабам. Достижение throughput зависит от специализированных kernel- и graph-оптимизаций. Не приведены точные сведения о размещении attention-слоев и полном наборе гиперпараметров, поэтому воспроизведение может быть неполным.", "en": "The all-block objective increases training cost: at 350M, BDLM Mamba-H trains more slowly than full-sequence DiffuMamba-H and does not match full-sequence attention speed. Quality does not dominate across all metrics and scales. Throughput depends on specialized kernel and graph optimizations. Exact attention-layer placement and the full hyperparameter set are not given, so reproduction may be incomplete."}, "next_action": {"ru": "Провести контролируемую репликацию на 350M: 1) реализовать timestep-free prefix cache и active-block reverse scan; 2) обучить с all-block objective на одинаковых данных и бюджете с BDLM attention; 3) измерить C4-en, MCQA и tokens/s на 32K–262K; 4) отдельно сравнить с отключенными CUDA graphs и chunked prefill, чтобы отделить алгоритмический выигрыш от инженерного.", "en": "Run a controlled 350M replication: 1) implement the timestep-free prefix cache and active-block reverse scan; 2) train with the all-block objective on the same data and budget as BDLM attention; 3) measure C4-en, MCQA, and tokens/s from 32K to 262K; 4) separately disable CUDA graphs and chunked prefill to distinguish algorithmic gains from engineering effects."}}, "source_coverage": {"canonical_text_hash": "1b45565038c4f4893d518868bb22d7873834a0b000d1b437d8413a4acff207ed", "covered_chunks": 5, "map_input_digest": "c376c0c119fb11e3d0e3269d9c0523954ba59de26bcab3440e236cc9678cab4d", "prompt_version": "full-article-research-guide-v14", "revision_id": "bfc45342ae03ee71ae7bd3d0a1290bcc073887eb14bd85ae8fc86ca295717eb9", "total_chunks": 5}}, "resources": {"version": "paper-resources-v1", "source_hash": "a1cbbd005a41d97e3e1d8a12bce6d381e9a68425ffa52d9b1cb4d35b8ed0cdad", "evidence_kind": "full_text_excerpt", "availability": "not_checked", "limited": true, "items": [{"origin": "source_excerpt", "evidence": "Zheng, Feng Wang, Yibo Liu, Mengnan Dong, Zheng\nZhang, Siyuan Pan, Wenhao Wu, Yuhao Wu, Longyu Guan, Jiawen Tao, Guohong Fu,\nXinran Xu, Yuzhi Wang, Guokun Lai, Yuxin Wu, Xinyu Zhou, Zhilin Yang, and Yulun Du.\nKimi linear: An expressive, efficient attention architecture. Technical report, 2025. URL\nhttps://github.com/MoonshotAI/Kimi-Linear.\n\nAonian Li et al. Minimax-01: Scaling foundation models with lightning attention. Technical\nreport, 2025. URL https://github.com/MiniMax-AI/MiniMax-01.\n\nJeffrey Li, Alex Fang, Georgios Smyrnis, Maor Ivgi, Matt Jordan, Samir Yitzhak Gadre,\nHritik Bansal, Etash Guha, Sedrick Keh, Kushal Arora, Saura", "url": "https://github.com/MoonshotAI/Kimi-Linear", "kind": "code", "span": [32996, 33636], "evidence_hash": "6860fc9d716cfa081f888280108084b4b3850004d14279dbe07fcbd1934e204b"}, {"origin": "source_excerpt", "evidence": "un Lai, Yuxin Wu, Xinyu Zhou, Zhilin Yang, and Yulun Du.\nKimi linear: An expressive, efficient attention architecture. Technical report, 2025. URL\nhttps://github.com/MoonshotAI/Kimi-Linear.\n\nAonian Li et al. Minimax-01: Scaling foundation models with lightning attention. Technical\nreport, 2025. URL https://github.com/MiniMax-AI/MiniMax-01.\n\nJeffrey Li, Alex Fang, Georgios Smyrnis, Maor Ivgi, Matt Jordan, Samir Yitzhak Gadre,\nHritik Bansal, Etash Guha, Sedrick Keh, Kushal Arora, Saurabh Garg, Rui Xin, Niklas\nMuennighoff, Reinhard Heckel, Jean Mercat, Mayee Chen, Suchin Gururangan, Mitchell\nWortsman, Alon Albalak, Yonatan Bitton, Mari", "url": "https://github.com/MiniMax-AI/MiniMax-01", "kind": "code", "span": [33148, 33788], "evidence_hash": "c5d196df0c62b0316f1af8244950a2b51229a9dc1d41a08af50aa92edd3cb759"}]}, "slug": "2607.02805-training-hybrid-block-diffusion-language-models-with-partial-bidirectionality"}