2025-03-07 · 专家 · 机器学习 · 自然语言处理 · 计算机视觉

Union of Experts: Adapting Hierarchical Routing to Equivalently Decomposed Transformer

本文提出了一种名为UoE的混合专家模型,通过等价分解和选择性路由机制,在保持高效计算的同时提升了Transformer模型在图像和自然语言处理任务中的性能。

更新于 2025-03-07。作者:Yujiao Yang、Jing Lian、Linhui Li。

中文摘要

混合专家(MoE)在保持计算效率的同时提升了模型性能,使其非常适合大规模应用。然而,现有MoE范式中的专家独立工作,因此缺乏高质量的专家交互。此外,它们尚未有效扩展到注意力块,这限制了进一步的效率提升。为了解决这些问题,我们提出了联合专家(UoE),它将transformer分解成一组等价的专家,并在输入数据和专家之间实施动态路由。我们的方法通过三个关键创新推进了MoE设计:(1)我们基于张量并行中的矩阵划分,在MLP块和注意力块上进行了等价专家分解。(2)我们开发了两种路由范式:分块数据选择和专家选择,以在不同级别应用路由。(3)我们设计了UoE模型的架构,包括选择性多头注意力(SMHA)和联合MLP专家(UoME)。(4)我们开发了UoE的路由和计算操作的并行实现,并根据硬件处理分析优化了效率。实验表明,采用UoE的模型在图像和自然语言领域的多个任务中优于全注意力、最先进的MoE和高效的Transformer。源代码可在https://github.com/YujiaoYang-work/UoE上获取。

英文摘要

Mixture-of-Experts (MoE) enhances model performance while maintaining computational efficiency, making it well-suited for large-scale applications. However, expert in exist MoE paradigm works as an individual, thereby lacking high-quality expert interactions. Moreover, they have not been effectively extended to attention block, which constrains further efficiency improvements. To tackle these issues, we propose Union-of-Experts (UoE), which decomposes transformer into an equitant group of experts, and then implement dynamic routing on input data and experts. Our approach advances MoE design with three key innovations: (1) We conducted equitant expert decomposition on both MLP blocks and attention blocks based on matrix partition in tensor parallelism. (2) We developed two routing paradigms: patch wise data selection and expert selection, to apply routing across different levels. (3) We design the architecture of UoE model, including Selective Multi-Head Attention (SMHA) and Union-of-MLP-Experts (UoME). (4) We develop parallel implementation of UoE's routing and computation operation, and optimize efficiency based on the hardware processing analysis. The experiments demonstrate that the model employed with UoE surpass Full Attention, state-of-art MoEs and efficient transformers in several tasks across image and natural language domains. The source codes are available at https://github.com/YujiaoYang-work/UoE.

解读

一句话总结

本文提出了一种名为UoE的混合专家模型,通过等价分解和选择性路由机制,在保持高效计算的同时提升了Transformer模型在图像和自然语言处理任务中的性能。

问题1:这篇论文想要解决什么具体问题?

问题2:论文的核心创新点是什么?

问题3:实验结果如何验证了方法的有效性?

问题4:这个研究的实际应用价值是什么?

来源

机器可读索引:llms.txt