Liger: Linearisatie van Grote Taalmodellen naar Gegateerde Recursieve Structuren
Liger: Linearizing Large Language Models to Gated Recurrent Structures
March 3, 2025
Auteurs: Disen Lan, Weigao Sun, Jiaxi Hu, Jusen Du, Yu Cheng
cs.AI
Samenvatting
Transformers met lineaire recurrent modeling bieden lineaire-tijd training en
constante-geheugen inferentie. Ondanks hun aangetoonde efficiëntie en
prestaties blijft het pretrainen van dergelijke niet-standaard architecturen
vanaf nul kostbaar en risicovol. De linearisatie van grote taalmodellen (LLMs)
transformeert gepretrainde standaardmodellen in lineaire recurrent structuren,
wat een efficiëntere implementatie mogelijk maakt. Huidige linearisatiemethoden
introduceren echter typisch extra feature map modules die uitgebreide
fine-tuning vereisen en negeren de gating mechanismen die worden gebruikt in
state-of-the-art lineaire recurrent modellen. Om deze problemen aan te pakken,
presenteert dit artikel Liger, kort voor Linearizing LLMs to gated recurrent
structures. Liger is een nieuwe aanpak voor het omzetten van gepretrainde LLMs
naar gated lineaire recurrent modellen zonder extra parameters toe te voegen.
Het hergebruikt de gepretrainde key matrix gewichten om diverse gating
mechanismen te construeren, wat de vorming van verschillende gated recurrent
structuren vergemakkelijkt en de noodzaak vermijdt om aanvullende componenten
vanaf nul te trainen. Door middel van lichtgewicht fine-tuning met Low-Rank
Adaptation (LoRA) herstelt Liger de prestaties van de gelineariseerde gated
recurrent modellen om overeen te komen met die van de originele LLMs. Daarnaast
introduceren we Liger Attention, een intra-layer hybride aandachtmechanisme,
dat 93\% van het Transformer-gebaseerde LLM significant herstelt bij 0.02\%
pretraining tokens tijdens het linearisatieproces, en competitieve resultaten
behaalt op meerdere benchmarks, zoals gevalideerd op modellen variërend van 1B
tot 8B parameters. Code is beschikbaar op
https://github.com/OpenSparseLLMs/Linearization.
English
Transformers with linear recurrent modeling offer linear-time training and
constant-memory inference. Despite their demonstrated efficiency and
performance, pretraining such non-standard architectures from scratch remains
costly and risky. The linearization of large language models (LLMs) transforms
pretrained standard models into linear recurrent structures, enabling more
efficient deployment. However, current linearization methods typically
introduce additional feature map modules that require extensive fine-tuning and
overlook the gating mechanisms used in state-of-the-art linear recurrent
models. To address these issues, this paper presents Liger, short for
Linearizing LLMs to gated recurrent structures. Liger is a novel approach for
converting pretrained LLMs into gated linear recurrent models without adding
extra parameters. It repurposes the pretrained key matrix weights to construct
diverse gating mechanisms, facilitating the formation of various gated
recurrent structures while avoiding the need to train additional components
from scratch. Using lightweight fine-tuning with Low-Rank Adaptation (LoRA),
Liger restores the performance of the linearized gated recurrent models to
match that of the original LLMs. Additionally, we introduce Liger Attention, an
intra-layer hybrid attention mechanism, which significantly recovers 93\% of
the Transformer-based LLM at 0.02\% pre-training tokens during the
linearization process, achieving competitive results across multiple
benchmarks, as validated on models ranging from 1B to 8B parameters. Code is
available at https://github.com/OpenSparseLLMs/Linearization.Summary
AI-Generated Summary