PaperHub
4.3
/10
withdrawn4 位审稿人
最低3最高6标准差1.3
6
3
3
5
4.5
置信度
正确性2.3
贡献度1.5
表达2.3
ICLR 2025

MoE-Pruner: Pruning Mixture-of-Experts Large Language Model using the Hints from Its Router

OpenReviewPDF
提交: 2024-09-23更新: 2024-12-16
TL;DR

We propose MoE-Pruner, a one-shot pruning method for Mixture-of-Experts models, and expert-wise knowledge distillation for recovering MoE performance after pruning.

摘要

关键词
mixture-of-expertslarge language modelssparsitynetwork pruningknowledge distillation

评审与讨论

审稿意见
6

This paper focuses on the pruning of sparse mixture-of-experts (MoE) models. It introduces a method called MoE-Pruner, which selectively prunes weights based on the smallest magnitudes, factoring in both the corresponding input activations and router weights for each output neuron. Experiments are conducted on the Mixtral family models to evaluate the approach's effectiveness.

优点

(1) The method is clearly explained.

(2) The proposed method is efficient and practical for real-world deployment.

缺点

(1) The evaluation is restricted to the Mixtral models, raising questions about the method's scalability to other architectures like Qwen and DeepSeek.

(2) The distilled step shows only minor improvements, as seen in Table 4. What could be the underlying reason for this limited gain?

(3) This method builds incrementally on the baseline, Wanda, by incorporating gate weights within the MoE pruning framework.

问题

Some previous studies have focused on pruning entire experts, as seen in [1, 2, 3]. Could this method potentially be integrated with these approaches to enhance overall pruning effectiveness?
[1] Lu, et al. "Not All Experts are Equal: Efficient Expert Pruning and Skipping for Mixture-of-Experts Large Language Models." ACL 2024.
[2] Zhang, et al. "Diversifying the expert knowledge for task-agnostic pruning in sparse mixture-of-experts." arXiv preprint arXiv:2407.09590 (2024).
[3] Lee, Jaeseong, et al. "STUN: Structured-Then-Unstructured Pruning for Scalable MoE Pruning." arXiv preprint arXiv:2409.06211 (2024).

评论

Dear reviewer eqBL,

We genuinely appreciate your thorough review and constructive feedback! We have incorporated your suggestions into the revision to make the paper more compelling. Here are our responses to each question:

(1) The evaluation is restricted to the Mixtral models, raising questions about the method's scalability to other architectures like Qwen and DeepSeek.

Thank you for your suggestion. To address the lack of comprehensive comparisons, we have added average zero-shot performance on 9 evaluation tasks of pruned models using SparseGPT, Wanda, and MoE-Pruner. These comparisons include Mixtral-8x7B, MiniCPM-8x2B, DeepSeek-V2-Lite, and Qwen1.5-MoE-A2.7B models, all pruned to 50% unstructured sparsity:

ModelMethodARC-cARC-eBoolqHellaSwagMMLUOBQAPIQARTEWinoGrandeAverage
Mixtral-8x7BPretrained56.9184.4785.2964.7867.0335.0082.4370.4076.1669.16
Mixtral-8x7BSparseGPT (50%)50.4380.6884.6260.2061.7932.8081.1268.5976.1666.27
Mixtral-8x7BWanda (50%)51.0280.8985.0860.4562.7332.6080.9064.6474.8265.90
Mixtral-8x7BMoE-Pruner (50%)53.3381.8686.0262.2964.7633.6081.6166.0675.5367.23
MiniCPM-8x2BPretrained42.7576.2277.2856.4952.6329.0077.4875.8166.6161.58
MiniCPM-8x2BSparseGPT (50%)39.2573.4476.3653.1948.3528.0076.2264.6264.9658.26
MiniCPM-8x2BWanda (50%)40.4472.7374.7151.7045.7825.8076.0671.8461.4857.84
MiniCPM-8x2BMoE-Pruner (50%)40.8774.9274.7454.5948.8928.0076.6172.5664.5659.53
DeepSeek-V2-LitePretrained46.6778.2879.8858.6554.9434.2080.0361.3771.3562.81
DeepSeek-V2-LiteSparseGPT (50%)40.3673.7073.2750.3739.8529.0076.6658.1267.2556.51
DeepSeek-V2-LiteWanda (50%)41.6473.4471.8351.3639.8329.0077.5363.9066.9357.27
DeepSeek-V2-LiteMoE-Pruner (50%)44.6276.3078.5655.9249.7231.2078.6260.2970.3260.62
Qwen1.5-MoEPretrained41.8173.3279.8857.9861.2930.0080.0969.3168.9862.58
Qwen1.5-MoESparseGPT (50%)34.8168.9076.2449.8651.5525.2077.0955.9667.3256.33
Qwen1.5-MoEWanda (50%)33.0267.3075.1148.2650.3526.8075.3562.0965.8256.01
Qwen1.5-MoEMoE-Pruner (50%)39.6872.6078.4454.8857.6330.4078.7372.9266.9361.36
评论

We also add average zero-shot performance on 9 evaluation tasks of pruned models using SparseGPT, Wanda, NAEE, and MoE-Pruner. These comparisons include Mixtral-8x7B, MiniCPM-8x2B, DeepSeek-V2-Lite, and Qwen1.5-MoE-A2.7B models, all pruned to either 2:4 structured sparsity or 50% expert pruning:

ModelMethodARC-cARC-eBoolqHellaSwagMMLUOBQAPIQARTEWinoGrandeAverage
Mixtral-8x7BPretrained56.9184.4785.2964.7867.0335.0082.4370.4076.1669.16
Mixtral-8x7BSparseGPT (2:4)41.7274.9676.8553.2652.8628.6078.3566.4372.3854.73
Mixtral-8x7BWanda (2:4)41.5574.1276.6153.1952.2627.8077.0463.9070.4859.95
Mixtral-8x7BNAEE (r=4)48.3877.9980.5257.8147.6828.6078.6762.4573.1661.70
Mixtral-8x7BMoE-Pruner (2:4)47.8779.0079.5458.8662.1731.8079.4968.2374.2764.58
MiniCPM-8x2BPretrained42.7576.2277.2856.4952.6329.0077.4875.8166.6161.58
MiniCPM-8x2BSparseGPT (2:4)33.3669.0770.8047.9637.9621.4073.9957.7660.0652.48
MiniCPM-8x2BWanda (2:4)33.1163.3466.3042.3127.2319.6069.5959.5755.4148.50
MiniCPM-8x2BNAEE (r=4)33.2857.8767.2542.0423.3918.0068.3456.6856.8347.08
MiniCPM-8x2BMoE-Pruner (2:4)37.7171.0472.5451.6642.4224.2075.0870.4060.6256.19
DeepSeek-V2-LitePretrained46.6778.2879.8858.6554.9434.2080.0361.3771.3562.81
DeepSeek-V2-LiteSparseGPT (2:4)33.1966.6766.1544.1626.6524.6074.3251.2662.7549.97
DeepSeek-V2-LiteWanda (2:4)31.3163.9765.4441.8530.5323.2072.6948.0161.7248.75
DeepSeek-V2-LiteNAEE (r=32)*22.8741.3362.2636.2029.8920.6062.7953.0754.1442.57
DeepSeek-V2-LiteMoE-Pruner (2:4)40.0271.8976.6150.9443.8527.2076.2255.9667.6456.70
Qwen1.5-MoEPretrained41.8173.3279.8857.9861.2930.0080.0969.3168.9862.58
Qwen1.5-MoESparseGPT (2:4)28.4160.0668.6937.9932.6222.2072.3652.7158.5648.18
Qwen1.5-MoEWanda (2:4)28.4157.4563.4939.1228.6122.6071.4953.7962.9047.58
Qwen1.5-MoENAEE (r=30)*24.3243.9854.1034.3624.6819.2064.6455.2350.9141.27
Qwen1.5-MoEMoE-Pruner (2:4)29.1052.0269.1442.9938.1425.6070.5755.6059.1249.14
  • NAEE [1] uses an enumerate method for layer-wise expert pruning, so it only applies to the MoE model with 8 experts such as Mixtral-8x7B and MiniCPM-8x2B. For DeepSeek-V2-Lite and Qwen1.5-MoE, we use the random expert pruning.

