HOBBIT通过混合精度专家卸载,实现边缘设备上MoE模型快速推理。
HOBBIT: A Mixed Precision Expert Offloading System for Fast MoE Inference
- 动态按令牌加载专家,低精度替换关键性弱的专家。
- 在边缘设备上实现最高9.93倍解码速度提升。
- 适合资源受限场景下高效部署MoE大模型。
混合专家(MoE)架构在大型语言模型时代展现出显著优势,能在降低推理成本的同时增强模型能力。然而,在内存受限的边缘设备上部署基于MoE的LLM仍具挑战,因其内存需求庞大。现有专家卸载方法虽缓解了内存压力,但常导致显著的专家加载延迟或牺牲模型精度。本文提出HOBBIT,一种混合精度专家卸载系统,实现灵活高效的MoE推理。核心洞察在于:将不关键的缓存未命中专家动态替换为低精度版本,可大幅减少专家加载延迟,同时保持模型精度。HOBBIT引入三项创新技术,充分映射MoE计算的天然层级结构:(1) 令牌级动态专家加载机制;(2) 层级自适应专家预取技术;(3) 序列级多维专家缓存策略。这些技术充分发挥混合精度专家推理的优势。在著名LLM推理框架Llama.cpp上实现并评估,涵盖多种边缘设备与代表性MoE模型。结果表明,与当前最先进的MoE卸载系统相比,HOBBIT在解码阶段最高实现9.93倍加速。
原文摘要 · Abstract (English)
The Mixture-of-Experts (MoE) architecture has demonstrated significant advantages in the era of Large Language Models (LLMs), offering enhanced capabilities with reduced inference costs. However, deploying MoE-based LLMs on memoryconstrained edge devices remains challenging due to their substantial memory requirements. While existing expertoffloading methods alleviate the memory requirements, they often incur significant expert-loading costs or compromise model accuracy. We present HOBBIT, a mixed precision expert offloading system to enable flexible and efficient MoE inference. Our key insight is that dynamically replacing less critical cache-miss experts with low precision versions can substantially reduce expert-loading latency while preserving model accuracy. HOBBIT introduces three innovative techniques that map the natural hierarchy of MoE computation: (1) a token-level dynamic expert loading mechanism, (2) a layer-level adaptive expert prefetching technique, and (3) a sequence-level multidimensional expert caching policy. These innovations fully leverage the benefits of mixedprecision expert inference. By implementing HOBBIT on top of the renowned LLM inference framework Llama.cpp, we evaluate its performance across different edge devices with representative MoE models. The results demonstrate that HOBBIT achieves up to a 9.93x speedup in decoding compared to state-of-the-art MoE offloading systems.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。