DPMA: Learning to Compress Mixture-of-Experts Models
Authors: Jon Irureta, Jon Imaz, Philipp Wiesner, Gorka Azkune, Javier Fernandez-Marques, Alex Iacob, Andrej Jovanović, Aizea Lojo, Nicholas D. Lane
Organizations: Ikerlan Technology Research Center · University of the Basque Country UPV/EHU · University of Cambridge · Science of Fundamental AI Research Lab (SOFAIR) · HiTZ Basque Center for Language Technology - Ixa, University of the Basque Country UPV/EHU · Flower Labs
Mixture-of-Experts (MoE) architectures offer high computational efficiency, but storing all experts requires substantial memory and limits deployment on resource-constrained hardware. Most retraining-free MoE compression methods commit to either pruning or merging experts, often with a uniform compression ratio across layers. We introduce DPMA (Differentiable Prune Merge Absorb), which jointly learns compression operations and layer-wise expert allocation through gradient descent under a global expert budget. Separate learnable coefficients allow DPMA to prune experts, merge their parameters, and absorb their routing contributions by forwarding routing weights to retained experts. These coefficients and expert assignments are optimised to match the original model's outputs on calibration data while its weights remain frozen. Across four MoE models, eight multiple-choice benchmarks, and five compression ratios, DPMA achieves the highest accuracy averaged over benchmarks and compression ratios on each model among the evaluated methods. At 75% expert reduction, it outperforms the strongest baseline on every model, with gains of up to 6.7 percentage points.
Figures & tables
Figure 1: DPMA jointly learns compression operations and the allocation of a fixed expert budget. Uniform pruning (left) retains four experts per layer. DPMA (right) combines pruning, merging, and absorption while allocating the same total budget of B=16 experts across layers.
Method
Operations
Per-Layer Budget
Search Strategy
Frequency [ 12 ]
Prune
Uniform
Criterion
NAEE [ 21 ]
Prune
Uniform
Exhaustive
REAP [ 15 ]
Prune
Uniform
Criterion
EEP [ 19 ]
Prune, then Merge
Uniform
Evolutionary
DiEP [ 1 ]
Prune
Flexible
Gradient Descent
M-SMoE [ 18 ]
Merge
Flexible
Criterion
Table 1: Comparison of selected MoE compression methods in their main configurations by supported operations, per-layer budget allocation, and search strategy. Unlike prior work, DPMA jointly learns compression operations and layer-wise expert allocation through gradient descent.
αe
βe
Operation
0
0
Prune
0
=0
Merge
>0
0
Absorb
>0
=0
Merge + absorb
Table 2: Operations based on α and β values.
Learned
Derived at each forward pass
Range
Role
ϕρ
ρ=gate(ϕρ)
[0,1]
Presence
ϕα
α=gate(ϕα)
[0,1]
Absorption weight
ϕβ,b
β=b⋅gate(ϕβ)
R
Merging weight
V
Aer∝ρreue⊤(I+VV⊤)ur/τ
∑rAer=1
Assignment
Table 3: Learned parameters and derived quantities of DPMA . The 4LE+8d learned parameters comprise four scalars per expert and a shared metric factor V∈Rd×8 .
Model
Layers
Experts per layer
Active experts
Shared experts
Total parameters
Active parameters
OLMoE-1B-7B
16
64
8
none
7B
1B
Qwen1.5-MoE-A2.7B
24
60
4
1 per layer
14.3B
2.7B
Qwen3-30B-A3B
48
128
8
none
30.5B
3B
DeepSeek-MoE-16B
28
64
6
2 per layer
16.4B
2.8B
Table 4: The four MoE models. Experts are per MoE layer; active experts are the routed experts each token uses (top- k ). Active parameters per token count every non-expert parameter (attention, embeddings, output layer, routers), the shared expert(s), and k routed experts per layer.
Compression ratio
Model
Method
25%
40%
50%
60%
75%
Mean
OLMoE-1B-7B Uncompressed: 65.3%
Random
55.2 ± 1.0
47.5 ± 1.7
42.1 ± 1.1
37.9 ± 1.0
34.0 ± 0.7
43.3
Frequency
54.5
45.5
41.3
36.5
33.9
42.3
REAP
58.8
49.7
44.7
39.1
33.7
45.2
DiEP
54.4 ± 4.5
45.5 ± 2.5
41.4 ± 0.7
37.6 ± 1.2
34.8 ± 0.7
42.8
M-SMoE
49.2
41.0
36.4
34.5
34.2
39.1
Table 5: Both DPMA variants outperform every baseline in mean accuracy on all four models. Scores are mean zero-shot accuracy (%) over eight multiple-choice benchmarks (random guessing: 34.38% ). Compression ratios specify the fraction of routed experts removed. The Mean column averages over the five ratios. ± is the standard deviation across seeds or random draws. Bold and underlining mark the best and second-best compressed results per model and column.
Figure 2: DPMA learns where to compress, moving the expert budget away from a uniform split. Relative budget aℓ of each layer: 0 is the uniform split, +1 keeps all of the layer’s experts, and −1 cuts it to DPMA ’s minimum.
Figure 8
Zero-shot
One-shot
Available operations
hard
soft
hard
soft
Prune only
45.7
45.7
46.0
46.0
Prune + merge
45.5
46.5
45.8
47.0
Prune + absorb
46.3
47.7
47.0
48.4
Full DPMA
47.4
48.0
48.1
48.8
Table 6: Full DPMA achieves the highest mean accuracy in all four settings. Accuracy (%) on OLMoE, averaged over eight multiple-choice benchmarks and five compression ratios.
Appendix figures & tables10 assets
Supplementary material from the paper’s appendix.
Appendix
Compression ratio
Model
Operation
25%
40%
50%
60%
75%
OLMoE
Experts dropped (of 1,024)
256
410
512
614
768
Prune
7.2 ± 2.4
7.7 ± 1.6
8.4 ± 0.5
10.9 ± 0.8
10.7 ± 0.9
Merge
5.9 ± 1.2
7.3 ± 0.2
7.4 ± 0.5
8.8 ± 1.2
9.5 ± 2.2
Absorb
45.2 ± 1.5
41.0 ± 2.5
42.0 ± 2.8
43.2 ± 2.8
46.4 ± 1.0
Merge + absorb
41.8 ± 3.1
44.0 ± 3.7
42.2 ± 3.1
37.1 ± 2.9
33.4 ± 3.4
Appendix
Table 7: Operations DPMA applies to the experts it drops, as a percentage of the dropped experts. Mean ± the standard deviation over seeds is shown.
Figure 5: Operations DPMA applies per layer. Experts dropped per MoE layer (% of the layer’s routed experts), stacked by operation, per model (rows) and compression ratio (columns). We represent the mean over three seeds.
Figure 6: Per-layer budget of DPMA , DiEP and M-SMoE . Experts kept per MoE layer (% of the layer’s routed experts), per model (rows) and compression ratio (columns). DPMA and DiEP : mean over three seeds; M-SMoE : single deterministic run.
Experts/token
Model
B
Params vs. original
Hard
Soft
OLMoE k=8
768
76.7%
7.70 ± 0.02
8.84 ± 0.02
614
62.7%
7.38 ± 0.02
9.20 ± 0.08
512
53.4%
7.07 ± 0.06
9.27 ± 0.03
410
44.2%
6.73 ± 0.02
9.17 ± 0.06
256
30.2%
5.78 ± 0.06
8.26 ± 0.09
Appendix
Table 8: Experts activated per token under soft vs. hard routing. B : routed experts kept, for compression ratios 25% , 40% , 50% , 60% , and 75% (top to bottom). Params vs. original: parameters of the compressed model, w.r.t the uncompressed counterpart. Experts/token: routed experts each token activates, measured on held-out C4 sequences (a total of 4096 tokens). ± is the standard deviation over 3 seeds.
Figure 7: Effect of the calibration set size on OLMoE at compression ratio of 50% . Mean accuracy (%) over 8 MC tasks, using N C4 sequences of 1,024 tokens; the main experiments use N=32 . ± is the standard deviation over seeds ( DiEP , DPMA ) or random draws ( Random ).
Compression ratio
Setting
Method
25%
40%
50%
60%
75%
Zero-shot
DPMA hard
57.1 ± 0.7
51.5 ± 1.2
46.8 ± 0.4
43.0 ± 2.2
38.9 ± 0.1
w/o Lagrangian
59.0 ± 0.5
50.3 ± 0.7
45.3 ± 0.5
41.2 ± 1.0
37.2 ± 0.6
DPMA soft
57.9 ± 0.5
52.1 ± 1.3
46.9 ± 1.0
43.5 ± 1.8
39.5 ± 0.8
w/o Lagrangian
59.1 ± 0.6
50.2 ± 0.7
45.9 ± 0.1
41.6 ± 1.2
38.0 ± 1.0
One-shot
DPMA hard
57.7 ± 1.6
52.5 ± 0.1
47.9 ± 0.8
43.6 ± 1.7
38.6 ± 0.1
Appendix
Table 9: Ablation of the Lagrangian budget term on OLMoE. Mean accuracy over 8 MC tasks; ± is the standard deviation over 3 seeds. w/o Lagrangian removes the augmented Lagrangian from the soft phase ( μ≡0 , κ=0 ), so the budget is met only by the projection to the top- B experts at the switch to hard gates; everything else, including the initialization, is unchanged. Bold: the better of each pair.
Figure 8: Sensitivity of DPMA to the weight η of the layer-wise loss. Mean accuracy over 8 MC tasks on OLMoE at compression ratio 0.50 , zero-shot (left) and one-shot (right). No value of η differs significantly from the default.
Figure 9: The layer-wise loss makes the soft phase close gates gradually. Soft phase of DPMA on OLMoE at compression ratio 0.5, mean over three seeds per η . (a) KL divergence to the original model of the compressed model as it would be exported at each step, on held-out C4 windows. (b) Expected number of open experts against the budget B . Without the term ( η=0 ), gates close faster and early held-out KL is higher; all runs converge to similar values later in training.
Model
Model parameters
Learned parameters by DPMA
Time per run
GPU
OLMoE
6.9B
20,480
3.8 h
L40S
Qwen1.5-MoE
14.3B
22,144
6.7 h
L40S
Qwen3-30B-A3B
30.5B
40,960
7.0 h
H200
DeepSeek-MoE-16B
16.4B
23,296
8.1 h
L40S
Appendix
Table 10: Overhead of DPMA : parameters learned and mean time per run (one model and compression ratio, over 15 runs).
Setting
Value
Calibration data
C4, sequences of 1,024 tokens (32; 128 for Qwen3-30B-A3B)
Initialization
ϕρ : REAP saliency, standardized per layer (all experts open)
ϕα , ϕβ : closed (no absorption or merging at the start)
Optimizer
AdamW ( β1=0.9 , β2=0.95 ), no weight decay
Learning rate
0.05 for the gate logits ( ϕρ , ϕα , ϕβ )
0.01 for the merge magnitudes ( b ) and the metric factor ( V )
Appendix
Table 11: DPMA hyperparameters, shared by all models.
Mixture-of-experts models use input-dependent routing to activate specialized subnetworks, increasing model capacity without running every parameter for each input.