通过自适应路由实现在线MoE模型更小更快,无需任务标签
Faster, Smaller, and Smarter: Task-Aware Expert Merging for Online MoE Inference
- 用树状结构动态调整专家合并权重,基于历史数据推断任务分布
- 推理延迟降低45%以上,内存减少25%,精度接近顶尖方法
- 适合边缘设备上的实时推理,尤其在无任务标签场景下表现优
稀疏混合专家(SMoE)通过仅激活部分专家实现模型容量扩展而保持计算成本不变,但在在线推理中面临模型过大和路由复杂的问题,尤其在资源受限的边缘网络中。此外,线上推理常缺乏任务信息,导致任务级路由不可靠。本文提出一种新型树结构自适应神经赌徒路由器(Tanbr),无需显式任务标签,通过历史数据估计任务分布,指导预训练MoE中的任务感知专家合并。为处理连续合并权重空间,Tanbr采用二叉树逐步划分空间并生成候选权重,再利用神经赌徒学习合并权重与模型性能的非线性映射,确定最优合并策略。理论上,Tanbr在T轮内实现次线性遗憾界$/mathcal{O}( ext{√}T ext{log}(T))$,与现有方法相当。大量实验表明,Tanbr将推理延迟降低至少45%,内存使用最多减少25%,同时保持高精度,优于多项先进方法。
原文摘要 · Abstract (English)
Sparse Mixture of Experts (SMoE) has become a preferred architecture for scaling Transformer capacity without increasing computational cost, as it activates only a small subset of experts for each input. However, deploying such an approach for \textit{online inference} remains challenging due to the large size of a full SMoE model and the complexity of expert routing, especially in resource-constrained edge networks. Moreover, during the online inference, task information is often unavailable, making the task-level routing error-prone. In this work, we propose a novel tree-structured adaptive neural bandit router, \texttt{Tanbr}, to enable efficient and reliable online MoE inference. Instead of relying on explicit task tags, \texttt{Tanbr} estimates the task distribution over time from historical data and uses it to guide task-aware expert merging within a given pre-trained MoE. To handle the large continuous space of merging weights, \texttt{Tanbr} employs a binary tree to progressively partition the space and generate finer candidate weights. It then applies a neural bandit to learn the non-linear mapping from merging weight to model performance and decides optimal expert merging. We prove that \texttt{Tanbr} achieves a sublinear regret bound of {\small $\mathcal{O}(\sqrt{T} \log(T))$} over {\small $T$} rounds, despite operating over a continuous decision space, matching regret bounds compared to existing methods. Extensive experiments show that \texttt{Tanbr} reduces inference latency by at least {\small $45\%$} and memory usage by up to {\small $25\%$}, while maintaining a high accuracy compared to many state-of-the-art methods.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。