The updated results demonstrate that MoE-Pruner consistently outperforms SparseGPT, Wanda, and NAEE across all models and tasks. For example, in zero-shot evaluation across nine tasks, MoE-Pruner achieves:

  • Better task generalization, as shown in DeepSeek-V2-Lite, where MoE-Pruner achieves an average score of 60.62 compared to SparseGPT's 56.51 and Wanda's 57.27 in 50% unstructured sparsity.
  • Higher average performance than SparseGPT, Wanda, and NAEE, particularly on comprehensive benchmarks like MMLU (Mixtral-8x7B: 67.03 → 62.17 vs. 47.68 for NAEE in structured sparsity).

We have also updated Table 4 and Table 5 for average zero-shot performance in our revised version.

评论

(2) The distilled step shows only minor improvements, as seen in Table 4. What could be the underlying reason for this limited gain?

As shown in Section 4.2, our distillation step improves the pruned student model performance with minimal computational budget. We only use 1000 samples from the C4 dataset and the training can be done in less than one hour. We followed Wanda’s [4] idea which enforces a limited computational budget during the fine-tuning stage to be computationally efficient while restoring pruned model performance effectively. Considering the limited computational budget, we are able to restore the performance of pruned MoE models by a non-trivial amount.

(3) This method builds incrementally on the baseline, Wanda, by incorporating gate weights within the MoE pruning framework.

Our method builds upon Wanda and extends it to MoE LLMs while maintaining the simplicity of Wanda's pruning metric. A key insight is the consideration of router weights (GateGate) in MoE architectures. Consider a simple Mixture-of-Experts with two experts and each with only one weight: y=Gate1w1x+Gate2w2xy=Gate_1 \cdot w_1\cdot x + Gate_2 \cdot w_2 \cdot x. If w1w2\vert w_1 \vert \leq \vert w_2 \vert, traditional pruning methods would remove w1w_1. However, in MoE architectures:

  • If Gate11Gate_1 \approx 1 and Gate2=0Gate_2 = 0, Gate1w1xGate2w2x\vert Gate_1 \cdot w_1 \cdot x \vert \gg \vert Gate_2 \cdot w_2 \cdot x \vert, making w2w_2 the correct choice for removal.

This motivating example shows that previous pruning methods for LLMs do not consider the importance of router weights which only exist in MoE architecture and may result in lower performance after pruning MoE. Therefore, we propose MoE-Pruner designed explicitly for MoE LLMs to handle such a limitation while maintaining the simplicity of Wanda's pruning metric.

Thank you for your suggestion, we have added a detailed motivation and analysis of our method in the revised version, section 3.2, line 212.

Some previous studies have focused on pruning entire experts, as seen in [1, 2, 3]. Could this method potentially be integrated with these approaches to enhance overall pruning effectiveness?

Yes, MoE-Pruner is compatible with expert-pruning methods and can complement them effectively:

  1. Integration with NAEE [1]:
  • NAEE minimizes reconstruction loss through an enumerative expert pruning approach. MoE-Pruner could enhance NAEE by using its router weight-aware metric to guide pruning.
  • NAEE is limited to architectures with few experts (e.g., Mixtral-8x7B and MiniCPM-8x2B). It cannot process DeepSeek-V2-Lite and Qwen1.5-MoE with 64 or more experts.
  1. Expert Merging (e.g., [2]):
  • Expert merging approaches like [2] focus on merging similar experts using a similarity matrix. MoE-Pruner’s router weights could guide the merging process by identifying underutilized experts.
  1. Integration with STUN [3]:
  • STUN reduces pruning complexity for models with many experts. MoE-Pruner could be combined with STUN’s structured-then-unstructured pruning for better scalability.

These integrations show that MoE-Pruner could enhance pruning efficiency and scalability.

If you have other questions, we are happy to answer.

References:

[1]. Xudong Lu, Qi Liu, Yuhui Xu, Aojun Zhou, Siyuan Huang, Bo Zhang, Junchi Yan, Hongsheng Li. Not All Experts are Equal: Efficient Expert Pruning and Skipping for Mixture-of-Experts Large Language Models. ACL 2024.

[2]. Zeliang Zhang, Xiaodong Liu, Hao Cheng, Chenliang Xu, Jianfeng Gao. Diversifying the Expert Knowledge for Task-Agnostic Pruning in Sparse Mixture-of-Experts. arXiv:2407.09590.

[3]. Jaeseong Lee, Seung-won Hwang, Aurick Qiao, Daniel F Campos, Zhewei Yao, Yuxiong He. STUN: Structured-Then-Unstructured Pruning for Scalable MoE Pruning. arXiv:2409.06211.

[4]. Mingjie Sun, Zhuang Liu, Anna Bair, J. Zico Kolter. A Simple and Effective Pruning Approach for Large Language Models. ICLR 2024.

评论

Thanks a lot for the authors's response. I think this well address my concerns. The improvement on various benchmarks is significant. While it is true that the proposed method is quite similar to Wanda, the adaptive modification based on the MoE structure truly brings another performance improvement, which is surprising to me. Thus, I raise my score to 6.

评论

Dear reviewer eqBL,

Thank you so much for your positive assessment and thoughtful response! We are delighted that our explanations and additional results addressed your concerns and demonstrated the value of our proposed method.

If you have any additional suggestions or questions, we would be more than happy to address them. Thank you again for your constructive feedback and for helping us improve the quality of our paper!

审稿意见
3

This work proposes MoE-Pruner, a pruning strategy for MoE based LLMs. MoE-Pruner uses the scores from the routers as signals to prune the experts and then performs an expert-wise distillation training to recover the performance. Experiments on Mixtral-8x7B and Mixtral-8x22B show that MoE-Pruner can outperform other pruning strategies for dense LLMs.

优点

  • Pruning MoE is an important and impactful research problem
  • The proposed method is conceptually simple yet can achieve encouraging results

缺点

  • Limited technical novelty and justification - MoE-Pruner is to be a simple extension of Wanda's formulation without extending any of its analyses to MoE. Similarly, the expert-wise knowledge distillation seems to be quite straightforward to extend from the standard knowledge distillation. Therefore, I consider the technical contribution of this work to be limited.
  • Limited evaluation - MoE-Pruner is only evaluated on Mixtral models, it would be helpful to test its robustness by considering other models such as DeepSeek-MoE or MiniCPM-MoE.
  • Complexity analysis - The paper does not provide a complexity analysis showing the pruning and inference speedup.
  • Poor presentation - The paper is poorly organized. Section 2 (Preliminaries) is too short while Sections 3.1 and 3.2 are essentially a literature review, serving the same purpose. Figure 1 does not clearly explain the method as the score S does not interact with other components in the figure.

问题

  • What is pruning and inference speedup of MoE-Pruner compared to other baselines?
  • How did the authors extend Wanda to MoE models, is it equivalent to setting Gatej=1Gate_j = 1 in MoE-Pruner?
  • The method is poorly motivated (only from L232-237). A deeper analysis (for example, Section 3, Wanda) is preferred.
评论

Dear reviewer zAPA,

Thank you for your thorough assessment and insightful reviews! We have carefully revised our manuscript based on your feedback. Below are our detailed responses to your comments and suggestions:

Limited technical novelty and justification - MoE-Pruner is to be a simple extension of Wanda's formulation without extending any of its analyses to MoE. Similarly, the expert-wise knowledge distillation seems to be quite straightforward to extend from the standard knowledge distillation. Therefore, I consider the technical contribution of this work to be limited.

Our method extends Wanda to Mixture-of-Experts (MoE) models while maintaining the simplicity of Wanda's pruning metric. This involves incorporating router weights into the pruning metric, a key feature unique to MoE architectures. The motivation and theoretical formulation of MoE-Pruner explicitly account for router weights, which are critical for determining expert contributions to model outputs.

