LSH-MoE:通过局部敏感哈希实现通信高效的MoE训练
LSH-MoE: Communication-efficient MoE Training via Locality-Sensitive Hashing
AI总结:
本文提出LSH-MoE框架,利用局部敏感哈希进行数据压缩并辅以残差误差补偿,有效减少MoE训练中的全对全通信开销,在多种模型和任务上实现1.28至2.2倍加速。
摘要:
更大的transformer模型在各种任务上总是表现更好,但扩大模型规模需要更多成本。为了高效扩展模型,混合专家(MoE)架构被广泛采用,它由一个门控网络和一系列专家组成,通过将输入数据路由到固定数量的专家而非所有专家来保持训练成本恒定。在现有的大规模MoE训练系统中,专家被分布在不同GPU上以实现并行化,因此输入数据需要额外的全对全通信来访问目标专家并进行相应计算。然而,在评估常用GPU集群上三个主流MoE模型的训练过程时,我们发现全对全通信比例平均约为45%,这严重阻碍了MoE模型训练的效率和可扩展性。本文提出LSH-MoE,一个使用局部敏感哈希(LSH)的通信高效MoE训练框架。我们首先指出现有系统中扩展MoE训练的问题,并强调利用token相似性促进数据压缩的潜力。然后,我们引入一种高效的基于LSH的压缩技术,利用交叉多面体哈希进行快速聚类,并实现基于残差的误差补偿方案以减轻压缩的不利影响。为验证方法有效性,我们在语言模型(如RoBERTa、GPT和T5)和视觉模型(如Swin)上进行了预训练和微调任务实验。结果表明,我们的方法在不同任务上实现了1.28倍至2.2倍的加速,显著优于同类方法。
英文摘要:
Larger transformer models always perform better on various tasks but require more costs to scale up the model size. To efficiently enlarge models, the mixture-of-experts (MoE) architecture is widely adopted, which consists of a gate network and a series of experts and keep the training cost constant by routing the input data to a fixed number of experts instead of all. In existing large-scale MoE training systems, experts would be distributed among different GPUs for parallelization, and thus input data requires additional all-to-all communications to access the target experts and conduct corresponding computations. However, upon evaluating the training process of three mainstream MoE models on commonly used GPU clusters, we found that the all-to-all communication ratio averaged around 45%, which significantly hinders the efficiency and scalability of training MoE models. In this paper, we propose LSH-MoE, a communication-efficient MoE training framework using locality-sensitive hashing (LSH). We first present the problems of scaling MoE training in existing systems and highlight the potential of exploiting token similarity to facilitate data compression. Then, we introduce an efficient LSH-based compression technique, which utilizes the cross-polytope hashing for rapid clustering and implements a residual-based error compensation scheme to alleviate the adverse impact of compression. To verify the effectiveness of our methods, we conduct experiments on both language models (e.g., RoBERTa, GPT, and T5) and vision models (e.g., Swin) for pre-training and fine-tuning tasks. The results demonstrate that our method substantially outperforms its counterparts across different tasks by 1.28x - 2.2x of speedup.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。