arXiv:2510.08666cs.CLcs.AI2025-10被引 29

dInfer让扩散语言模型推理提速10倍,支持高效批量生成。

dInfer: An Efficient Inference Framework for Diffusion Language Models

  • 模块化设计四组件,融合算法优化与系统加速
  • 单批次下生成超1100词/秒,六基准平均超800词/秒
  • 适合追求高吞吐的扩散模型部署者,开源可复用

基于扩散的大型语言模型(dLLMs)作为自回归(AR)模型的潜在替代方案,通过去噪生成实现固有并行性。尽管越来越多开源dLLM模型涌现,但其广泛应用仍受限于缺乏标准化且高效的推理框架。本文提出dInfer,一个高效可扩展的dLLM推理框架。dInfer将推理流程分解为模型、扩散迭代管理器、解码策略和KV缓存管理器四个模块,并在每个模块集成新算法及系统级优化。通过算法创新与系统增强结合,dInfer在保持输出质量的前提下显著提升效率,在LLaDA-MoE上实现大幅性能提升:单批次下在HumanEval上超过1,100词/秒,六项基准平均超过800词/秒,运行于$8\times$ H800 GPU。相比先前系统,dInfer相较Fast-dLLM实现10倍加速,同时与具有相似激活参数量和性能的AR模型QWen2.5-3B(使用最新vLLM引擎优化)相比,仍具备2-3倍速度优势。dInfer代码已开源至https://github.com/inclusionAI/dInfer。

原文摘要 · Abstract (English)

Diffusion-based large language models (dLLMs) have emerged as a promising alternative to autoregressive (AR) LLMs, leveraging denoising-based generation to enable inherent parallelism. Even more and more open-sourced dLLM models emerge, yet their widespread adoption remains constrained by the lack of a standardized and efficient inference framework. We present dInfer, an efficient and extensible framework for dLLM inference. dInfer decomposes the inference pipeline into four modular components--model, diffusion iteration manager, decoding strategy, and KV-cache manager--and integrates novel algorithms for each component alongside system-level optimizations. Through this combination of algorithmic innovations and system enhancements, dInfer achieves substantial efficiency gains without compromising output quality on LLaDA-MoE. At batch size 1, it surpasses 1,100 tokens per second on HumanEval and averages over 800 tokens per second across six benchmarks on $8\times$ H800 GPUs. Compared to prior systems, dInfer delivers a $10\times$ speedup over Fast-dLLM while maintaining similar model performance. Even compared to the AR model (with a comparable number of activation parameters and performance) QWen2.5-3B, which is highly optimized with the latest vLLM inference engine, dInfer still delivers a $2$-$3\times$ speedup. The implementation of dInfer is open-sourced at https://github.com/inclusionAI/dInfer.

扩散模型推理加速语言模型

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