Additionally, expert-wise knowledge distillation is specifically tailored for pruned MoE models. Unlike standard knowledge distillation, our method uses pretrained teacher models with identical architecture (same layers, experts, and hidden dimensions) to improve performance retention post-pruning. To the best of our knowledge, this is the first work to introduce expert-wise knowledge distillation for MoE models.

Limited evaluation - MoE-Pruner is only evaluated on Mixtral models, it would be helpful to test its robustness by considering other models such as DeepSeek-MoE or MiniCPM-MoE.

Thank you for your suggestion. To address the lack of comprehensive comparisons, we have added average zero-shot performance on 9 evaluation tasks of pruned models using SparseGPT, Wanda, NAEE, and MoE-Pruner. These comparisons include Mixtral-8x7B, MiniCPM-8x2B, DeepSeek-V2-Lite, and Qwen1.5-MoE-A2.7B models, all pruned to 50% unstructured sparsity:

ModelMethodARC-cARC-eBoolqHellaSwagMMLUOBQAPIQARTEWinoGrandeAverage
Mixtral-8x7BPretrained56.9184.4785.2964.7867.0335.0082.4370.4076.1669.16
Mixtral-8x7BSparseGPT (50%)50.4380.6884.6260.2061.7932.8081.1268.5976.1666.27
Mixtral-8x7BWanda (50%)51.0280.8985.0860.4562.7332.6080.9064.6474.8265.90
Mixtral-8x7BMoE-Pruner (50%)53.3381.8686.0262.2964.7633.6081.6166.0675.5367.23
MiniCPM-8x2BPretrained42.7576.2277.2856.4952.6329.0077.4875.8166.6161.58
MiniCPM-8x2BSparseGPT (50%)39.2573.4476.3653.1948.3528.0076.2264.6264.9658.26
MiniCPM-8x2BWanda (50%)40.4472.7374.7151.7045.7825.8076.0671.8461.4857.84
MiniCPM-8x2BMoE-Pruner (50%)40.8774.9274.7454.5948.8928.0076.6172.5664.5659.53
DeepSeek-V2-LitePretrained46.6778.2879.8858.6554.9434.2080.0361.3771.3562.81
DeepSeek-V2-LiteSparseGPT (50%)40.3673.7073.2750.3739.8529.0076.6658.1267.2556.51
DeepSeek-V2-LiteWanda (50%)41.6473.4471.8351.3639.8329.0077.5363.9066.9357.27
DeepSeek-V2-LiteMoE-Pruner (50%)44.6276.3078.5655.9249.7231.2078.6260.2970.3260.62
Qwen1.5-MoEPretrained41.8173.3279.8857.9861.2930.0080.0969.3168.9862.58
Qwen1.5-MoESparseGPT (50%)34.8168.9076.2449.8651.5525.2077.0955.9667.3256.33
Qwen1.5-MoEWanda (50%)33.0267.3075.1148.2650.3526.8075.3562.0965.8256.01
Qwen1.5-MoEMoE-Pruner (50%)39.6872.6078.4454.8857.6330.4078.7372.9266.9361.36
评论

We also add average zero-shot performance on 9 evaluation tasks of pruned models using SparseGPT, Wanda, NAEE, and MoE-Pruner. These comparisons include Mixtral-8x7B, MiniCPM-8x2B, DeepSeek-V2-Lite, and Qwen1.5-MoE-A2.7B models, all pruned to either 2:4 structured sparsity or 50% expert pruning:

ModelMethodARC-cARC-eBoolqHellaSwagMMLUOBQAPIQARTEWinoGrandeAverage
Mixtral-8x7BPretrained56.9184.4785.2964.7867.0335.0082.4370.4076.1669.16
Mixtral-8x7BSparseGPT (2:4)41.7274.9676.8553.2652.8628.6078.3566.4372.3854.73
Mixtral-8x7BWanda (2:4)41.5574.1276.6153.1952.2627.8077.0463.9070.4859.95
Mixtral-8x7BNAEE (r=4)48.3877.9980.5257.8147.6828.6078.6762.4573.1661.70
Mixtral-8x7BMoE-Pruner (2:4)47.8779.0079.5458.8662.1731.8079.4968.2374.2764.58
MiniCPM-8x2BPretrained42.7576.2277.2856.4952.6329.0077.4875.8166.6161.58
MiniCPM-8x2BSparseGPT (2:4)33.3669.0770.8047.9637.9621.4073.9957.7660.0652.48
MiniCPM-8x2BWanda (2:4)33.1163.3466.3042.3127.2319.6069.5959.5755.4148.50
MiniCPM-8x2BNAEE (r=4)33.2857.8767.2542.0423.3918.0068.3456.6856.8347.08
MiniCPM-8x2BMoE-Pruner (2:4)37.7171.0472.5451.6642.4224.2075.0870.4060.6256.19
DeepSeek-V2-LitePretrained46.6778.2879.8858.6554.9434.2080.0361.3771.3562.81
DeepSeek-V2-LiteSparseGPT (2:4)33.1966.6766.1544.1626.6524.6074.3251.2662.7549.97
DeepSeek-V2-LiteWanda (2:4)31.3163.9765.4441.8530.5323.2072.6948.0161.7248.75
DeepSeek-V2-LiteNAEE (r=32)*22.8741.3362.2636.2029.8920.6062.7953.0754.1442.57
DeepSeek-V2-LiteMoE-Pruner (2:4)40.0271.8976.6150.9443.8527.2076.2255.9667.6456.70
Qwen1.5-MoEPretrained41.8173.3279.8857.9861.2930.0080.0969.3168.9862.58
Qwen1.5-MoESparseGPT (2:4)28.4160.0668.6937.9932.6222.2072.3652.7158.5648.18
Qwen1.5-MoEWanda (2:4)28.4157.4563.4939.1228.6122.6071.4953.7962.9047.58
Qwen1.5-MoENAEE (r=30)*24.3243.9854.1034.3624.6819.2064.6455.2350.9141.27
Qwen1.5-MoEMoE-Pruner (2:4)29.1052.0269.1442.9938.1425.6070.5755.6059.1249.14
  • NAEE [1] uses an enumerate method for layer-wise expert pruning, so it only applies to the MoE model with 8 experts such as Mixtral-8x7B and MiniCPM-8x2B. For DeepSeek-V2-Lite and Qwen1.5-MoE, we use the random expert pruning.

The updated results demonstrate that MoE-Pruner consistently outperforms SparseGPT, Wanda, and NAEE across all models and tasks. For example, in zero-shot evaluation across nine tasks, MoE-Pruner achieves:

  • Better task generalization, as shown in DeepSeek-V2-Lite, where MoE-Pruner achieves an average score of 60.62 compared to SparseGPT's 56.51 and Wanda's 57.27 in 50% unstructured sparsity.
  • Higher average performance than SparseGPT, Wanda, and NAEE, particularly on comprehensive benchmarks like MMLU (Mixtral-8x7B: 67.03 → 62.17 vs. 47.68 for NAEE in structured sparsity).

We have also updated Table 4 and Table 5 for average zero-shot performance in our revised version.

评论

Complexity analysis - The paper does not provide a complexity analysis showing the pruning and inference speedup.

We conduct an efficiency evaluation experiment on memory reduction and inference speedup using the A100 GPU. To provide a comprehensive comparison, we also evaluated the NAEE [1] expert pruning method. Comparison results are shown in the table below. Our proposed MoE-Pruner method at the structured 2:4 sparsity pattern outperforms NAEE in terms of both average performance and inference speedup, while incurring only a small memory overhead for storing sparse tensor indices. The original average performance and memory of Mixtral-8x7B are 69.16 and 87.49GB, respectively. Speedup is measured according to the original Mixtral 8x7B baseline. The following table has been added to the Table 3 efficiency evaluation experiments in our revised version:

ModelMethodSparsityAverageMemory(GB)Speedup
Mixtral-8x7BNAEE[1]r=461.6945.491.06×
Mixtral-8x7BMoE-Pruner2:464.5850.741.14×

