提出新缓存策略,显著提升MoE模型推理速度与缓存效率
SpecMD: A Comprehensive Study On Speculative Expert Prefetching
- 设计统一框架SpecMD,系统评测不同缓存策略在多种硬件上的表现
- 发现专家访问无时间局部性,提出最久未用优化策略,缓存命中率超88%
- 仅用0.6GB显存即可降低34.7%首令牌耗时,适合部署高并发推理场景
混合专家(MoE)模型通过稀疏激活实现高效推理,但需依赖专家缓存机制才能发挥性能优势。现有研究多聚焦硬件级缓存策略,却缺乏对策略间交互及硬件配置影响的系统理解。为此,本文提出标准评测框架SpecMD,可在真实约束下全面评估多种MoE缓存策略。实验表明,专家访问不满足传统时间局部性假设(如LRU、LFU)。基于此,我们提出新型淘汰策略Least-Stale,利用MoE可预测的专家访问模式,相较LRU减少高达85倍的冲突缺失。该策略使OLMoE模型在仅5%或0.6GB显存缓存条件下,实现超过88%的命中率,并将首令牌延迟(TTFT)降低34.7%。
原文摘要 · Abstract (English)
Mixture-of-Experts (MoE) models enable sparse expert activation, meaning that only a subset of the model's parameters is used during each inference. However, to translate this sparsity into practical performance, an expert caching mechanism is required. Previous works have proposed hardware-centric caching policies, but how these various caching policies interact with each other and different hardware specification remains poorly understood. To address this gap, we develop \textbf{SpecMD}, a standardized framework for benchmarking ad-hoc cache policies on various hardware configurations. Using SpecMD, we perform an exhaustive benchmarking of several MoE caching strategies, reproducing and extending prior approaches in controlled settings with realistic constraints. Our experiments reveal that MoE expert access is not consistent with temporal locality assumptions (e.g LRU, LFU). Motivated by this observation, we propose \textbf{Least-Stale}, a novel eviction policy that exploits MoE's predictable expert access patterns to reduce collision misses by up to $85\times$ over LRU. With such gains, we achieve over $88\%$ hit rates with up to $34.7\%$ Time-to-first-token (TTFT) reduction on OLMoE at only $5\%$ or $0.6GB$ of VRAM cache capacity.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。