将自回归模型高效转为扩散语言模型,速度提升4.5倍且准确率更高。
Efficient-DLM: From Autoregressive to Diffusion Language Models, and Beyond in Speed
- 采用分块注意力机制,兼顾块间因果性与块内双向建模。
- 提出位置相关掩码策略,缓解训练与推理时的分布差异。
- 构建Efficient-DLM系列,在速度和精度上超越现有模型。
扩散语言模型(dLMs)作为并行非自回归生成的新范式,虽具速度快的优势,但从头训练效率远低于自回归(AR)模型。为此,本文研究了从AR模型到dLM的转换方法,旨在将预训练的AR模型转化为高效dLM,兼顾生成速度与任务准确率。通过分析现有方法在注意力模式与目标函数上的局限,提出了更有效的转换原则与方法。首先,系统比较不同注意力模式,发现保持预训练权重分布至关重要;据此提出一种带分块注意力的连续预训练方案,块间保持因果性,块内支持双向建模,既利于权重量化保留,又支持键值缓存,实现精度与效率双赢。其次,针对训练与推理中掩码令牌分布差异(均匀掩码 vs. 左向高概率),提出位置依赖的掩码策略,对后期令牌赋予更高掩码概率,更贴近测试行为。基于该框架,深入研究了注意力模式、训练动态等设计选择,形成可扩展的AR-to-dLM转换体系。最终推出Efficient-DLM系列,其中80亿参数模型在准确率上比Dream 7B高5.4%、比Qwen3 4B高2.7%,吞吐量分别提升4.5倍和2.7倍。
原文摘要 · Abstract (English)
Diffusion language models (dLMs) have emerged as a promising paradigm that enables parallel, non-autoregressive generation, but their learning efficiency lags behind that of autoregressive (AR) language models when trained from scratch. To this end, we study AR-to-dLM conversion to transform pretrained AR models into efficient dLMs that excel in speed while preserving AR models' task accuracy. We achieve this by identifying limitations in the attention patterns and objectives of existing AR-to-dLM methods and then proposing principles and methodologies for more effective AR-to-dLM conversion. Specifically, we first systematically compare different attention patterns and find that maintaining pretrained AR weight distributions is critical for effective AR-to-dLM conversion. As such, we introduce a continuous pretraining scheme with a block-wise attention pattern, which remains causal across blocks while enabling bidirectional modeling within each block. We find that this approach can better preserve pretrained AR models' weight distributions than fully bidirectional modeling, in addition to its known benefit of enabling KV caching, and leads to a win-win in accuracy and efficiency. Second, to mitigate the training-test gap in mask token distributions (uniform vs. highly left-to-right), we propose a position-dependent token masking strategy that assigns higher masking probabilities to later tokens during training to better mimic test-time behavior. Leveraging this framework, we conduct extensive studies of dLMs' attention patterns, training dynamics, and other design choices, providing actionable insights into scalable AR-to-dLM conversion. These studies lead to the Efficient-DLM family, which outperforms state-of-the-art AR models and dLMs, e.g., our Efficient-DLM 8B achieves +5.4%/+2.7% higher accuracy with 4.5x/2.7x higher throughput compared to Dream 7B and Qwen3 4B, respectively.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。