Poor presentation - The paper is poorly organized. Section 2 (Preliminaries) is too short while Sections 3.1 and 3.2 are essentially a literature review, serving the same purpose. Figure 1 does not clearly explain the method as the score S does not interact with other components in the figure.

We have restructured the manuscript as follows:

  • Section 2 (Preliminaries): Expanded to include details on MoE initialization methods, including sparse upcycling initialization [2], and its relevance to MoE pruning.
  • Section 3 (Methodology): Streamlined to focus on MoE-Pruner’s formulation and motivation. We included a detailed motivating example that demonstrates how router weights influence pruning decisions in MoE architectures.
  • Figure 1: Removed to avoid redundancy. Instead, we emphasize how the pruning metric (SijS_{ij}) directly interacts with other components.

What is pruning and inference speedup of MoE-Pruner compared to other baselines?

Please refer to our response to weakness 3 for the efficiency evaluation experiment about memory reduction and inference speedup.

How did the authors extend Wanda to MoE models, is it equivalent to setting Gate_j=1 in MoE-Pruner?

Yes, if we set Gate value for each expert to be 1 in MoE-Pruner, then our method becomes the same as Wanda.

The method is poorly motivated (only from L232-237). A deeper analysis (for example, Section 3, Wanda) is preferred.

Our method builds upon Wanda and extends it to MoE LLMs while maintaining the simplicity of Wanda's pruning metric. A key insight is the consideration of router weights (GateGate) in MoE architectures. Consider a simple Mixture-of-Experts with two experts and each with only one weight: y=Gate1w1x+Gate2w2xy=Gate_1 \cdot w_1 \cdot x + Gate_2 \cdot w_2 \cdot x. If w1w2\vert w_1 \vert \leq \vert w_2 \vert, traditional pruning methods would remove w1w_1. However, in MoE architectures:

  • If Gate11Gate_1 \approx 1 and Gate2=0Gate_2 = 0, Gate1w1xGate2w2x \vert Gate_1 \cdot w_1 \cdot x \vert \gg \vert Gate_2 \cdot w_2 \cdot x \vert, making w2w_2 the correct choice for removal.

This motivating example shows that previous pruning methods for LLMs do not consider the importance of router weights which only exist in MoE architecture and may result in lower performance after pruning MoE. Therefore, we propose MoE-Pruner designed explicitly for MoE LLMs to handle such a limitation while maintaining the simplicity of Wanda's pruning metric.

Thank you for your suggestion, we have added a detailed motivation and analysis of our method in the revised version, section 3.2, line 212.

If you have other questions, we are happy to answer.

References

[1]. Xudong Lu, Qi Liu, Yuhui Xu, Aojun Zhou, Siyuan Huang, Bo Zhang, Junchi Yan, Hongsheng Li. Not All Experts are Equal: Efficient Expert Pruning and Skipping for Mixture-of-Experts Large Language Models. ACL 2024.

[2] Aran Komatsuzaki, Joan Puigcerver, James Lee-Thorp, Carlos Riquelme Ruiz, Basil Mustafa, Joshua Ainslie, Yi Tay, Mostafa Dehghani, Neil Houlsby. Sparse Upcycling: Training Mixture-of-Experts from Dense Checkpoints. ICLR 2023.

评论

Dear Reviewer zAPA,

Thank you once again for your time and thoughtful feedback on our submission. We hope that our responses to your comments have addressed your concerns.

As the rebuttal phase is nearing its conclusion, we wanted to kindly follow up to check if there are any additional questions that you would like us to clarify. Thank you again for your time and effort in reviewing our paper!

审稿意见
3

The paper proposes a pruning method specifically designed for Mixture-of-Expert (MoE) models. It uses the Gate values from the MoE router to enhance weight importance evaluation during pruning. Additionally, it introduces an expert-wise approach for knowledge distillation to improve the performance of the pruned model.

优点

  1. New Insights: The paper provides valuable insights into how expert initialization methods influence final load balance and similarities between experts.

  2. Perplexity Performance Improvements: The proposed method leverages gate values in MoE to enhance the performance of pruned models, achieving perplexity improvements over previous methods designed for general transformer-based LLMs.

缺点

  1. Efficiency Evaluation: The paper lacks an evaluation of the proposed method’s efficiency improvements, such as wall-clock speedup or memory reduction.

  2. Limited Technical Contribution: Pruning weights in the least-activated expert appears intuitive, yet it’s unclear how the method addresses potential drawbacks. For instance, which specific capabilities are impacted by this pruning? Does the improved performance on tested tasks come at the cost of decreased performance on other rare but crucial tasks?

  3. Unclear Contribution of Gate Value Insights: While the paper discusses gate value differences between two MoE initialization methods, it doesn’t clarify how these insights inform the pruning method’s design. Additionally, a brief definition of sparse upcycling initialization in related work would be helpful, as it is repeatedly referenced in later discussions.

  4. Writing and Support for Claims: Some technical claims lack proper references or justification. For example, the statement “MoE mitigates catastrophic forgetting in continual learning” (Line 44, Introduction) is not supported by references. Similarly, the claim that “expert activation frequency is task-agnostic” (Line 161, Methodology) seems conclusive, yet the paper does not provide corresponding experimental or logical evidence.

问题

  1. What is the runtime efficiency of the proposed method?

  2. What is the maximum sparsity that the proposed method can achieve without incurring significant perplexity loss? Could you provide performance comparisons under moderate losses, such as a 10% perplexity increase compared to the dense model? The perplexity loss at 50% density appears a bit high for both the proposed method and baselines.

评论

Dear reviewer nNCF,

Thank you for taking the time to provide us with a thorough review and valuable suggestions. We are eager to respond to your questions and comments:

  1. Efficiency Evaluation: The paper lacks an evaluation of the proposed method’s efficiency improvements, such as wall-clock speedup or memory reduction.

We conduct an efficiency evaluation experiment on memory reduction and inference speedup using the A100 GPU. To provide a comprehensive comparison, we also evaluated the NAEE [1] expert pruning method. Comparison results are shown in the table below. Our proposed MoE-Pruner method at the structured 2:4 sparsity pattern outperforms NAEE in terms of both average performance and inference speedup, while incurring only a small memory overhead for storing sparse tensor indices. The original average performance and memory of Mixtral-8x7B are 69.16 and 87.49GB, respectively. Speedup is measured according to the original Mixtral 8x7B baseline. The following table has been added to the Table 3 efficiency evaluation experiments in our revised version:

ModelMethodSparsityAverageMemory(GB)Speedup
Mixtral-8x7BNAEE[1]r=461.6945.491.06×
Mixtral-8x7BMoE-Pruner2:464.5850.741.14×
  1. Limited Technical Contribution: Pruning weights in the least-activated expert appears intuitive, yet it’s unclear how the method addresses potential drawbacks. For instance, which specific capabilities are impacted by this pruning? Does the improved performance on tested tasks come at the cost of decreased performance on other rare but crucial tasks?

In our study, we tested pruned model performance across 9 zero-shot benchmarks. Comparisons with weight pruning methods (SparseGPT and Wanda) and expert pruning method (NAEE [1]) show that MoE-Pruner achieves superior average performance. While all methods exhibit slight performance drops on individual benchmarks, MoE-Pruner preserves model capabilities better.

  • NAEE [1], for example, shows significant performance drops on HellaSwag and MMLU, indicating the loss of critical capabilities.
  • In contrast, MoE-Pruner exhibits consistent performance across tasks, balancing the trade-off between pruning and maintaining task diversity.
  1. Unclear Contribution of Gate Value Insights: While the paper discusses gate value differences between two MoE initialization methods, it doesn’t clarify how these insights inform the pruning method’s design. Additionally, a brief definition of sparse upcycling initialization in related work would be helpful, as it is repeatedly referenced in later discussions.

