arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2611.36634cs.LGcs.CL
收藏

用于加速MoE扩散语言模型推理的时序专家缓存

Temporal Expert Caching for Accelerating Inference in MoE Diffusion Language Models

Carnegie Mellon University(卡内基梅隆大学)

Vikhyath Kothamasu, Sandeep Kumar, Deepika Palagani

AI总结:

该研究针对MoE扩散语言模型推理中权重传输耗时的问题,利用迭代去噪的时序局部性设计三种缓存机制,在12GB GPU预算下较HF Accelerate提速9倍且精度不变。

摘要:

扩散模型已成为图像和视频生成的行业标准,其并行解码、双向上下文区分等特性与经典自回归模型形成差异。扩散语言模型(DLM)将相同原理应用于文本,近期模型在代码与数学推理上可与自回归模型竞争。稀疏混合专家(MoE)变体如LLaDA系列提升了模型实用性,以仅占小部分的每token计算量实现了大模型质量。但在12GB消费级显卡等内存受限GPU上,约32GB的专家权重无法容纳,数十次去噪步骤中的每一步都需从主机内存重新加载,权重传输而非计算成为生成时间的主导因素。我们发现迭代去噪的两个特性可避免大部分成本:连续步骤间每token隐藏状态几乎无变化(余弦相似度0.97),且每层路由到的专家集合几乎相同(Jaccard重叠度0.94-0.97)。我们利用这种时序局部性设计了三种机制:跳过未变化token的每专家输出缓存、基于前一步路由的时序权重预取,以及针对未命中的CPU SwiGLU fallback。在两个LLaDA-mini模型、两种GPU架构(L40S和A6000)及七个基准测试中,该组合系统在12GB预算下的端到端速度较HF Accelerate快中位数9倍,且任务精度在运行间方差内保持不变。

英文摘要:

Diffusion models have become the industry standard for image and video generation, with properties such as parallel decoding and bidirectional context distinguishing them from classical autoregressive alternatives. Diffusion language models (DLMs) bring the same principles to text, and recent models are competitive with autoregressive ones on code and mathematical reasoning. Sparse mixture-of-experts (MoE) variants such as the LLaDA series make these models more practical, offering large-model quality at a fraction of the per-token compute. On memory-constrained GPUs such as 12 GB consumer cards, however, the ~32 GB of expert weights do not fit, and each of the dozens of denoising steps reloads them from host memory. Weight transfer, not compute, then dominates generation time. We identify two properties of iterative denoising that make most of this cost avoidable: between consecutive steps, per-token hidden states barely change (cosine similarity 0.97), and each layer routes to nearly the same set of experts (Jaccard overlap 0.94-0.97). We exploit this temporal locality with three mechanisms: per-expert output caching that skips unchanged tokens, temporal weight prefetching driven by previous-step routing, and a CPU SwiGLU fallback for misses. Across two LLaDA-mini models, two GPU architectures (L40S and A6000), and seven benchmarks, the combined system is a median 9x faster end-to-end than HF Accelerate at a 12 GB budget, with task accuracy preserved within run-to-run variance.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