Exploiting Activation Sparsity with Dense to Dynamic-k Mixture-of-Experts Conversion

Transformer models can face practical limitations due to their high computationalrequirements. At the same time, such models exhibit significant activation sparsity,which can be leveraged to reduce the inference cost by converting parts of thenetwork into equivalent Mixture-of-Experts (MoE) layers. Despite the crucial roleplayed by activation sparsity, its impact on this process remains unexplored. Wedemonstrate that the efficiency of the conversion can be significantly enhancedby a proper regularization of the activation sparsity of the base model. Moreover,motivated by the high variance of the number of activated neurons for differentinputs, we introduce a more effective dynamic-k expert selection rule that adjuststhe number of executed experts on a per-token basis. To achieve further savings,we extend this approach to multi-head attention projections. Finally, we develop anefficient implementation that translates these computational savings into actual wallclock speedup. The proposed method, Dense to Dynamic-k Mixture-of-Experts(D2DMoE), outperforms existing approaches on common NLP and vision tasks,reducing inference cost by up to 60% without significantly impacting performance.

Institutions

Publication Details

Journal
Zenodo (CERN European Organization for Nuclear Research)
Published
2024-12-15
DOI
https://doi.org/10.5281/zenodo.14409485
Primary Topic
Domain Adaptation and Few-Shot Learning
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Exploiting Activation Sparsity with Dense to Dynamic-k Mixture-of-Experts Conversion

Zenodo (CERN European Organization for Nuclear Research)
Domain Adaptation and Few-Shot Learning
article

Exploiting Activation Sparsity with Dense to Dynamic-k Mixture-of-Experts Conversion

article en

Abstract

Transformer models can face practical limitations due to their high computationalrequirements. At the same time, such models exhibit significant activation sparsity,which can be leveraged to reduce the inference cost by converting parts of thenetwork into equivalent Mixture-of-Experts (MoE) layers. Despite the crucial roleplayed by activation sparsity, its impact on this process remains unexplored. Wedemonstrate that the efficiency of the conversion can be significantly enhancedby a proper regularization of the activation sparsity of the base model. Moreover,motivated by the high variance of the number of activated neurons for differentinputs, we introduce a more effective dynamic-k expert selection rule that adjuststhe number of executed experts on a per-token basis. To achieve further savings,we extend this approach to multi-head attention projections. Finally, we develop anefficient implementation that translates these computational savings into actual wallclock speedup. The proposed method, Dense to Dynamic-k Mixture-of-Experts(D2DMoE), outperforms existing approaches on common NLP and vision tasks,reducing inference cost by up to 60% without significantly impacting performance.

Zenodo (CERN European Organization for Nuclear Research)
Warsaw University of Technology (PL), Jagiellonian University (PL), Integrated Detector Electronics AS (Norway) (NO), Corporación Universitaria de Colombia Ideas (CO), Innovative Designs in Environments for an Aging Society (US), Sapienza University of Rome (IT)
Industry, innovation and infrastructure
Openalex Percentile: Top 59%
Domain Adaptation and Few-Shot Learning
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

Exploiting Activation Sparsity with Dense to Dynamic-k Mixture-of-Experts Conversion · Zenodo (CERN European Organization for Nuclear Research) (2024) | TGRS Research Map | TGRS