Lune

ICLR2026Top-tier venue

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

Zirui Wu, Lin Zheng, Zhihui Xie, Jiacheng Ye, Jiahui Gao, Shansan Gong, Yansong Feng, Zhenguo Li, Wei Bi, Guorui Zhou, Lingpeng Kong

Abstract

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.

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

9 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • Scaling Behavior of Discrete Diffusion Language Models cites Structured Denoising Diffusion Models in Discrete State-Spaces
  • Scaling Behavior of Discrete Diffusion Language Models cites Large Language Diffusion Models
  • Scaling Behavior of Discrete Diffusion Language Models cites Simplified and Generalized Masked Diffusion for Discrete Data
  • Scaling Behavior of Discrete Diffusion Language Models cites Simple and Effective Masked Diffusion Language Models
  • Large Language Diffusion Models cites Structured Denoising Diffusion Models in Discrete State-Spaces
  • Large Language Diffusion Models cites Simplified and Generalized Masked Diffusion for Discrete Data
  • Large Language Diffusion Models cites Argmax Flows and Multinomial Diffusion: Learning Categorical Distributions
  • Large Language Diffusion Models cites Simple and Effective Masked Diffusion Language Models
  • Any-Order Flexible Length Masked Diffusion cites Structured Denoising Diffusion Models in Discrete State-Spaces
  • Any-Order Flexible Length Masked Diffusion cites Large Language Diffusion Models
  • Any-Order Flexible Length Masked Diffusion cites Simplified and Generalized Masked Diffusion for Discrete Data
  • Any-Order Flexible Length Masked Diffusion cites Argmax Flows and Multinomial Diffusion: Learning Categorical Distributions
  • Any-Order Flexible Length Masked Diffusion cites Simple and Effective Masked Diffusion Language Models
  • Constrained Decoding of Diffusion LLMs with Context-Free Grammars cites Large Language Diffusion Models
  • Watermarking Diffusion Language Models cites Structured Denoising Diffusion Models in Discrete State-Spaces
  • Watermarking Diffusion Language Models cites Large Language Diffusion Models
  • Watermarking Diffusion Language Models cites Simplified and Generalized Masked Diffusion for Discrete Data
  • Watermarking Diffusion Language Models cites Simple and Effective Masked Diffusion Language Models
  • Simplified and Generalized Masked Diffusion for Discrete Data cites Structured Denoising Diffusion Models in Discrete State-Spaces
  • Simplified and Generalized Masked Diffusion for Discrete Data cites Argmax Flows and Multinomial Diffusion: Learning Categorical Distributions
  • Simplified and Generalized Masked Diffusion for Discrete Data cites Simple and Effective Masked Diffusion Language Models
  • Simple and Effective Masked Diffusion Language Models cites Simplified and Generalized Masked Diffusion for Discrete Data
  • Rainbow Padding: Mitigating Early Termination in Instruction-Tuned Diffusion LLMs cites Structured Denoising Diffusion Models in Discrete State-Spaces
  • Rainbow Padding: Mitigating Early Termination in Instruction-Tuned Diffusion LLMs cites Large Language Diffusion Models
  • Rainbow Padding: Mitigating Early Termination in Instruction-Tuned Diffusion LLMs cites Any-Order Flexible Length Masked Diffusion
  • Rainbow Padding: Mitigating Early Termination in Instruction-Tuned Diffusion LLMs cites Simplified and Generalized Masked Diffusion for Discrete Data
  • Rainbow Padding: Mitigating Early Termination in Instruction-Tuned Diffusion LLMs cites Simple and Effective Masked Diffusion Language Models
  • Simple and Effective Masked Diffusion Language Models cites Structured Denoising Diffusion Models in Discrete State-Spaces
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers9

  1. Any-Order Flexible Length Masked DiffusionJaeyeon Kim, Cheuk Lee Kit, Carles Domingo-Enrich, Yilun Du et al.ICLR 2026 · 51 citations
  2. Scaling Behavior of Discrete Diffusion Language ModelsDimitri von Rütte, Janis Fluri, Omead Pooladzandi, Bernhard Schölkopf et al.ICLR 2026 · 34 citations
  3. Constrained Decoding of Diffusion LLMs with Context-Free GrammarsNiels Mündler, Jasper Dekoninck, Martin VechevICLR 2026 · 18 citations
  4. Watermarking Diffusion Language ModelsThibaud Gloaguen, Robin Staab, Nikola Jovanović, Martin VechevICLR 2026 · 13 citations
  5. Rainbow Padding: Mitigating Early Termination in Instruction-Tuned Diffusion LLMsBumjun Kim, Dongjae Jeon, Dueun Kim, Wonje Jeung et al.ICLR 2026 · 11 citations

Builds on20

  1. Structured Denoising Diffusion Models in Discrete State-SpacesJacob Austin, Daniel D. Johnson, Jonathan Ho, Daniel Tarlow et al.NeurIPS 2021 · 2,256 citations
  2. Large Language Diffusion ModelsShen Nie, Fengqi Zhu, Zebin You, Xiaolu Zhang et al.NeurIPS 2025 · 949 citations
  3. Simple and Effective Masked Diffusion Language ModelsSubham S. Sahoo, Marianne Arriola, Yair Schiff, Aaron Gokaslan et al.NeurIPS 2024 · 929 citations
  4. Argmax Flows and Multinomial Diffusion: Learning Categorical DistributionsEmiel Hoogeboom, Didrik Nielsen, Priyank Jaini, Patrick Forré et al.NeurIPS 2021 · 782 citations
  5. Simplified and Generalized Masked Diffusion for Discrete DataJiaxin Shi, Kehang Han, Zhe Wang, Arnaud Doucet et al.NeurIPS 2024 · 693 citations

Related papers

  1. Beyond Fixed: Training-Free Variable-Length Denoising for Diffusion Large Language ModelsJinsong Li, Xiaoyi Dong, Yuhang Zang, Yuhang Cao et al.ICLR 2026 · 34 citations
  2. WavefrontDiffusion: Dynamic Decoding Schedule for Improved ReasoningHaojin Yang, Rui Hu, Zequn Sun, Rui Zhou et al.ICLR 2026 · 5 citations
  3. Block Diffusion: Interpolating Between Autoregressive and Diffusion Language ModelsMarianne Arriola, Aaron Gokaslan, Justin T. Chiu, Zhihan Yang et al.ICLR 2025
  4. Diffusion with Truncated Blocks: Fast and High-Quality Text Generation using Truncated Block GenerationYuyan Zhou, Weiyu Chen, James T. KwokACL Findings 2026
  5. Soft-Masked Diffusion Language ModelsMichael Hersche, Samuel Moor-Smith, Thomas Hofmann, Abbas RahimiICLR 2026 · 15 citations
Dusk over the sea between two cliffs drawn in fine vertical lines