Our method builds upon Wanda and extends it to MoE LLMs while maintaining the simplicity of Wanda's pruning metric. A key insight is the consideration of router weights (GateGate) in MoE architectures. Consider a simple Mixture-of-Experts with two experts and each with only one weight: y=Gate1w1x+Gate2w2xy=Gate_1 \cdot w_1 \cdot x + Gate_2 \cdot w_2 \cdot x. If w1w2\vert w_1 \vert \leq \vert w_2 \vert, traditional pruning methods would remove w1w_1. However, in MoE architectures:

  • If Gate11Gate_1 \approx 1 and Gate2=0Gate_2 = 0, Gate1w1xGate2w2x \vert Gate_1 \cdot w_1 \cdot x \vert \gg \vert Gate_2 \cdot w_2 \cdot x \vert, making w2w_2 the correct choice for removal.

This motivating example shows that previous pruning methods for LLMs do not consider the importance of router weights which only exist in MoE architecture and may result in lower performance after pruning MoE. Therefore, we propose MoE-Pruner designed explicitly for MoE LLMs to handle such a limitation while maintaining the simplicity of Wanda's pruning metric.

Thanks for your suggestions of adding the definition of sparse upcycling initialization.

  • To clarify sparse upcycling initialization: it starts from a dense checkpoint, with each new MoE expert layer initialized as a copy of the original MLP layer, excluding the MoE router [2].
  • This clarification has been added to Section 2, line 98, in the revised paper.
  1. Writing and Support for Claims: Some technical claims lack proper references or justification. For example, the statement “MoE mitigates catastrophic forgetting in continual learning” (Line 44, Introduction) is not supported by references. Similarly, the claim that “expert activation frequency is task-agnostic” (Line 161, Methodology) seems conclusive, yet the paper does not provide corresponding experimental or logical evidence.
  • For the statement "MoE mitigates catastrophic forgetting in continual learning" (Line 44, Introduction), we have added references [2] and [3] in our revised version.
  • We use samples from the pre-training dataset C4 as calibration data, since pre-training datasets are often more comprehensive and not dominated by knowledge specific to any particular domain [1].
评论
  1. What is the runtime efficiency of the proposed method?

Please see our response to weakness 1, which includes detailed evaluations of memory reduction and inference speedup.

  1. What is the maximum sparsity that the proposed method can achieve without incurring significant perplexity loss? Could you provide performance comparisons under moderate losses, such as a 10% perplexity increase compared to the dense model? The perplexity loss at 50% density appears a bit high for both the proposed method and baselines.

We add the pruning perplexity results comparisons under moderate losses. For a 10% perplexity increase, the unstructured pruning sparsity is usually about 40%. For structured pruning, we find that a 1:4 pruning pattern could have a moderate loss. We compare MoE-Pruner with SparseGPT and Wanda at the same level of pruning ratios and it clearly shows that MoE-Pruner outperforms SparseGPT and Wanda on all levels of pruning ratios:

ModelMethodSparsityPerplexity ↓SparsityPerplexity ↓
Mixtral-8x7BPretrained-3.84-3.84
Mixtral-8x7BSparseGPT (40%)40%4.401:44.28
Mixtral-8x7BWanda (40%)40%4.331:44.25
Mixtral-8x7BMoE-Pruner (Ours, 40%)40%4.201:44.14
Mixtral-8x7B-InstructPretrained-4.14-4.14
Mixtral-8x7B-InstructSparseGPT (40%)40%4.601:44.51
Mixtral-8x7B-InstructWanda (40%)40%4.571:44.49
Mixtral-8x7B-InstructMoE-Pruner (Ours, 40%)40%4.481:44.41

We also update Table 2 perplexity results in our revised version.

If you have other questions, we are happy to answer.

References:

[1]. Xudong Lu, Qi Liu, Yuhui Xu, Aojun Zhou, Siyuan Huang, Bo Zhang, Junchi Yan, Hongsheng Li. Not All Experts are Equal: Efficient Expert Pruning and Skipping for Mixture-of-Experts Large Language Models. ACL 2024.

[2] Aran Komatsuzaki, Joan Puigcerver, James Lee-Thorp, Carlos Riquelme Ruiz, Basil Mustafa, Joshua Ainslie, Yi Tay, Mostafa Dehghani, Neil Houlsby. Sparse Upcycling: Training Mixture-of-Experts from Dense Checkpoints. ICLR 2023.

[3]. Mark Collier, Efi Kokiopoulou, Andrea Gesmundo, Jesse Berent. Routing networks with co-training for continual learning. arXiv:2009.04381.

评论

Thank you for addressing my questions regarding reference clarity and experiments with reduced perplexity loss. However, the following points could further improve the paper:

Response 1: The reported speedup (1.14x) seems minor given the significant performance drop (5%). Additionally, the benchmark used in the table is unclear. Is such a performance drop acceptable in this context?

Response 3: I would still recommand the author to explicitly clarify how the observed "differences between two MoE initialization methods" incluence the pruning method's design. Otherwise, the two main contents of the paper seem a little disconnected in their current form.

评论

Response 3: I would still recommend the author to explicitly clarify how the observed "differences between two MoE initialization methods" influence the pruning method's design. Otherwise, the two main contents of the paper seem a little disconnected in their current form.

Thank you for this insightful observation. In our experiments, we observed that router weights (Gate values) differ significantly based on the MoE initialization method:

  • The router weights (Gate) in an upcycled model (e.g. Mixtral-8x7B) are not fully optimized in the MoE because they do not exist in the dense checkpoint and are only added after sparse upcycling.
  • The router weights in MoE model trained from scratch (e.g. DeepSeek-V2-Lite) are fully optimized during training, providing more reliable indicators of expert utilization and importance.

By explicitly considering how the MoE initialization method affects the distribution and reliability of router and expert weights, we design a universal pruning metric that is adaptive to these differences:

  • For sparse upcycled models, the pruning method compensates for less reliable router weights by focusing on the inherent importance of expert weights and prevents the potential loss of valuable weights that might be mistakenly pruned due to under-optimized router weights.
  • For models trained from scratch, the pruning method takes full advantage of reliable router weights to make more informed pruning decisions and results in a more effective pruning process that maintains model performance by preserving critical experts and weights.

We acknowledge that our paper did not sufficiently clarify this connection, leading to a disconnection between the MoE initialization methods and the pruning metric design. We will revise section 3.2 to explicitly discuss how MoE initialization methods impact router weight reliability and influence pruning design and add experimental results demonstrating how our pruning method performs on models initialized via both methods, highlighting the adaptations made for each case.

评论

Thank you for looking into our rebuttal and providing insightful suggestions to improve our paper quality. Here are our response to your followup questions:

Response 1: The reported speedup (1.14x) seems minor given the significant performance drop (5%). Additionally, the benchmark used in the table is unclear. Is such a performance drop acceptable in this context?

The performance drop reported (from 69.16 to 64.58) reflects the results after one-shot structured pruning without fine-tuning. To address this, our paper proposes expert-wise knowledge distillation to recover pruned model performance using the pretrained MoE model with a limited compute budget. After applying this distillation (using 1,000 samples and training in less than one hour), the pruned model achieves a significantly improved average performance of 67.07, narrowing the gap to the original model.

The 1.14× speedup was based on PyTorch 2.4.1, which only supports the CUTLASS backend for sparse tensor computations. With PyTorch 2.5.0 and the newly supported cuSPARSELt backend, the speedup improves to 1.31×, offering a more substantial inference efficiency gain. We provide the updated table reflecting these results:

ModelMethodSparsityAverageMemory(GB)Speedup
Mixtral-8x7BPretrained-69.1687.49GB1.00×
Mixtral-8x7BNAEEr=461.6945.49GB1.06×
Mixtral-8x7BMoE-Pruner2:4 (CUTLASS)64.5850.74GB1.14×
Mixtral-8x7BMoE-Distilled2:4 (CUTLASS)67.0750.74GB1.14×
Mixtral-8x7BMoE-Pruner2:4 (cuSPARSELt)64.5850.74GB1.31×
Mixtral-8x7BMoE-Distilled2:4 (cuSPARSELt)67.0750.74GB1.31×

