S2-MoE:在边缘设备上实现高效的混合专家模型自推测解码
文章背景与核心概要
在边缘设备上部署大语言模型(LLM)因其严格的内存和带宽限制而极具挑战性。虽然混合专家模型(MoE)架构和推测解码是提升推理效率的主流方法,但将两者简单结合会导致严重的瓶颈,特别是在内存受限的环境中,会出现过度的验证开销和专家复用率低的问题。
为了克服这些障碍,作者提出了 S2-MoE,这是一个专为边缘硬件上的 MoE 推理量身定制的高效自推测解码框架。S2-MoE 在 llama.cpp 中实现,通过三种关键机制优化了边缘性能:路由感知的自适应推测扩展、复用感知的专家门控,以及用于对齐草稿模型与目标模型的共享上下文执行。
针对多种 MoE 模型和数据集的实证评估表明,与边缘设备上的标准自回归解码相比,S2-MoE 最高可实现 5.3 倍的加速(平均加速约为 2.0 倍)。
📌 摘要
在边缘设备上部署大语言模型(LLM)因其严格的内存和带宽限制而极具挑战性。虽然混合专家模型(MoE)架构和推测解码是提升推理效率的主流方法,但将两者简单结合会导致严重的瓶颈——特别是在内存受限的环境中,会出现过度的验证开销和专家复用率低的问题。
Deploying Large Language Models (LLMs) on edge devices is notoriously difficult due to strict memory and bandwidth limitations. While Mixture-of-Experts (MoE) architectures and speculative decoding are popular methods for boosting inference efficiency, naively combining them leads to major bottlenecks—specifically, excessive verification overhead and poor expert reuse in memory-bound environments.
为了克服这些障碍,作者提出了 S2-MoE,这是一个专为边缘硬件上的 MoE 推理量身定制的高效自推测解码框架。S2-MoE 在 llama.cpp 中实现,通过三种关键机制优化了边缘性能:
1. 路由感知的自适应推测扩展,以最大限度地减少冗余验证。
2. 复用感知的专家门控,以最大限度地提高验证效率。
3. 共享上下文执行,以无缝对齐草稿模型和目标模型。
To overcome these hurdles, the authors introduce S2-MoE, an efficient self-speculative decoding framework tailored for MoE inference on edge hardware. Implemented within
llama.cpp, S2-MoE optimizes edge performance through three key mechanisms: 1. Routing-aware adaptive speculative expansion to minimize redundant verification. 2. Reuse-aware expert gating to maximize verification efficiency. 3. Shared context execution to seamlessly align draft and target models.
针对多种 MoE 模型和数据集的实证评估表明,与边缘设备上的标准自回归解码相比,S2-MoE 最高可实现 5.3 倍的加速(平均约为 2.0 倍)。
Empirical evaluations across diverse MoE models and datasets demonstrate that S2-MoE achieves up to a \(5.3\times\) speedup (averaging around \(2.0\times\)) compared to standard autoregressive decoding on edge devices.
📋 文档元数据
| 元数据字段 | 详情 |
|---|---|
| 评论 | 13 页,10 张图表 |
| 引用方式 | arXiv:2608.15018 [cs.AI] |
| DOI | 10.48550/arXiv.2608.15018 |
Metadata Field Details Comments 13 pages, 10 figures Cite As arXiv:2608.15018 [cs.AI]DOI 10.48550/arXiv.2608.15018