When Attention Collapses: How Degenerate Layers in LLMs Enable Smaller, Stronger Models

Fuente: arXiv
Salvato in:
Dettagli Bibliografici
Autori principali: Sanyal, Sunny, Shwartz-Ziv, Ravid, Dimakis, Alexandros G., Sanghavi, Sujay
Natura: Preprint
Pubblicazione: 2024
Soggetti:
Accesso online:
Tags: Aggiungi Tag
Nessun Tag, puoi essere il primo ad aggiungerne!!
_version_ 1866908834752102400
author Sanyal, Sunny
Shwartz-Ziv, Ravid
Dimakis, Alexandros G.
Sanghavi, Sujay
author_facet Sanyal, Sunny
Shwartz-Ziv, Ravid
Dimakis, Alexandros G.
Sanghavi, Sujay
contents Large Language Models (LLMs) are known for their performance, but we uncover a significant structural inefficiency: a phenomenon we term attention collapse. In many pre-trained decoder-style LLMs, the attention matrices in deeper layers degenerate, collapsing to near rank-one structures. These underutilized layers, which we call lazy layers, are redundant and impair model efficiency. To address this, we introduce Inheritune, a simple yet powerful training recipe designed to build smaller, stronger language models. Inheritune initializes a compact model by inheriting the potent early layers from a larger pre-trained model and then progressively trains and expands it. Our experiments on various models, including the GPT-2 family, demonstrate that models trained with Inheritune can match or even surpass the performance of their larger counterparts, despite having significantly fewer layers. This work presents a novel path toward model compression by design, enabling the creation of compact, yet highly performant language models. Code is available at https://github.com/sanyalsunny111/LLM-Inheritune.
format Preprint
id arxiv_https___arxiv_org_abs_2404_08634
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle When Attention Collapses: How Degenerate Layers in LLMs Enable Smaller, Stronger Models
Sanyal, Sunny
Shwartz-Ziv, Ravid
Dimakis, Alexandros G.
Sanghavi, Sujay
Computation and Language
Artificial Intelligence
Machine Learning
Large Language Models (LLMs) are known for their performance, but we uncover a significant structural inefficiency: a phenomenon we term attention collapse. In many pre-trained decoder-style LLMs, the attention matrices in deeper layers degenerate, collapsing to near rank-one structures. These underutilized layers, which we call lazy layers, are redundant and impair model efficiency. To address this, we introduce Inheritune, a simple yet powerful training recipe designed to build smaller, stronger language models. Inheritune initializes a compact model by inheriting the potent early layers from a larger pre-trained model and then progressively trains and expands it. Our experiments on various models, including the GPT-2 family, demonstrate that models trained with Inheritune can match or even surpass the performance of their larger counterparts, despite having significantly fewer layers. This work presents a novel path toward model compression by design, enabling the creation of compact, yet highly performant language models. Code is available at https://github.com/sanyalsunny111/LLM-Inheritune.
title When Attention Collapses: How Degenerate Layers in LLMs Enable Smaller, Stronger Models
topic Computation and Language
Artificial Intelligence
Machine Learning
url https://arxiv.org/abs/2404.08634