EAT: Expert Account Tracker for Efficient MoE Inference
Authors: Yuexian Li, Yifei Yang, Zouying Cao, Hai Zhao
Organizations: Paris Elite Institute of Technology, Shanghai Jiao Tong University · AGI Institute, School of Computer Science, Shanghai Jiao Tong University, Shanghai, China · Key Laboratory of Shanghai Education Commission for Intelligent Interaction and Cognitive Engineering, Shanghai Jiao Tong University · Ant Group
Mixture-of-Experts (MoE) models have emerged as a revolutionary method to scale Transformer models. However, traditional MoE architecture still suffers from inefficiency since a large number of experts are unnecessarily activated. Existing approaches for reducing the number of activated experts often overlook the historical performance of each expert. In this paper, we propose EAT, a novel method called Expert Account Tracker (EAT), which utilizes history-awareness metrics and adaptive thresholding to dynamically select the most important experts, thereby reducing the activated expert number while effectively maintaining the model performance. Experiments show that EAT outperforms the existing baseline Top-P method across multiple models and datasets, achieving over 25% an average reduction compared to the vanilla method in the number of activated experts and performing better token generation speed compared to the baseline. Furthermore, the performance of pruned models can be efficiently recovered via OPD using only 9K data. Additionally, through ablation studies, we find that excessively reducing the number of activated experts can significantly harm model performance, and the importance of experts varies across layers, with higher-level experts being generally more critical.
Figures & tables
Figure 1: Overview of MoE architecture and our proposed EAT method. EAT selects the most useful experts by continuously tracking their historical contributions and incorporating this information into the routing decision.
Hyperparameter
Value
Description
α
0.95
Smoothing factor for Cs(t) .
w1,w2,w3
0.3, 0.3, 0.4
Weights to compute Sh,i .
β
0.6
Balance factor for final importance Ii .
α1,α2
0.5, 1.0
Scaling coefficients for threshold τ .
κ1,κ2
0.7, 0.3
Weights for threshold adjustment.
K (Mixtral/Phi)
2
Max activated experts per token.
Table 1: Key hyperparameters of the proposed EAT routing strategy.
LLM
Method
Reasoning
Language
Know.
Examination
Und.
HeSw
PIQA
CHID
WSC
BoolQ
MMLU
CMMLU
XSum
Mixtral -8x7B -v0.1
Vanilla
77.11
81.07
37.51
61.54
69.11
71.67
53.11
9.19
Top-P
75.72
79.71
32.85
60.58
66.15
65.38
46.74
8.70
EAT
76.79
80.30
33.97
63.46
68.40
70.37
51.04
9.08
EAT + OPD
77.05
80.96
35.42
64.83
69.25
71.59
52.66
9.10
Phi -3.5-MoE -instruct
Vanilla
75.17
80.20
66.75
68.27
75.32
76.64
61.03
14.68
Table 2: Main experimental results evaluated on the OpenCompass Platform. Know. denotes Knowledge benchmarks and Und. denotes Understanding benchmark.
LLM
Method
Reasoning
Language
Know.
Examination
Und.
HeSw
PIQA
CHID
WSC
BoolQ
MMLU
CMMLU
XSum
Mixtral -8x7B -v0.1
Vanilla
2.00
2.00
2.00
2.00
2.00
2.00
2.00
2.00
Top-P
1.50
1.44
1.75
1.52
1.46
1.51
1.74
1.51
EAT
1.47
1.46
1.44
1.50
1.45
1.47
1.48
1.47
EAT + OPD
1.50
1.47
1.46
1.50
1.45
1.69
1.57
1.71
Phi -3.5-MoE -instruct
Vanilla
2.00
2.00
2.00
2.00
2.00
2.00
2.00
2.00
Table 3: Comparison of the average number of activated experts under different expert routing strategies.
Length
Mixtral-8x7B
Phi-3.5-MoE
Vanilla
Top-P
EAT
Vanilla
Top-P
EAT
2048+256
0.5214
0.5100
0.5196
1.1319
0.9479
1.1600
1024+128
0.3931
0.3739
0.3864
0.9295
0.9073
0.9158
512+32
0.3814
0.1596
0.3671
0.8060
0.8719
1.1421
Table 4: Average token generation speed (token/sec).
Figure 2: Curve of the Relationship Between PPL and Number of Activated Experts.
Figure 3: Curve of the Relationship Between layer number and Number of Activated Experts.
Figure 4: Curve of PPL on OPD with different subset size on Qwen30B on PIQA dataset.
Figure 5: Curve of PPL on OPD with different steps on Qwen30B on BOOLQ dataset.