paper-with-me

Papers

Liger: Linearizing Large Language Models to Gated Recurrent Structures

2025-03-03 · Disen Lan, Weigao Sun, Jiaxi Hu, Jusen Du, Yu Cheng

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.

📄 PDF Abstract BibTeX arXiv:2503.01496

Code (1)

opensparsellms/linearization 공식 구현 pytorch

Methods 이 논문이 사용한 방법론

Softmax The Softmax output function transforms a previous layer's output into a vector of probabilities. It is commonly used for multiclass classification. Given an input vector $x$…
Attention 설명 없음

Similar Papers 제목 키워드 기반

Learning Blended, Precise Semantic Program Embeddings

2019-07-03 · Ke Wang, Zhendong Su

Learning neural program embeddings is key to utilizing deep neural networks in program languages research --- precise and efficient program representations enable the application of deep models to a wide range of program…

Graph Neural NetworkMethod name predictionRepresentation Learning

Liger Kernel: Efficient Triton Kernels for LLM Training

2024-10-14 · Pin-Lun Hsu, Yun Dai, Vignesh Kothapalli, Qingquan Song 외

Training Large Language Models (LLMs) efficiently at scale presents a formidable challenge, driven by their ever-increasing computational demands and the need for enhanced performance. In this work, we introduce Liger-Ke…

ChunkingGPU

Long-horizon Visual Instruction Generation with Logic and Attribute Self-reflection

2025-03-12 · Yucheng Suo, Fan Ma, Kaixin Shen, Linchao Zhu 외

Visual instructions for long-horizon tasks are crucial as they intuitively clarify complex concepts and enhance retention across extended steps. Directly generating a series of images using text-to-image models without c…

Attribute

LoLCATs: On Low-Rank Linearizing of Large Language Models

2024-10-14 · Michael Zhang, Simran Arora, Rahul Chalamala, Alan Wu 외

Recent works show we can linearize large language models (LLMs) -- swapping the quadratic attentions of popular Transformer-based LLMs with subquadratic analogs, such as linear attention -- avoiding the expensive pretrai…

MMLU

Linearizing Large Language Models

2024-05-10 · Jean Mercat, Igor Vasiljevic, Sedrick Keh, Kushal Arora 외

Linear transformers have emerged as a subquadratic-time alternative to softmax attention and have garnered significant interest due to their fixed-size recurrent state that lowers inference cost. However, their original …

In-Context LearningMamba