Share your thoughts, 1 month free Claude Pro on usSee more
WorkDL logo mark

Liger: Linearizing Large Language Models to Gated Recurrent Structures

About

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.

Disen Lan, Weigao Sun, Jiaxi Hu, Jusen Du, Yu Cheng• 2025

Related benchmarks

TaskDatasetResultRank
Multitask Language UnderstandingMMLU
Accuracy43.4
263
Question AnsweringARC-C--
116
Commonsense ReasoningWinoGrande
Accuracy72
103
Common Sense ReasoningPIQA
Accuracy80.3
100
Commonsense ReasoningPIQA 1.0 (test)
Accuracy80.3
64
Question AnsweringARC-E
Normalized Accuracy (ARC-E)81.1
59
Commonsense ReasoningWinoGrande 1.0 (test)
Accuracy72
31
Question AnsweringARC Easy v1 (test)
Accuracy81.1
16
General Language UnderstandingOverall LLM Evaluation Suite PiQA, ARC, HellaSwag, WinoGrande, MMLU v1
Overall Accuracy72.4
16
Question AnsweringARC Challenge v1 (test)
Normalized Accuracy52.5
16
Showing 10 of 12 rows

Other info

Follow for update