The LLM Surgeon

Fuente: arXiv
Gespeichert in:
Bibliographische Detailangaben
Hauptverfasser: van der Ouderaa, Tycho F. A., Nagel, Markus, van Baalen, Mart, Asano, Yuki M., Blankevoort, Tijmen
Format: Preprint
Veröffentlicht: 2023
Schlagworte:
Online-Zugang:
Tags: Tag hinzufügen
Keine Tags, Fügen Sie den ersten Tag hinzu!
_version_ 1866910376968323072
author van der Ouderaa, Tycho F. A.
Nagel, Markus
van Baalen, Mart
Asano, Yuki M.
Blankevoort, Tijmen
author_facet van der Ouderaa, Tycho F. A.
Nagel, Markus
van Baalen, Mart
Asano, Yuki M.
Blankevoort, Tijmen
contents State-of-the-art language models are becoming increasingly large in an effort to achieve the highest performance on large corpora of available textual data. However, the sheer size of the Transformer architectures makes it difficult to deploy models within computational, environmental or device-specific constraints. We explore data-driven compression of existing pretrained models as an alternative to training smaller models from scratch. To do so, we scale Kronecker-factored curvature approximations of the target loss landscape to large language models. In doing so, we can compute both the dynamic allocation of structures that can be removed as well as updates of remaining weights that account for the removal. We provide a general framework for unstructured, semi-structured and structured pruning and improve upon weight updates to capture more correlations between weights, while remaining computationally efficient. Experimentally, our method can prune rows and columns from a range of OPT models and Llamav2-7B by 20%-30%, with a negligible loss in performance, and achieve state-of-the-art results in unstructured and semi-structured pruning of large language models.
format Preprint
id arxiv_https___arxiv_org_abs_2312_17244
institution arXiv
publishDate 2023
record_format arxiv
spellingShingle The LLM Surgeon
van der Ouderaa, Tycho F. A.
Nagel, Markus
van Baalen, Mart
Asano, Yuki M.
Blankevoort, Tijmen
Machine Learning
Computation and Language
State-of-the-art language models are becoming increasingly large in an effort to achieve the highest performance on large corpora of available textual data. However, the sheer size of the Transformer architectures makes it difficult to deploy models within computational, environmental or device-specific constraints. We explore data-driven compression of existing pretrained models as an alternative to training smaller models from scratch. To do so, we scale Kronecker-factored curvature approximations of the target loss landscape to large language models. In doing so, we can compute both the dynamic allocation of structures that can be removed as well as updates of remaining weights that account for the removal. We provide a general framework for unstructured, semi-structured and structured pruning and improve upon weight updates to capture more correlations between weights, while remaining computationally efficient. Experimentally, our method can prune rows and columns from a range of OPT models and Llamav2-7B by 20%-30%, with a negligible loss in performance, and achieve state-of-the-art results in unstructured and semi-structured pruning of large language models.
title The LLM Surgeon
topic Machine Learning
Computation and Language
url https://arxiv.org/abs/2312.17244