DreamOn: Diffusion Language Models For Code Infilling Beyond Fixed-size Canvas
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
- 2025Dream-Coder 7B: An Open Diffusion Language Model for Code1 Sep
- 2025Any-Order Flexible Length Masked Diffusion31 Aug
- 2025Dream 7B: Diffusion Large Language Models21 Aug
- 2025DiffuCoder: Understanding and Improving Masked Diffusion Models for Code Generation25 Jun
- 2025Flexible-length Text Infilling for Discrete Diffusion Models16 Jun
- 2025Large Language Diffusion Models14 Feb
- 2024Scaling Diffusion Language Models via Adaptation from Autoregressive Models23 Oct
- 2024Simple and Effective Masked Diffusion Language Models11 Jun
- 2024Simplified and Generalized Masked Diffusion for Discrete Data6 Jun
- 2024Your Absorbing Discrete Diffusion Secretly Models the Conditional Distributions of Clean Data6 Jun
- 2023CodeFusion: A Pre-trained Diffusion Model for Code Generation26 Oct
- 2023Discrete Diffusion Modeling by Estimating the Ratios of the Data Distribution25 Oct
3 more
Other references · 39
- 2019Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformercited by 14,491
- 2025Gemini 2.5: Pushing the Frontier with Advanced Reasoning, Multimodality, Long Context, and Next Generation Agentic Capabilitiescited by 3,655
- 2023Qwen Technical Reportcited by 3,273
- 2019XLNet: Generalized Autoregressive Pretraining for Language Understandingcited by 2,801
- 2023Code Llama: Open Foundation Models for Codecited by 2,105
- 2021Structured Denoising Diffusion Models in Discrete State-Spacescited by 1,665
- 2023PaLM 2 Technical Reportcited by 1,154
- 2024DeepSeek-Coder: When the Large Language Model Meets Programming -- The Rise of Code Intelligencecited by 1,154
- 2024Qwen2.5-Coder Technical Reportcited by 1,151
- 2021Variational Diffusion Modelscited by 1,145
- 2023StarCoder: may the source be with you!cited by 790
- 2021Argmax Flows and Multinomial Diffusion: Learning Categorical Distributionscited by 566
27 more
- 2022InCoder: A Generative Model for Code Infilling and Synthesiscited by 492
- 2024StarCoder 2 and The Stack v2: The Next Generationcited by 484
- 2017Non-Autoregressive Neural Machine Translationcited by 457
- 2022A Continuous Time Framework for Discrete Denoising Modelscited by 437
- 2016A Corpus and Evaluation Framework for Deeper Understanding of Commonsense Storiescited by 413
- 2022UL2: Unifying Language Learning Paradigmscited by 292
- 2022Efficient Training of Language Models to Fill in the Middlecited by 248
- 2025Mercury: Ultra-Fast Language Models Based on Diffusioncited by 225
- 2019Levenshtein Transformercited by 197
- 2018Deterministic Non-Autoregressive Neural Sequence Modeling by Iterative Refinementcited by 194
- 2023SantaCoder: don't reach for the stars!cited by 169
- 2024CodeGemma: Open Code Models Based on Gemmacited by 145
- 2024OpenCoder: The Open Cookbook for Top-Tier Code Large Language Modelscited by 127
- 2023CodeGen2: Lessons for Training LLMs on Programming and Natural Languagescited by 124
- 2019Insertion Transformer: Flexible Sequence Generation via Insertion Operationscited by 123
- 2019Non-Monotonic Sequential Text Generationcited by 55
- 2022Transcending Scaling Laws with 0.1% Extra Computecited by 55
- 2025Edit Flows: Flow Matching with Edit Operationscited by 53
- 2025Seed-Coder: Let the Code Model Curate Data for Itselfcited by 46
- 2019Insertion-based Decoding with automatically Inferred Generation Ordercited by 43
- 2020Blank Language Modelscited by 43
- 2023Trans-Dimensional Generative Modeling via Jump Diffusion Modelscited by 33
- 2025Beyond Fixed: Training-Free Variable-Length Denoising for Diffusion Large Language Modelscited by 32
- 2023Meet in the Middle: A New Pre-training Paradigmcited by 22
- 2019KERMIT: Generative Insertion-Based Modeling for Sequencescited by 21
- 2023FiLM: Fill-in Language Models for Any-Order Generationcited by 13
- 2025Insertion Language Models: Sequence Generation with Arbitrary-Position Insertionscited by 11
Built on by
Citing papers per year: 2026: 16.
16 papers.
Sort:
By area:
- 2026LLaDA-o: An Effective and Length-Adaptive Omni Diffusion Modelcited by 8
- 2026Improving Variable-Length Generation in Diffusion Language Models via Length Regularizationcited by 4
- 2026Search or Accelerate: Confidence-Switched Position Beam Search for Diffusion Language Modelscited by 3
- 2026Predict, Don't Iterate: Efficient Adaptive-Length Infilling for Diffusion Language Modelscited by 3
- 2026Locally Coherent Parallel Decoding in Diffusion Language Modelscited by 2
- 2026Towards A Generative Protein Evolution Machine with DPLM-Evocited by 2
- 2026FlexDraft: Flexible Speculative Decoding via Attention Tuning and Bonus-Guided Calibrationcited by 2
- 2026Variational Learning for Insertion-based Generationcited by 2
- 2026Distilled Continuous Diffusion Language Models Can Write Code in Few Steps---or Onecited by 2
- 2026Discrete Diffusion Language Models for Interactive Radiology Report Draftingcited by 1
- 2026Expanding Flow Mapscited by 1
- 2026Diffusion Large Language Models for Visual Speech Recognitioncited by 0
4 more
- 2026MaskForge: Structure-Aware Adaptive Attacks for Jailbreaking Diffusion Large Language Modelscited by 0
- 2026A Continuous-Time Markov Chain Framework for Insertion Language Modelscited by 0
- 2026How Should Diffusion Language Models Edit Code?cited by 0
- 2026Plan-and-Patch: Diffusion Language Models for Agentic Planningcited by 0
- 2026Plan-and-Patch: Diffusion Language Models for Agentic Planning7 Oct 2026
- 2026How Should Diffusion Language Models Edit Code?29 Sep 2026
- 2026Distilled Continuous Diffusion Language Models Can Write Code in Few Steps---or One3 Sep 2026
- 2026Predict, Don't Iterate: Efficient Adaptive-Length Infilling for Diffusion Language Models2 Sep 2026
- 2026Expanding Flow Maps23 Jul 2026
- 2026Discrete Diffusion Language Models for Interactive Radiology Report Drafting1 Jul 2026
- 2026A Continuous-Time Markov Chain Framework for Insertion Language Models8 Jun 2026
- 2026MaskForge: Structure-Aware Adaptive Attacks for Jailbreaking Diffusion Large Language Models1 Jun 2026
- 2026Variational Learning for Insertion-based Generation1 Jun 2026
- 2026Diffusion Large Language Models for Visual Speech Recognition27 May 2026
- 2026FlexDraft: Flexible Speculative Decoding via Attention Tuning and Bonus-Guided Calibration19 May 2026
- 2026Towards A Generative Protein Evolution Machine with DPLM-Evo30 Apr 2026
4 more
- 2026Locally Coherent Parallel Decoding in Diffusion Language Models3 Mar 2026
- 2026LLaDA-o: An Effective and Length-Adaptive Omni Diffusion Model1 Mar 2026
- 2026Search or Accelerate: Confidence-Switched Position Beam Search for Diffusion Language Models11 Feb 2026
- 2026Improving Variable-Length Generation in Diffusion Language Models via Length Regularization7 Feb 2026
- 2026LLaDA-o: An Effective and Length-Adaptive Omni Diffusion Modelcited by 8
- 2026Improving Variable-Length Generation in Diffusion Language Models via Length Regularizationcited by 4
- 2026Search or Accelerate: Confidence-Switched Position Beam Search for Diffusion Language Modelscited by 3
- 2026Predict, Don't Iterate: Efficient Adaptive-Length Infilling for Diffusion Language Modelscited by 3
- 2026Locally Coherent Parallel Decoding in Diffusion Language Modelscited by 2
- 2026Towards A Generative Protein Evolution Machine with DPLM-Evocited by 2
- 2026Variational Learning for Insertion-based Generationcited by 2
- 2026Distilled Continuous Diffusion Language Models Can Write Code in Few Steps---or Onecited by 2
- 2026Discrete Diffusion Language Models for Interactive Radiology Report Draftingcited by 1
- 2026A Continuous-Time Markov Chain Framework for Insertion Language Modelscited by 0
- 2026How Should Diffusion Language Models Edit Code?cited by 0
- 2026Plan-and-Patch: Diffusion Language Models for Agentic Planningcited by 0
- 2026Plan-and-Patch: Diffusion Language Models for Agentic Planning7 Oct 2026
- 2026How Should Diffusion Language Models Edit Code?29 Sep 2026
- 2026Distilled Continuous Diffusion Language Models Can Write Code in Few Steps---or One3 Sep 2026
- 2026Predict, Don't Iterate: Efficient Adaptive-Length Infilling for Diffusion Language Models2 Sep 2026
- 2026Discrete Diffusion Language Models for Interactive Radiology Report Drafting1 Jul 2026
- 2026A Continuous-Time Markov Chain Framework for Insertion Language Models8 Jun 2026
- 2026Variational Learning for Insertion-based Generation1 Jun 2026
- 2026Towards A Generative Protein Evolution Machine with DPLM-Evo30 Apr 2026
- 2026Locally Coherent Parallel Decoding in Diffusion Language Models3 Mar 2026
- 2026LLaDA-o: An Effective and Length-Adaptive Omni Diffusion Model1 Mar 2026
- 2026Search or Accelerate: Confidence-Switched Position Beam Search for Diffusion Language Models11 Feb 2026
- 2026Improving Variable-Length Generation in Diffusion Language Models via Length Regularization7 Feb 2026
- 2026Expanding Flow Mapscited by 1
- 2026Diffusion Large Language Models for Visual Speech Recognitioncited by 0
- 2026Expanding Flow Maps23 Jul 2026
- 2026Diffusion Large Language Models for Visual Speech Recognition27 May 2026
Similar, not cited
Close in wording, no citation either way
- 2025Unlocking the Potential of Diffusion Language Models through Template Infilling
- 2026Diffusion LMs Can Approximate Optimal Infilling Lengths Implicitly
- 2025Saber: An Efficient Sampling with Adaptive Acceleration and Backtracking Enhanced Remasking for Diffusion Language Model
- 2025On Powerful Ways to Generate: Autoregression, Diffusion, and Beyond
- 2025CoDA: Coding LM via Diffusion Adaptation
- 2026From Position Risks to Block Survival: Faster Generation for Diffusion Language Models
- 2026DiffBench Meets DiffAgent: End-to-End LLM-Driven Diffusion Acceleration Code Generation
- 2026Accelerating Masked Diffusion Large Language Models: A Survey of Efficient Inference Techniques