mlsanityData to 7 Oct 2026

DreamOn: Diffusion Language Models For Code Infilling Beyond Fixed-size Canvas

arXiv 2602.01326 ↗First posted 1 Feb 2026cs.CLcited by 16

On the map: Diffusion models → Discrete and text diffusion

Abstract (arXiv)

Diffusion Language Models (DLMs) present a compelling alternative to autoregressive models, offering flexible, any-order infilling without specialized prompting design. However, their practical utility is blocked by a critical limitation: the requirement of a fixed-length masked sequence for generation. This constraint severely degrades code infilling performance when the predefined mask size mismatches the ideal completion length. To address this, we propose DreamOn, a novel diffusion framework that enables dynamic, variable-length generation. DreamOn augments the diffusion process with two length control states, allowing the model to autonomously expand or contract the output length based solely on its own predictions. We integrate this mechanism into existing DLMs with minimal modifications to the training objective and no architectural changes. Built upon Dream-Coder-7B and DiffuCoder-7B, DreamOn achieves infilling performance on par with state-of-the-art autoregressive models on HumanEval-Infilling and SantaCoder-FIM and matches oracle performance achieved with ground-truth length. Our work removes a fundamental barrier to the practical deployment of DLMs, significantly advancing their flexibility and applicability for variable-length generation. Our code is available at https://github.com/DreamLM/DreamOn.

Key facts. Cited by 16 papers in the map (data through 7 Oct 2026). Placed in Discrete and text diffusion, one of 14 directions in Diffusion models. Builds on 54 of its 63 references that are in the map. First posted on arXiv 1 Feb 2026.

Builds on

54 of 63 references.

Closest ancestors · 15

Same direction, newest first

  1. 2025Dream-Coder 7B: An Open Diffusion Language Model for Code1 Sep
  2. 2025Any-Order Flexible Length Masked Diffusion31 Aug
  3. 2025Dream 7B: Diffusion Large Language Models21 Aug
  4. 2025DiffuCoder: Understanding and Improving Masked Diffusion Models for Code Generation25 Jun
  5. 2025Flexible-length Text Infilling for Discrete Diffusion Models16 Jun
  6. 2025Large Language Diffusion Models14 Feb
  7. 2024Scaling Diffusion Language Models via Adaptation from Autoregressive Models23 Oct
  8. 2024Simple and Effective Masked Diffusion Language Models11 Jun
  9. 2024Simplified and Generalized Masked Diffusion for Discrete Data6 Jun
  10. 2024Your Absorbing Discrete Diffusion Secretly Models the Conditional Distributions of Clean Data6 Jun
  11. 2023CodeFusion: A Pre-trained Diffusion Model for Code Generation26 Oct
  12. 2023Discrete Diffusion Modeling by Estimating the Ratios of the Data Distribution25 Oct
3 more
  1. 2023Likelihood-Based Diffusion Language Models30 May
  2. 2023A Reparameterized Discrete Diffusion Model for Text Generation11 Feb
  3. 2021Beyond In-Place Corruption: Insertion and Deletion In Denoising Probabilistic Models16 Jul

Other references · 39

  1. 2019Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformercited by 14,491
  2. 2025Gemini 2.5: Pushing the Frontier with Advanced Reasoning, Multimodality, Long Context, and Next Generation Agentic Capabilitiescited by 3,655
  3. 2023Qwen Technical Reportcited by 3,273
  4. 2019XLNet: Generalized Autoregressive Pretraining for Language Understandingcited by 2,801
  5. 2023Code Llama: Open Foundation Models for Codecited by 2,105
  6. 2021Structured Denoising Diffusion Models in Discrete State-Spacescited by 1,665
  7. 2023PaLM 2 Technical Reportcited by 1,154
  8. 2024DeepSeek-Coder: When the Large Language Model Meets Programming -- The Rise of Code Intelligencecited by 1,154
  9. 2024Qwen2.5-Coder Technical Reportcited by 1,151
  10. 2021Variational Diffusion Modelscited by 1,145
  11. 2023StarCoder: may the source be with you!cited by 790
  12. 2021Argmax Flows and Multinomial Diffusion: Learning Categorical Distributionscited by 566
27 more
  1. 2022InCoder: A Generative Model for Code Infilling and Synthesiscited by 492
  2. 2024StarCoder 2 and The Stack v2: The Next Generationcited by 484
  3. 2017Non-Autoregressive Neural Machine Translationcited by 457
  4. 2022A Continuous Time Framework for Discrete Denoising Modelscited by 437
  5. 2016A Corpus and Evaluation Framework for Deeper Understanding of Commonsense Storiescited by 413
  6. 2022UL2: Unifying Language Learning Paradigmscited by 292
  7. 2022Efficient Training of Language Models to Fill in the Middlecited by 248
  8. 2025Mercury: Ultra-Fast Language Models Based on Diffusioncited by 225
  9. 2019Levenshtein Transformercited by 197
  10. 2018Deterministic Non-Autoregressive Neural Sequence Modeling by Iterative Refinementcited by 194
  11. 2023SantaCoder: don't reach for the stars!cited by 169
  12. 2024CodeGemma: Open Code Models Based on Gemmacited by 145
  13. 2024OpenCoder: The Open Cookbook for Top-Tier Code Large Language Modelscited by 127
  14. 2023CodeGen2: Lessons for Training LLMs on Programming and Natural Languagescited by 124
  15. 2019Insertion Transformer: Flexible Sequence Generation via Insertion Operationscited by 123
  16. 2019Non-Monotonic Sequential Text Generationcited by 55
  17. 2022Transcending Scaling Laws with 0.1% Extra Computecited by 55
  18. 2025Edit Flows: Flow Matching with Edit Operationscited by 53
  19. 2025Seed-Coder: Let the Code Model Curate Data for Itselfcited by 46
  20. 2019Insertion-based Decoding with automatically Inferred Generation Ordercited by 43
  21. 2020Blank Language Modelscited by 43
  22. 2023Trans-Dimensional Generative Modeling via Jump Diffusion Modelscited by 33
  23. 2025Beyond Fixed: Training-Free Variable-Length Denoising for Diffusion Large Language Modelscited by 32
  24. 2023Meet in the Middle: A New Pre-training Paradigmcited by 22
  25. 2019KERMIT: Generative Insertion-Based Modeling for Sequencescited by 21
  26. 2023FiLM: Fill-in Language Models for Any-Order Generationcited by 13
  27. 2025Insertion Language Models: Sequence Generation with Arbitrary-Position Insertionscited by 11

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2026: 16.

16 papers.

Sort:

By area:

Similar, not cited

Close in wording, no citation either way

  1. 2025Unlocking the Potential of Diffusion Language Models through Template Infilling
  2. 2026Diffusion LMs Can Approximate Optimal Infilling Lengths Implicitly
  3. 2025Saber: An Efficient Sampling with Adaptive Acceleration and Backtracking Enhanced Remasking for Diffusion Language Model
  4. 2025On Powerful Ways to Generate: Autoregression, Diffusion, and Beyond
  5. 2025CoDA: Coding LM via Diffusion Adaptation
  6. 2026From Position Risks to Block Survival: Faster Generation for Diffusion Language Models
  7. 2026DiffBench Meets DiffAgent: End-to-End LLM-Driven Diffusion Acceleration Code Generation
  8. 2026Accelerating Masked Diffusion Large Language Models: A Survey of Efficient Inference Techniques