Diffusion-based language models (DLLMs) offer non-sequential, block-wise generation and richer data reuse compared to autoregressive (AR) models, but existing code DLLMs still lag behind strong AR baselines under comparable budgets. We revisit this setting in a controlled study and introduce Stable-DiffCoder, a block diffusion code model that reuses the Seed-Coder architecture, data, and training pipeline. To enable efficient knowledge learning and stable training, we incorporate a block diffusion continual pretraining (CPT) stage enhanced by a tailored warmup and block-wise clipped noise schedule. Under the same data and architecture, Stable-DiffCoder overall outperforms its AR counterpart on a broad suite of code benchmarks. Moreover, relying only on the CPT and supervised fine-tuning stages, Stable-DiffCoder achieves stronger performance than a wide range of \~8B ARs and DLLMs, demonstrating that diffusion-based training can improve code modeling quality beyond AR training alone. Moreover, diffusion-based any-order modeling improves structured code modeling for editing and reasoning, and through data augmentation, benefits low-resource coding languages.


翻译:基于扩散的语言模型(DLLMs)相较于自回归(AR)模型,提供了非顺序的块级生成和更丰富的数据复用能力,但在可比预算下,现有的代码DLLMs仍落后于强大的AR基线模型。我们通过一项受控研究重新审视了这一设定,并引入了Stable-DiffCoder,这是一个复用Seed-Coder架构、数据和训练流程的块扩散代码模型。为了实现高效的知识学习和稳定的训练,我们加入了一个块扩散持续预训练(CPT)阶段,该阶段通过定制的预热策略和块级裁剪噪声调度进行增强。在相同的数据和架构下,Stable-DiffCoder在一系列广泛的代码基准测试中整体上优于其对应的AR模型。此外,仅依靠CPT和监督微调阶段,Stable-DiffCoder就实现了比众多约8B参数的AR和DLLM模型更强的性能,这表明基于扩散的训练能够超越单纯的AR训练,提升代码建模质量。不仅如此,基于扩散的任意顺序建模改进了面向编辑和推理的结构化代码建模,并通过数据增强,使低资源编程语言受益。

0
下载
关闭预览

相关内容

代码(Code)是专知网的一个重要知识资料文档板块,旨在整理收录论文源代码、复现代码,经典工程代码等,便于用户查阅下载使用。
扩散语言模型综述
专知会员服务
18+阅读 · 2025年8月15日
大语言模型在序列推荐中的应用
专知会员服务
19+阅读 · 2024年11月12日
《大型语言模型代码生成》综述
专知会员服务
68+阅读 · 2024年6月4日
深度学习文本分类方法综述(代码)
中国人工智能学会
28+阅读 · 2018年6月16日
【干货】深入理解自编码器(附代码实现)
国家自然科学基金
0+阅读 · 2017年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
Arxiv
0+阅读 · 2月7日
VIP会员
相关基金
国家自然科学基金
0+阅读 · 2017年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员