The benchmark is the same as the average zero-shot performance on 9 evaluation tasks we used in the paper: ARC-challenge, ARC-easy, Boolq, HellaSwag, MMLU, OpenBookQA (OBQA), PIQA, RTE, and WinoGrande. We also list the zero-shot performance below:

ModelMethodARC-cARC-eBoolqHellaSwagMMLUOBQAPIQARTEWinoGrandeAverage
Mixtral-8x7BPretrained56.9184.4785.2964.7867.0335.0082.4370.4076.1669.16
Mixtral-8x7BNAEE (r=4)48.3877.9980.5257.8147.6828.6078.6762.4573.1661.69
Mixtral-8x7BMoE-Pruner (2:4)47.8779.0079.5458.8662.1731.8079.4968.2374.2764.58
Mixtral-8x7BMoE-Distilled (2:4)51.7181.2284.5264.2163.5433.8081.2868.3574.9867.07

To summarize, the performance drop after pruning (69.16 to 64.58) can be mitigated by our expert-wise knowledge distillation, achieving 67.07 performance. With additional data and compute resources, we anticipate further narrowing the gap to the pretrained model’s performance.

审稿意见
5

In this paper, the authors propose a simple and effective pruning method for MoE models. Specifically, (1) the authors prune model weights based on the sensitivity criterion derived from the MoE gate outputs in each transformer block; (2) they further use a distillation method to recover task performance of the pruned model. Experimental results show that on zero-shot and language modeling datasets, the proposed method outperforms existing weight pruning methods in terms of algorithm performance.

优点

  1. The authors propose a simple yet effective MoE pruning method that can be easily applied to various existing MoE models, achieving notable performance improvements.
  2. The authors provide a detailed ablation study of each component and hyperparameter, clearly demonstrating the role of each component and the sensitivity to hyperparameters.

缺点

  1. Equations lack detailed explanation.

    • For equations 7, 8, and 9, what do i and j stand for? Please describe in detail which dimension in each tensor corresponds to i and j. By the way, I also notice that in equation 9, the authors use S instead of S_{i,j} to represent the sensitivity metric. Is this a typo?

    • For equation 10, is cross entropy the global next token prediction loss or the local cross entropy loss for the MoE gate?

  2. Algorithm 1 needs detailed explanation. In line 251, the authors mentioned that "Algorithm 1 presents the unstructured sparsity version of our MoE-Pruner algorithm". I don’t understand where "unstructured" is reflected. Is it that the weights of the experts are unstructured? Does the weight WWW represent all experts or just one expert? Also, which linear layer in SwiGLU does the weight WWW correspond to?

  3. The experimental comparisons are not comprehensive. In the Introduction, the authors mention various issues with expert merging and expert pruning. However, in the experimental section, they do not compare their method with any expert merging or pruning methods [1,2,3]. The authors need to provide some comparative data and analysis to demonstrate whether their proposed method is truly SOTA.

[1] Liu et al., Efficient expert pruning for sparse mixture-of-experts language models: Enhancing performance and reducing inference costs

[2] Lu et al., Not All Experts are Equal: Efficient Expert Pruning and Skipping for Mixture-of-Experts Large Language Models

[3] Muzio et al., SEER-MoE: Sparse Expert Efficiency through Regularization for Mixture-of-Experts

问题

  1. In line 154, the authors mentioned that upcycling initialization will lead to higher expert similarity in MoE models. Since the similarity between experts is relatively high, pruning experts should theoretically not result in a significant performance drop. Why do the authors reach the opposite conclusion?
  2. In line 158, the authors mentioned that train from stratch will show imbalanced expert activation frequency, indicating that least-used expert pruning could help compress model size and not bring performance degradation. However, I believe this may be task-dependent; these seemingly least-used experts could be very useful for specific tasks such as math or coding. Did the authors conduct any related validation?
评论

Dear reviewer qxdo,

We really appreciate your thorough and constructive feedback. We have taken your suggestions to heart and made changes to the best of our abilities. We respond to your questions and comments:

1.1 For equations 7, 8, and 9, what do i and j stand for? Please describe in detail which dimension in each tensor corresponds to i and j. By the way, I also notice that in equation 9, the authors use S instead of S_{i,j} to represent the sensitivity metric. Is this a typo?

For equations 7, 8, and 9, the ii and jj stands for output feature and input feature dimension, respectively. Thank you for pointing out the use of SS and SijS_{ij}. We have revised all equations of pruning metric to SijS_{ij} in the revised version for better clarity.

1.2 For equation 10, is cross entropy the global next token prediction loss or the local cross entropy loss for the MoE gate?

For equation 10, the first cross entropy loss is the global token-level cross-entropy loss for next-token prediction tasks, while the second term refers to the expert-wise knowledge distillation loss, computed as the summation of each expert’s local MSE loss.

  1. Algorithm 1 needs detailed explanation. In line 251, the authors mentioned that "Algorithm 1 presents the unstructured sparsity version of our MoE-Pruner algorithm". I don’t understand where "unstructured" is reflected. Is it that the weights of the experts are unstructured? Does the weight WWW represent all experts or just one expert? Also, which linear layer in SwiGLU does the weight WWW correspond to?
  • For algorithm 1, the unstructured sparsity refers to the fact that the locations of pruned weights are not constrained. In our experiment, we target each linear layer output neuron WiW_i to be 50% sparse, which ensures each weight tensor WijW_{ij} is also 50% sparse. For 2:4 semi structured sparsity, we prune 2 weight elements out of 4 consecutive weight elements in the output neuron WiW_i, which adds more constraints. As you can see in Algorithm 1 line 8, we set each output neuron WiW_i that has dcold_{col} weight elements to be p% sparse. The pruning results are pruned expert weights.

  • Sorry we do not have weight WWW in Algorithm 1. If you mean line 9: WMWW \gets M \odot W. We apply the pruning mask MM (with 0 for pruning and 1 remaining) to the weights WW and get the final pruned weights. Yes, we target every expert weight.

  • For all MoE models which uses SwiGLU architecture, we prune 50% for all three weights, including gate_proj, up_proj, and down_proj.

评论
  1. The experimental comparisons are not comprehensive. In the Introduction, the authors mention various issues with expert merging and expert pruning. However, in the experimental section, they do not compare their method with any expert merging or pruning methods [1,2,3]. The authors need to provide some comparative data and analysis to demonstrate whether their proposed method is truly SOTA.

Certainly. To address the lack of comprehensive comparisons, we have added average zero-shot performance on 9 evaluation tasks of pruned models using SparseGPT, Wanda, NAEE [2], and MoE-Pruner. These comparisons include Mixtral-8x7B, MiniCPM-8x2B, DeepSeek-V2-Lite, and Qwen1.5-MoE-A2.7B models, all pruned to either 2:4 structured sparsity or 50% expert pruning:

