paper-with-me

Papers

Merging Feed-Forward Sublayers for Compressed Transformers

2025-01-10 · Neha Verma, Kenton Murray, Kevin Duh

With the rise and ubiquity of larger deep learning models, the need for high-quality compression techniques is growing in order to deploy these models widely. The sheer parameter count of these models makes it difficult to fit them into the memory constraints of different hardware. In this work, we present a novel approach to model compression by merging similar parameter groups within a model, rather than pruning away less important parameters. Specifically, we select, align, and merge separate feed-forward sublayers in Transformer models, and test our method on language modeling, image classification, and machine translation. With our method, we demonstrate performance comparable to the original models while combining more than a third of model feed-forward sublayers, and demonstrate improved performance over a strong layer-pruning baseline. For instance, we can remove over 21% of total parameters from a Vision Transformer, while maintaining 99% of its original performance. Additionally, we observe that some groups of feed-forward sublayers exhibit high activation similarity, which may help explain their surprising mergeability.

📄 PDF Abstract BibTeX arXiv:2501.06126

Code (1)

nverma1/merging-ffs-compression 공식 구현 pytorch

Tasks

image-classificationImage ClassificationLanguage ModelingLanguage ModellingMachine TranslationModel Compression

Methods 이 논문이 사용한 방법론

Absolute Position Encodings Absolute Position Encodings are a type of position embeddings for [Transformer-based models] where positional encodings are…
Adam 설명 없음
Residual Connection 설명 없음
Dropout Dropout is a regularization technique for neural networks that drops a unit (along with connections) at training time with a specified probability $p$ (a common value is…
Softmax The Softmax output function transforms a previous layer's output into a vector of probabilities. It is commonly used for multiclass classification. Given an input vector $x$…
BPE Byte Pair Encoding, or BPE, is a subword segmentation algorithm that encodes rare and unknown words as sequences of subword units. The intuition is that various word…
Linear Layer A Linear Layer is a projection $\mathbf{XW + b}$.
Attention 설명 없음

Similar Papers 제목 키워드 기반

Improving Transformer Models by Reordering their Sublayers

2019-11-10 · ACL 2020 6 · Ofir Press, Noah A. Smith, Omer Levy

Multilayer transformer networks consist of interleaved self-attention and feedforward sublayers. Could ordering the sublayers in a different pattern lead to better performance? We generate randomly ordered transformers a…

Language ModelingLanguage ModellingMachine TranslationTranslation

Greedy Ordering of Layer Weight Matrices in Transformers Improves Translation

2023-02-04 · Elicia Ye

Prior work has attempted to understand the internal structures and functionalities of Transformer-based encoder-decoder architectures on the level of multi-head attention and feed-forward sublayers. Interpretations have …

DecoderTranslation

DeepNet: Scaling Transformers to 1,000 Layers

2022-03-01 · Hongyu Wang, Shuming Ma, Li Dong, Shaohan Huang 외

In this paper, we propose a simple yet effective method to stabilize extremely deep Transformers. Specifically, we introduce a new normalization function (DeepNorm) to modify the residual connection in Transformer, accom…

Translation

GLU Variants Improve Transformer

2020-02-12 · Noam Shazeer

Gated Linear Units (arXiv:1612.08083) consist of the component-wise product of two linear projections, one of which is first passed through a sigmoid function. Variations on GLU are possible, using different nonlinear (o…

Mask Attention Networks: Rethinking and Strengthen Transformer

2021-03-25 · NAACL 2021 4 · Zhihao Fan, Yeyun Gong, Dayiheng Liu, Zhongyu Wei 외

Transformer is an attention-based neural network, which consists of two sublayers, namely, Self-Attention Network (SAN) and Feed-Forward Network (FFN). Existing research explores to enhance the two sublayers separately t…

Abstractive Text SummarizationMachine TranslationRepresentation LearningText Summarization+1