LSH-MoE: Communication-efficient MoE Training via Locality-Sensitive Hashing

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.

Paper

References (41)

Scroll for more · 29 remaining

Similar papers

Peer review

Reviewer 4XaA6/10 · confidence 3/52024-07-08

Summary

The authors focus on the communication overhead in large-scale MoE training, specifically under the expert parallel plus the data parallel regime. They reduce the communication workload by transmitting only the clustering centroids, which are calculated on the fly using LSH functions. To reduce the compression-induced error, the authors also propose a residual-based error compensation scheme. The authors perform evaluations using 4 different architectures in both language and vision, and for both pertaining and finetuning tasks.

Strengths

1. This paper is primarily well-written, and the algorithm is presented clearly. 2. As far as I know, the idea of compress activation using cluster to reduce communication for MoE training is rather original. 3. The authors focus on a timely and important problem, especially because there has been a trend of adopting MoE in large-scale models recently.

Weaknesses

1. To convince the audience of this problem's importance and increase the work's significance, the authors may provide a more detailed analysis of the communication overhead. One example is given in Section 2.2. However, it would be better if the authors could study what factors influence the percentage, perhaps the relationship between the communication overhead and the scale of the training servers, the scale of models, etc. 2. Lack of background and related work. I would suggest the authors provide background on LSH algorithms, such as how to calculate centroid using LSH. Further, as far as I know, there are more works that improve the efficiency of MoE training, such as DeepSpeed MoE, DeepSpeed-TED, and SCoMoE, which should be discussed and compared.

Questions

1. Why did T5-MoE achieve a much faster convergence than RoBERTa-MoE? 2. Figure 5 shows a difference in validation perplexity( 2.37 vs. 2.5), while LSH-MoE seems not quite flattened out. Would continuing training LSH-MoE reach the same perplexity? 3. For the pertaining setting, what is the accuracy difference on zero-shot or few-shot downstream tasks between origin and LSH-MoE? The

Rating

6

Confidence

3

Soundness

2

Presentation

3

Contribution

2

Limitations

The authors claim there is no limitations and no societal impact of the work performed.

Authorsrebuttal2024-08-07

Background on LSH algorithms

# **Background on LSH algorithms**. Locality-Sensitive Hashing (LSH) is a probabilistic method primarily used to approximate nearest neighbor search in high-dimensional spaces, which reduces the dimensionality of data by mapping similar data to the same "buckets" with high probability using hash functions. This approach contrasts with traditional exhaustive search methods, offering a substantial reduction in computational complexity, particularly beneficial for large-scale data applications.The key operations in LSH including: + **Mapping Data into Buckets**: At the core of LSH is a family of hash functions that maximize the probability of nearby points in the original space staying close in the hashed space, while distant points are likely to end up in different buckets. Each hash function $h$ is characterized by the property: $P[h(x) = h(y)] = 1 - d(x, y)/D$, where $d(x, y)$ is the distance between points $x$ and $y$ and $D$ denotes the diameter of the space. To map similiar data into the same bucket, multiple hash functions from this family are selected based on the specific attributes of the data (e.g., Euclidean distance, cosine similarity) and the desired granularity of the buckets. Data points are then hashed by these functions, and each point is assigned to buckets according to its hash values, effectively categorizing similar items together for clustering. + **Calculating Cluster Centroids**: By grouping data points into buckets as determined by their hash values, data points are effectively clustered. Each bucket represents a cluster of data points and the centroid of each cluster is then calculated as the mean of all points within that cluster, formulated as: $C_j = \frac{1}{n_j}\sum^{n_j}_{i=1}{x_i}$, where $C_j$ is the centroid of the j-th bucket, ​$n_j$ is the number of points in the j-th bucket, and $x_i$ are the data points in the bucket.

Reviewer 4XaA2024-08-12

Thanks for the reply. I will increase my score, as the authors clarify most of my concerns. And I would encourage the authors to include the update in the final manuscript.

Authorsrebuttal2024-08-13

Dear Reviewer 4XaA, Thank you for your positive feedback and for increasing the score of our paper. We are grateful for your encouragement and will ensure that the suggested updates are included in the final manuscript. Best regards, Authors of Paper 4459

Reviewer ooKw6/10 · confidence 4/52024-07-15

Summary

The paper introduces LSH-MoE, a communication-efficient training framework for Mixture-of-Experts (MoE) models using Locality-Sensitive Hashing (LSH). The authors identify the inefficiencies in existing MoE training methods, particularly the high communication costs due to all-to-all communications among GPUs. The proposed method leverages token similarity for data compression, significantly reducing communication overhead and achieving substantial speedups in training time while maintaining model quality.

Strengths

1. The use of Locality-Sensitive Hashing for compressing communication data in MoE training is novel and addresses a significant bottleneck in distributed training systems. 2. The authors conduct extensive experiments on various language and vision models, demonstrating the effectiveness of their method across different tasks and datasets. 3. The experimental results show impressive speedups (1.28-2.2×) in training time, making the approach highly beneficial for large-scale model training.

Weaknesses

Maybe it would be better to include more larger MoE results.

Questions

How does the authors view the potential speedup of LSH-MOE over larger MoE models like Mixtral 8x7B?

Rating

6

Confidence

4

Soundness

3

Presentation

3

Contribution

3

Limitations

NA

Reviewer 7fVV7/10 · confidence 4/52024-07-26

Summary

This paper presents a method to speed up MoE large model training with locality-sensitive hashing. It conducts experiments on both language models and vision models for both pre-training and fine-tuning tasks, and achieves 1.28-2.2× of speedup.

Strengths

1. This paper introduces an efficient LSH-based compression technique to apply tokens on similar expert model, which is both effective and fast. 2. This paper is well written for understanding. 3. This paper conducts experiment on different types of large model and training tasks, which shows the generality of proposed method.

Weaknesses

1. There is a lack of the whole framework figure for the proposed LSH-MoE method for better understanding of reader. 2. More deeper analisis should be added for ablation study, the experiment result shows the effect of different quantity and type of hash functions. But we still don't have even a guess of reason. 3. Some expressions need to be improved for example, what is the difference between compression rates and compression ratio in Fig 6.

Questions

1. What's the difference between compression rates and compression ratio in Fig 6, and why we choose 20%,15%,10% compression rates for accuracy comparation. 2. We only try cross-polytope and spherical hashing for comparation, are there any other hashing types could be adopted? 3. Do we consider to adopt some learning to hash method for MoE model training speedup? Because as far as I see, learning to hash method usually keep semantic similarity better than LSH method.

Rating

7

Confidence

4

Soundness

3

Presentation

3

Contribution

3

Limitations

The authors have not addressed the limitations and negative societal impact of their work. This work gives a good training speedup solution for MoE large models. But the proposed method could not work well on none-MoE models. Maybe the author can consider some speedup method for general large models.

Authorsrebuttal2024-08-13

Dear Reviewer 7fVV, Thank you for taking the time to read our rebuttal and for maintaining your positive rating of our paper. We greatly appreciate your support and confidence in our work. Best regards, Authors of Paper 4459

Reviewer 7fVV2024-08-13

Rating after reading the rebuttal

I have read the rebuttal,and I would like to keep my rating for this paper.

Program Chairsdecision2024-09-25

Decision

Accept (poster)

© 2026 NYSGPT2525 LLC