ModelMethodARC-cARC-eBoolqHellaSwagMMLUOBQAPIQARTEWinoGrandeAverage
Mixtral-8x7BPretrained56.9184.4785.2964.7867.0335.0082.4370.4076.1669.16
Mixtral-8x7BSparseGPT (2:4)41.7274.9676.8553.2652.8628.6078.3566.4372.3854.73
Mixtral-8x7BWanda (2:4)41.5574.1276.6153.1952.2627.8077.0463.9070.4859.95
Mixtral-8x7BNAEE (r=4)48.3877.9980.5257.8147.6828.6078.6762.4573.1661.70
Mixtral-8x7BMoE-Pruner (2:4)47.8779.0079.5458.8662.1731.8079.4968.2374.2764.58
MiniCPM-8x2BPretrained42.7576.2277.2856.4952.6329.0077.4875.8166.6161.58
MiniCPM-8x2BSparseGPT (2:4)33.3669.0770.8047.9637.9621.4073.9957.7660.0652.48
MiniCPM-8x2BWanda (2:4)33.1163.3466.3042.3127.2319.6069.5959.5755.4148.50
MiniCPM-8x2BNAEE (r=4)33.2857.8767.2542.0423.3918.0068.3456.6856.8347.08
MiniCPM-8x2BMoE-Pruner (2:4)37.7171.0472.5451.6642.4224.2075.0870.4060.6256.19
DeepSeek-V2-LitePretrained46.6778.2879.8858.6554.9434.2080.0361.3771.3562.81
DeepSeek-V2-LiteSparseGPT (2:4)33.1966.6766.1544.1626.6524.6074.3251.2662.7549.97
DeepSeek-V2-LiteWanda (2:4)31.3163.9765.4441.8530.5323.2072.6948.0161.7248.75
DeepSeek-V2-LiteNAEE (r=32)*22.8741.3362.2636.2029.8920.6062.7953.0754.1442.57
DeepSeek-V2-LiteMoE-Pruner (2:4)40.0271.8976.6150.9443.8527.2076.2255.9667.6456.70
Qwen1.5-MoEPretrained41.8173.3279.8857.9861.2930.0080.0969.3168.9862.58
Qwen1.5-MoESparseGPT (2:4)28.4160.0668.6937.9932.6222.2072.3652.7158.5648.18
Qwen1.5-MoEWanda (2:4)28.4157.4563.4939.1228.6122.6071.4953.7962.9047.58
Qwen1.5-MoENAEE (r=30)*24.3243.9854.1034.3624.6819.2064.6455.2350.9141.27
Qwen1.5-MoEMoE-Pruner (2:4)29.1052.0269.1442.9938.1425.6070.5755.6059.1249.14
  • NAEE [2] uses an enumerate method for layer-wise expert pruning, so it only applies to the MoE model with 8 experts such as Mixtral-8x7B and MiniCPM-8x2B. For DeepSeek-V2-Lite and Qwen1.5-MoE, we use the random expert pruning.

[3] does not provide code or model for comparison. [1] uses a different framework and only releases weights for Mixtral-8x7B-Instruct and we only share two same evaluation datasets: Boolq and RTE. However, the reported results in [1] for Mixtral-8x7B-Instruct on Boolq is 73.2. While NAEE [2] and our tested results both report 88.5. Thus we may not be able to compare our results with [1].

评论

(Continued response to weakness 3)

Compared with the expert pruning method NAEE [2], our method shows much higher average performance across all four MoE models at 50% structured sparsity. Especially if you look at the MMLU performance, which is the most comprehensive benchmark we used, expert pruning results in a very large performance degradation (Mixtral-8x7B 67.03 to 47.68, MiniCPM-8x2B 56.23 to 23.39), while our method shows a moderate loss (Mixtral-8x7B 67.03 to 62.17, MiniCPM-8x2B 56.23 to 42.42).

  1. In line 154, the authors mentioned that upcycling initialization will lead to higher expert similarity in MoE models. Since the similarity between experts is relatively high, pruning experts should theoretically not result in a significant performance drop. Why do the authors reach the opposite conclusion?

This is a very good and interesting question. Sparse upcycled MoE models start from the same expert weight and have a higher similarity between experts. Pruning experts seem to have a lower performance drop. However, as demonstrated in our experiments (Table above), expert pruning results in severe degradation (e.g., Mixtral-8x7B MMLU: 67.03 → 47.68), while our 2:4 structured pruning exhibits a much smaller loss (67.03 → 62.17).

The reason is that sparse upcycled MoE models usually use a smaller number of experts (e.g. 8 experts) and have a more uniform expert activation frequency. If we consider a top-2 activation method with 8 experts, then each expert will process 25% of the input tokens. Pruning half of the expert will result in severe performance drop. Our 2:4 structured pruning tries to preserve each expert performance while maintaining a 50% structured sparsity. Experimental results show that our methods achieve better performance on sparse upcycled MoE models compared with expert pruning method.

  1. In line 158, the authors mentioned that train from scratch will show imbalanced expert activation frequency, indicating that least-used expert pruning could help compress model size and not bring performance degradation. However, I believe this may be task-dependent; these seemingly least-used experts could be very useful for specific tasks such as math or coding. Did the authors conduct any related validation?

Thank you for your insightful suggestion. For a model trained from scratch, we use DeepSeek-V2-Lite and test its performance on a representative math datasets, GSM8K, with NAEE [2] and MoE-Pruner:

ModelMethodSparsityGSM8K(5-shot)Average Performance
DeepSeek-V2-LitePretrained-38.5162.81
DeepSeek-V2-LiteNAEE (Random expert pruning)r=320.9942.57
DeepSeek-V2-LiteMoE-Pruner2:49.1756.70

Results demonstrate that expert pruning (NAEE) causes a drastic performance drop (GSM8K: 38.51 → 0.99), while MoE-Pruner retains better performance (38.51 → 9.17). We use random expert pruning as NAEE [2] uses an enumerate method, so it only applies to the MoE model with a smaller number of experts, e.g. 8, but not 64. This large performance drop is also proven in the NAEE [2] paper Table 3, suggesting that expert pruning may be better for task-dependent setting or followup fine-tuning scenarios. We will incorporate this finding into our draft.

If you have other questions, we are happy to answer.

References:

[1]. Enshu Liu, Junyi Zhu, Zinan Lin, Xuefei Ning, Matthew B. Blaschko, Shengen Yan, Guohao Dai, Huazhong Yang, Yu Wang. Efficient Expert Pruning for Sparse Mixture-of-Experts Language Models: Enhancing Performance and Reducing Inference Costs. arXiv:2407.00945.

[2]. Xudong Lu, Qi Liu, Yuhui Xu, Aojun Zhou, Siyuan Huang, Bo Zhang, Junchi Yan, Hongsheng Li. Not All Experts are Equal: Efficient Expert Pruning and Skipping for Mixture-of-Experts Large Language Models. ACL 2024.

[3]. Alexandre Muzio, Alex Sun, Churan He. SEER-MoE: Sparse Expert Efficiency through Regularization for Mixture-of-Experts. arXiv:2404.05089.

评论

Thanks for the rebuttal and the additional experiments. I have a clearer understanding of the revised paper. However, I still have some concerns:

  1. Clarity Issues: There are still clarity problems in the paper that need to be addressed. For example, in Equation 9, the authors may use gate_k instead of gate to differentiate between different experts; otherwise, they do not correspond to gate_1 and gate_2 mentioned in line 218. Additionally, what do i and j represent in Equations 7 and 8? Do the i in Equations 7, 8, and 9 overlap with the i in Equation 1? Similar issues should be carefully reviewed and resolved.

  2. Method Design: The current method does capture an interesting point, but its overall method design remains relatively simple and not that effective (based on the experiments). For instance, there are many other intriguing approaches for 2:4 sparsity, such as channel permutation [1]. I suggest that the authors consider combining the gate value with other approaches, modeling the overall method as an optimization problem, which might result in a more solid method design and evaluation results. Furthermore, the distillation approach does not demonstrate significant differences compared to existing distillation methods. Could the lambda in Equation 10 be designed to depend on the gate scores?

  3. Experimental Results: Based on the current experimental results, the algorithm’s performance still falls significantly short of the FP16 model, particularly on challenging benchmarks like MMLU. The pruned Qwen1.5-MoE model exhibits an accuracy loss of over 20%. I suggest that the authors further refine the proposed methods to better align with the characteristics of MoE models, aiming to improve the performance.

[1] Pool, Jeff, and Chong Yu. "Channel permutations for n: m sparsity." Advances in neural information processing systems 34 (2021): 13316-13327.

评论

Experimental Results: Based on the current experimental results, the algorithm’s performance still falls significantly short of the FP16 model, particularly on challenging benchmarks like MMLU. The pruned Qwen1.5-MoE model exhibits an accuracy loss of over 20%. I suggest that the authors further refine the proposed methods to better align with the characteristics of MoE models, aiming to improve the performance.

As shown in the experimental results for Qwen1.5-MoE-A2.7B model with 2:4 structured sparsity or 50% expert pruning, our method MoE-Pruner outperforms all previous methods, such as SparseGPT, Wanda, and NAEE. The performance drop in MMLU and other benchmarks shows that this is a model-related scenario. As show in our paper Table 1 caption:

