Zarya: A Hybrid Autoregressive--Masked Diffusion Language Model with Flexible Training and Dual-Mode Inference

📄 arXiv: 2609.19868v1 📥 PDF

作者: Leonid Sinev, Ilya Koziev, Vladislav Leshchuk

分类: cs.CL, cs.AI

发布日期: 2026-09-17

备注: Preprint. Work in progress. Please cite peer-reviewed version when published


💡 一句话要点

提出Zarya以解决自回归与掩蔽扩散模型的局限性

🎯 匹配领域: 支柱四:生成式动作 (Generative Motion)

关键词: 自回归模型 掩蔽扩散模型 混合模型 自然语言处理 生成模型 KV缓存 灵活训练 推理机制

📋 核心要点

  1. 现有自回归语言模型在生成过程中受到顺序限制,掩蔽扩散模型则面临高计算开销和生成不一致的问题。
  2. Zarya通过在单一架构中结合自回归和掩蔽扩散目标,采用可变大小槽的训练数据结构,提升了模型的灵活性和效率。
  3. Zarya模型在多个标准基准上表现出色,展示了与传统模型相比的显著性能提升,尤其是在KV缓存重用方面。

📝 摘要(中文)

自回归语言模型(ARMs)受到顺序生成的限制,而掩蔽扩散模型(MDMs)虽然支持并行解码,但由于无法重用键值缓存(KV cache)而导致计算开销高,并且在学习依赖关系时会出现生成不一致的问题。本文提出Zarya,一种混合语言模型,能够在单一架构中联合优化自回归目标和掩蔽扩散目标。Zarya通过将训练数据结构化为可变大小的槽,并采用逐步增加槽粒度的课程,顺利实现从细粒度自回归学习到粗粒度扩散学习的过渡。在推理阶段,Zarya通过统一接口提供两种不同的解码范式,支持MDM采样和插槽推测解码,充分重用KV缓存。我们公开发布了0.6B、1.7B和4B的Zarya模型,展示了在标准基准上的性能表现,同时实现了自回归和扩散范式的原则性整合。

🔬 方法详解

问题定义:本文旨在解决自回归语言模型(ARMs)在生成过程中的顺序限制,以及掩蔽扩散模型(MDMs)在计算开销和生成一致性方面的不足。

核心思路:Zarya通过将自回归目标与掩蔽扩散目标联合优化,采用可变大小的槽结构和逐步增加的课程学习策略,促进了从细粒度到粗粒度的学习转变。

技术框架:Zarya的整体架构包括训练阶段和推理阶段。在训练阶段,模型使用可变大小的槽进行数据结构化,并逐步增加槽的粒度;在推理阶段,模型提供MDM采样和插槽推测解码两种解码方式。

关键创新:Zarya的主要创新在于其混合架构,能够在同一模型中灵活切换自回归和掩蔽扩散的解码模式,充分利用KV缓存,显著提高了生成效率。

关键设计:Zarya的设计包括多种噪声模式(如前缀完成、填充前缀、填充中间)、有序采样调度和噪声级别排列策略,增强了模型的可配置性和研究探索的灵活性。

🖼️ 关键图片

fig_0
img_1
img_2

📊 实验亮点

Zarya模型在标准基准测试中表现优异,尤其是在KV缓存重用方面,显著提升了生成效率。与传统模型相比,Zarya在性能上实现了显著的提升,具体数据尚未披露,但其灵活性和可配置性为研究提供了广阔的探索空间。

🎯 应用场景

Zarya模型的潜在应用领域包括自然语言生成、对话系统、文本补全等。其灵活的训练和推理机制使得模型能够适应不同的任务需求,具有较高的实际价值。此外,Zarya的设计理念也为未来的语言模型研究提供了新的思路,可能推动更高效的生成模型的发展。

📄 摘要(原文)

Autoregressive language models (ARMs) are constrained by sequential, left-to-right generation, while masked diffusion models (MDMs) enable parallel decoding but suffer from high computational overhead due to the inability to reuse Key-Value (KV) cache and from incoherent generation arising from learning dependencies over an intractable space of token combinations. We introduce Zarya, a family of hybrid language models that jointly optimizes an autoregressive (AR) objective and a masked-diffusion objective within a single architecture. Zarya structures training data into variable-size slots and employs a curriculum that gradually increases slot granularity, enabling a smooth transition from fine-grained AR learning to coarse-grained diffusion learning. At inference, Zarya provides two distinct decoding paradigms through a unified interface: (i) MDM sampling with first-hitting denoising, and (ii) slotted speculative decoding that interleaves inter-slot diffusion-based selection with intra-slot autoregressive infilling, achieving full KV cache reuse. The training and inference regimes are fully decoupled, allowing a model trained with any configuration to be deployed in either mode. Extensive configurability --- including grouped noise patterns (Prefix Completion, Fill-In-the-Prefix, Fill-In-the-Middle), ordered sampling schedules, and noise-level permutation strategies --- enables flexible research exploration. We release Zarya models publicly in sizes 0.6B, 1.7B, and 4B, demonstrating performance on standard benchmarks while offering a principled integration of autoregressive and diffusion paradigms.