Merging Feed-Forward Sublayers for Compressed Transformers

Fuente: arXiv
Guardado en:
Detalles Bibliográficos
Autores principales: Verma, Neha, Murray, Kenton, Duh, Kevin
Formato: Preprint
Publicado: 2025
Materias:
Acceso en línea:
Etiquetas: Agregar Etiqueta
Sin Etiquetas, Sea el primero en etiquetar este registro!
_version_ 1866909556727087104
author Verma, Neha
Murray, Kenton
Duh, Kevin
author_facet Verma, Neha
Murray, Kenton
Duh, Kevin
contents 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.
format Preprint
id arxiv_https___arxiv_org_abs_2501_06126
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle Merging Feed-Forward Sublayers for Compressed Transformers
Verma, Neha
Murray, Kenton
Duh, Kevin
Computation and Language
Machine Learning
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.
title Merging Feed-Forward Sublayers for Compressed Transformers
topic Computation and Language
Machine Learning
url https://arxiv.org/abs/2501.06126