The only exception is Qwen-1.5-A2.7B, which is initialized with upcycling. But according to the report [3], its expert parameters are shuffled along the intermediate dimension to guarantee that each fine-grained expert exhibits unique characteristics.

We reinvestigated this Qwen1.5-MoE-A2.7B model (4 shared experts and 60 routed experts) and found that pruning the shared expert results in severe performance drop, while preserving the shared expert will improve the pruned model performance by a large margin. The shared expert contributes to 6% of model parameters, which means that for 50% sparsity, if we keep the shared expert, our method only loses 3% sparsity but improves the model performance by more than 10% and especially on MMLU by more than 18%. We list the average zero-shot performance of pruned models while keeping the shared expert:

ModelMethodARC-cARC-eBoolqHellaSwagMMLUOBQAPIQARTEWinoGrandeAverage
Qwen1.5-MoE-A2.7BPretrained41.8173.3279.8857.9861.2930.0080.0969.3168.9862.58
Qwen1.5-MoE-A2.7BSparseGPT (2:4, keep shared expert)33.6267.0571.0143.8742.2926.0074.1062.4565.5153.98
Qwen1.5-MoE-A2.7BWanda (2:4, keep shared expert)30.2962.1264.5940.6837.6323.4072.1457.4064.4850.30
Qwen1.5-MoE-A2.7BNAEE (r=30, keep shared expert)32.2559.3467.2846.7438.0821.2073.5064.2660.4651.46
Qwen1.5-MoE-A2.7BMoE-Pruner (2:4, keep shared expert)39.9371.2171.5352.7356.3129.4078.1870.0467.8059.68

References:

[1] Jeff Pool, Chong Yu. Channel Permutations for N:M Sparsity. NeurIPS 2021.

[2] Yingtao Zhang, Haoli Bai, Haokun Lin, Jialin Zhao, Lu Hou, Carlo Vittorio Cannistraci. Plug-and-Play: An Efficient Post-training Pruning Method for Large Language Models. ICLR 2024.

[3] An Yang, Baosong Yang, Binyuan Hui, Bo Zheng, Bowen Yu, Chang Zhou, Chengpeng Li, Chengyuan Li, Dayiheng Liu, Fei Huang, et al. Qwen2 technical report. arXiv preprint arXiv:2407.10671.

评论

Thank you for looking into our rebuttal and providing insightful suggestions to improve our paper quality. Here are our response to your followup questions:

Clarity Issues: There are still clarity problems in the paper that need to be addressed. For example, in Equation 9, the authors may use gate_k instead of gate to differentiate between different experts; otherwise, they do not correspond to gate_1 and gate_2 mentioned in line 218. Additionally, what do i and j represent in Equations 7 and 8? Do the i in Equations 7, 8, and 9 overlap with the i in Equation 1? Similar issues should be carefully reviewed and resolved.

Thank you for pointing out the clarity issues. Yes, we should use GatekGate_k to represent corresponding router weights to the k-th expert. The ii and jj in Equation 7 and 8 stand for output feature and input feature dimension, which is the same as Equation 9. To resolve the clarity issue with ii, we should change those ii in Equation 1, 3, 4, and 5 to kk to represent the corresponding expert index:

Equation 1: y=k=0n1Gate(x)kEk(x)y=\sum_{k=0}^{n-1} Gate(x)_k \cdot E_k(x)

Equation 3: y=k=0n1Softmax(Top2(xWg))kSwiGLUk(x)y=\sum_{k=0}^{n-1} \mathrm{Softmax}(\mathrm{Top2}(x\cdot W_g))_k \cdot \mathrm{SwiGLU}_k(x)

Equation 4: s=σμ=1nk=0n1(fkμ)2μs = \frac{\sigma}{\mu} = \frac{\sqrt{\frac{1}{n}\sum_{k=0}^{n-1}(f_k-\mu)^2}}{\mu} μ=1nk=0n1fk\mu = \frac{1}{n}\sum_{k=0}^{n-1}f_k

Equation 5: fk=xB1{argmaxp(x)=k}f_k = \sum_{x \in \mathcal{B}} {1} \{\text{argmax}\: p(x) = k\}

We will incorporate these changes into our draft.

Method Design: The current method does capture an interesting point, but its overall method design remains relatively simple and not that effective (based on the experiments). For instance, there are many other intriguing approaches for 2:4 sparsity, such as channel permutation [1]. I suggest that the authors consider combining the gate value with other approaches, modeling the overall method as an optimization problem, which might result in a more solid method design and evaluation results. Furthermore, the distillation approach does not demonstrate significant differences compared to existing distillation methods. Could the lambda in Equation 10 be designed to depend on the gate scores?

The channel permutation [1] is a method to maximize the accuracy of N:M sparse networks. It could complement our 2:4 pruning strategy and offers performance improvement of 2:4 sparse networks. This technique is proposed by [1] and revisited for LLM pruning recently in [2]. Since SparseGPT and Wanda in 2:4 sparse settings did not include channel permutation technique, we also implement our method for 2:4 structured sparsity without channel permutation to ensure fair comparison. To achieve better model performance after pruning, we will add channel permutation technique for 2:4 sparse settings in the future.

For Equation 10, setting the λ\lambda value to be dependent on the gate scores is interesting. In our experiment, we sum over all MSE losses between pretrained teacher experts and pruned student experts. We find that setting the λ\lambda to be the cross entropy loss over the expert-wise knowledge distillation loss could guarantee convergence and better performance after training. We could actually assign different λ\lambda values for different experts depending on the router weights or gate scores. This could help expert diversification and potentially improve model performance after distillation. We will conduct experiments to evaluate the effectiveness of dynamically assigning λ\lambda based on gate scores and include these results in future work.

评论

Dear reviewers,

We sincerely thank you for your insightful evaluations and constructive feedback! Your suggestions have greatly contributed to improving the quality of our paper. We address every question from each reviewer in the comments below. We summarize the key changes made to our revised manuscript, with changes highlighted in blue:

  1. Enhanced Literature Review:
  • We have moved the MoE initialization to section 2 for better organization.
  • Additionally, we provided a brief definition of sparse upcycling initialization based on [1].
  1. Detailed Motivation and Analysis:
  • In Section 3.2, we expanded the motivation and analysis of our method, MoE-Pruner, to better explain its design and advantages over existing methods.
  1. Updated Experimental Results:
  • Table 2: We added results for pruning perplexity at lower sparsity levels, demonstrating that MoE-Pruner consistently outperforms SparseGPT and Wanda under moderate losses.
  • Table 3: We introduced an efficiency evaluation table comparing memory reduction and inference speedup, including results for MoE-Pruner and the expert pruning baseline NAEE [2].
  • Table 4: Updated zero-shot performance comparisons at 50% unstructured pruning, confirming MoE-Pruner's robustness across tasks.
  • Table 5: Added zero-shot performance comparisons at structured 2:4 sparsity and 50% expert pruning, highlighting MoE-Pruner's scalability and superiority over SparseGPT, Wanda, and NAEE.
  • These experimental results include Mixtral-8x7B, MiniCPM-8x2B, DeepSeek-V2-Lite, and Qwen1.5-MoE-A2.7B models.

These additions and updates comprehensively address your concerns and demonstrate MoE-Pruner’s advantages in both performance and efficiency across various pruning settings and architectures.

We hope the revised version reflects these improvements clearly. If you have other questions, we are happy to answer.

References:

[1] Aran Komatsuzaki, Joan Puigcerver, James Lee-Thorp, Carlos Riquelme Ruiz, Basil Mustafa, Joshua Ainslie, Yi Tay, Mostafa Dehghani, Neil Houlsby. Sparse Upcycling: Training Mixture-of-Experts from Dense Checkpoints. ICLR 2023.

[2]. Xudong Lu, Qi Liu, Yuhui Xu, Aojun Zhou, Siyuan Huang, Bo Zhang, Junchi Yan, Hongsheng Li. Not All Experts are Equal: Efficient Expert Pruning and Skipping for Mixture-of-Experts Large Language Models. ACL 2024.

撤稿通知

I have read and agree with the venue's withdrawal policy on behalf of myself and my co-authors.