arXiv:2510.04146cs.LGcs.AI2025-10被引 13

对比扩散与自回归模型,发现扩散模型并行生成更高效但长文本表现差。

Beyond Next-Token Prediction: A Performance Characterization of Diffusion versus Autoregressive Language Models

  • 用并行采样生成文本,打破逐词预测依赖
  • 长上下文时性能下降,但分块解码可改善
  • 减少采样步数是提升扩散模型速度的关键

大型语言模型在文档处理和代码生成等任务中表现优异。自回归模型(ARMs)通过逐词预测生成文本,虽准确率高但计算强度低。扩散语言模型(DLMs)采用并行方式生成输出,缓解了串行解码的瓶颈。本研究通过理论分析与实证评测,系统比较两类模型的性能特性。结果表明,尽管DLMs能通过跨词位置并行获得更高计算强度,但在长上下文场景下难以有效扩展。引入分块解码后,可实现类似ARMs的长序列扩展能力。此外,批处理推理中ARMs因受益于批次内并行性而具有更高吞吐量。最后指出,减少采样步骤是开源DLMs降低延迟、超越ARMs的关键路径。

原文摘要 · Abstract (English)

Large Language Models (LLMs) have achieved state-of-the-art performance on a broad range of Natural Language Processing (NLP) tasks, including document processing and code generation. Autoregressive Language Models (ARMs), which generate tokens sequentially conditioned on all previous tokens, have been the predominant paradigm for LLMs. While these models have achieved high accuracy across a range of downstream tasks, they exhibit low arithmetic intensity due to the inherent sequential dependency in next-token prediction. Recently, Diffusion Language Models (DLMs) have emerged as a promising alternative architecture. DLMs generate output tokens in parallel, mitigating the limitations of sequential decoding. However, the performance implications of DLMs relative to commonly deployed ARMs are not fully understood. In this work, we present a comprehensive study of the performance characteristics of ARMs and DLMs, combining theoretical analysis with empirical profiling to characterize the trade-offs between these approaches. We show that although DLMs can achieve higher arithmetic intensity than ARMs by leveraging parallelism across token positions, they fail to scale effectively with longer contexts. We then explore block-wise decoding for DLMs, which decouples arithmetic intensity from sequence length and enables better scaling to long contexts (similar to ARMs). We also examine batched inference and find that ARMs exhibit superior throughput as they benefit more from parallelism across sequences in the batch. Finally, we highlight opportunities for accelerating DLM inference, emphasizing that reducing the number of sampling steps is key for open-source DLMs to achieve lower latency relative to ARMs.

扩散模型自回归模型推理加速长文本生成

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。