Research Papers 论文研究 5h ago Updated 37m ago 更新于 37分钟前 43

Affix Cache for Diffusion Large Language Models 扩散大语言模型的词缀缓存

Diffusion Large Language Models (DLLMs) face a fundamental inference efficiency challenge: bidirectional attention couples shared context tokens with evolving generated tokens, making naive KV cache reuse stale while full recomputation is prohibitively expensive. ACache introduces an affix-oriented cache reuse mechanism that identifies a small, request-specific subset of critical "Anchor Tokens" by measuring their influence on masked generation tokens, selectively recomputing only these tokens w 提出ACache机制,解决Diffusion LLMs中共享文本span的缓存重用问题,突破仅支持前缀重用的限制 通过测量对masked生成token的影响识别关键Anchor Tokens,仅重新计算约20%的affix token即可恢复精度 基于Fast-dLLM实现,重新计算延迟降低高达55.7%,端到端吞吐量提升1.68倍 在Nano-vLLM引擎上构建共享前缀原型,验证了方案在真实推理场景的可行性

55
Hot 热度
72
Quality 质量
58
Impact 影响力

Analysis 深度分析

TL;DR

  • Diffusion Large Language Models (DLLMs) face a fundamental inference efficiency challenge: bidirectional attention couples shared context tokens with evolving generated tokens, making naive KV cache reuse stale while full recomputation is prohibitively expensive.
  • ACache introduces an affix-oriented cache reuse mechanism that identifies a small, request-specific subset of critical "Anchor Tokens" by measuring their influence on masked generation tokens, selectively recomputing only these tokens while reusing the rest of the affix cache.
  • Built on Fast-dLLM, ACache recovers accuracy loss from direct affix-cache reuse across different settings by recomputing approximately 20% of affix tokens.
  • A shared-prefix prototype on Nano-vLLM demonstrates that ACache reduces recompute latency by up to 55.7% and improves end-to-end throughput by up to 1.68×.

Why It Matters

This work addresses a critical bottleneck in deploying Diffusion LLMs at scale—efficient inference with shared context. As DLLMs gain traction for their non-autoregressive decoding and bidirectional modeling advantages, the inability to reuse cached computations for overlapping text spans has been a major barrier to production viability. ACache provides a practical, accuracy-preserving solution that could accelerate the adoption of DLLMs in real-world serving systems.

Technical Details

  • Core Problem: In autoregressive LLMs, KV caches for shared prefixes can be directly reused. In DLLMs, bidirectional attention means the KV states of shared context tokens are entangled with the evolving generated tokens, so naive cache reuse produces stale values, while full recomputation is computationally expensive.
  • Anchor Token Identification: ACache measures the influence of affix tokens on masked generation tokens to identify a request-specific subset of critical tokens ("Anchor Tokens") that must be recomputed, while the remaining affix tokens can safely reuse cached KV states.
  • Implementation: Built on top of Fast-dLLM, ACache selectively recomputes KV states for only the Anchor Tokens (~20% of affix tokens) and reuses cached states for the rest, recovering accuracy loss from direct cache reuse.
  • Performance Results: A shared-prefix prototype on Nano-vLLM shows up to 55.7% reduction in recompute latency and up to 1.68× improvement in end-to-end throughput.
  • Scope: The mechanism generalizes beyond simple shared prefixes to arbitrary shared text spans within DLLM inference.

Industry Insight

  • The affix cache reuse paradigm could become a foundational optimization for any non-autoregressive generative model that relies on bidirectional attention, extending beyond language models to multimodal diffusion architectures.
  • The 20% recomputation threshold suggests a strong accuracy-latency tradeoff sweet spot; serving systems that can dynamically adjust this ratio based on workload characteristics could achieve significant cost savings without quality degradation.
  • As DLLMs continue to compete with autoregressive models on quality, inference efficiency optimizations like ACache will be decisive in determining which architecture wins on total cost-per-token in production deployments.

TL;DR

  • 提出ACache机制,解决Diffusion LLMs中共享文本span的缓存重用问题,突破仅支持前缀重用的限制
  • 通过测量对masked生成token的影响识别关键Anchor Tokens,仅重新计算约20%的affix token即可恢复精度
  • 基于Fast-dLLM实现,重新计算延迟降低高达55.7%,端到端吞吐量提升1.68倍
  • 在Nano-vLLM引擎上构建共享前缀原型,验证了方案在真实推理场景的可行性

为什么值得看

本文针对Diffusion LLMs这一新兴架构的推理效率瓶颈提出创新解决方案,填补了非自回归模型缓存优化领域的空白。研究成果对推动DLLMs从理论走向实际部署具有重要工程价值。

技术解析

  • 核心问题:DLLMs通过双向注意力将共享上下文token的KV状态与生成token耦合,导致传统KV缓存重用策略失效——简单重用会产生过时状态,完全重新计算则开销巨大。
  • Anchor Token识别:ACache通过量化每个affix token对masked生成token的影响程度,筛选出请求特定的关键子集(Anchor Tokens),实现精准的重计算定位。
  • 选择性重计算策略:仅对Anchor Tokens执行完整的KV状态重新计算,其余affix token直接复用缓存,在精度与效率之间取得平衡。
  • 实验验证:在Fast-dLLM基础上,仅重新计算约20%的affix token即可完全恢复直接缓存重用导致的精度损失;在Nano-vLLM原型系统中实现延迟优化和吞吐量提升。

行业启示

  • Diffusion LLMs作为非自回归架构的代表,其推理优化路径与自回归模型存在本质差异,需发展针对性的缓存和计算策略。
  • 缓存重用粒度从"前缀"扩展到"任意共享文本span",为多请求共享上下文场景(如批量推理、RAG系统)提供了新的优化思路。
  • 选择性重计算思想可推广至其他耦合型注意力架构,对降低DLLMs部署成本、提升推理效率具有直接指导意义。

Disclaimer: The above content is generated by AI and is for reference only. 免责声明:以上内容由 AI 生成,仅供参考。

LLM 大模型 Inference 推理 Research 科学研究 Training 训练