paper-with-me

홈 › Papers

MoEfication: Conditional Computation of Transformer Models for Efficient Inference

2021-11-16 · ACL ARR November 2021 11 · Anonymous

Transformer-based pre-trained language models achieve superior performance on most NLP tasks due to large parameter capacity, but also lead to huge computation cost. Fortunately, we observe that most inputs only activate a tiny ratio of neurons of large Transformer-based pre-trained models during inference. Hence, we propose to convert a model into its mixture-of-experts (MoE) version with the same parameters, namely MoEfication, which accelerates large-model inference by conditional computation based on the sparse activation phenomenon. Specifically, MoEfication consists of two phases: (1) splitting the parameters of feed-forward neural networks (FFNs) into multiple parts as experts, and (2) building expert routers to decide which experts will be used for each input. Experimental results show that MoEfication can save $80\%$ computation cost of FFNs while maintaining over $95\%$ original performance for different models, including models with different sizes (up to 3 billion parameters) and distilled models, on various downstream tasks. Moreover, we find that the MoEfied model achieves better performance than the MoE model pre-trained from scratch with the same model size. We will release all the code and models of this paper.

📄 PDF Abstract BibTeX

Code (0)

등록된 구현이 없습니다.

Tasks

Mixture-of-Experts

Similar Papers 제목 키워드 기반

MoEfication: Transformer Feed-forward Layers are Mixtures of Experts

2021-10-05 · Findings (ACL) 2022 5 · Zhengyan Zhang, Yankai Lin, Zhiyuan Liu, Peng Li 외

Recent work has shown that feed-forward networks (FFNs) in pre-trained Transformers are a key component, storing various linguistic and factual knowledge. However, the computational patterns of FFNs are still unclear. In…

Machine Reading ComprehensionReading ComprehensionText Classification

PrunePath: Towards Highly Structured Sparse Language Models

2026-05-27 · Zhexuan Gu, Zixun Fu, Yancheng Yuan arxiv

Feed-forward networks (FFNs) dominate the parameter count and computation of modern language models, yet existing pruning methods often struggle to convert sparsity into hardware-friendly inference efficiency gains. We i…

Modularity in Transformers: Investigating Neuron Separability & Specialization

2024-08-30 · Nicholas Pochinkov, Thomas Jones, Mohammed Rashidur Rahman

Transformer models are increasingly prevalent in various applications, yet our understanding of their internal workings remains limited. This paper investigates the modularity and task specialization of neurons within tr…

Exploring the Benefit of Activation Sparsity in Pre-training

2024-10-04 · Zhengyan Zhang, Chaojun Xiao, Qiujieli Qin, Yankai Lin 외

Pre-trained Transformers inherently possess the characteristic of sparse activation, where only a small fraction of the neurons are activated for each token. While sparse activation has been explored through post-trainin…

Controlling Computation versus Quality for Neural Sequence Models

2020-02-17 · Ankur Bapna, Naveen Arivazhagan, Orhan Firat

Most neural networks utilize the same amount of compute for every example independent of the inherent complexity of the input. Further, methods that adapt the amount of computation to the example focus on finding a fixed…

Representation Learning