Lizard: 대규모 언어 모델을 위한 효율적인 선형화 프레임워크
Lizard: An Efficient Linearization Framework for Large Language Models
July 11, 2025
저자: Chien Van Nguyen, Ruiyi Zhang, Hanieh Deilamsalehy, Puneet Mathur, Viet Dac Lai, Haoliang Wang, Jayakumar Subramanian, Ryan A. Rossi, Trung Bui, Nikos Vlassis, Franck Dernoncourt, Thien Huu Nguyen
cs.AI
초록
우리는 사전 학습된 트랜스포머 기반 대형 언어 모델(LLMs)을 무한 컨텍스트 생성을 위한 유연하고 서브쿼드라틱(subquadratic) 구조로 변환하는 선형화 프레임워크인 Lizard를 제안한다. 트랜스포머 기반 LLMs는 소프트맥스 어텐션의 2차 복잡성과 키-값(KV) 캐시의 증가로 인해 컨텍스트 길이가 증가함에 따라 메모리와 계산 병목 현상에 직면한다. Lizard는 이러한 한계를 해결하기 위해 소프트맥스 어텐션을 근사하면서도 출력 품질을 유지하는 서브쿼드라틱 어텐션 메커니즘을 도입한다. 고정된 모델 구조로 인해 게이팅 메커니즘을 배제하는 기존의 선형화 방법과 달리, Lizard는 최신 선형 모델에서 영감을 받은 게이팅 모듈을 통합한다. 이를 통해 적응형 메모리 제어, 상수 메모리 추론 지원, 강력한 길이 일반화, 그리고 더 유연한 모델 설계가 가능해진다. Lizard는 글로벌 컨텍스트 압축을 위한 게이팅 선형 어텐션과 메타 메모리로 강화된 슬라이딩 윈도우 어텐션을 결합하여 장거리 의존성과 세밀한 지역 상호작용을 모두 포착하는 하이브리드 메커니즘을 형성한다. 또한, 우리는 모델의 학습 속도를 가속화하는 하드웨어 인식 알고리즘을 도입한다. 광범위한 실험을 통해 Lizard는 표준 언어 모델링 작업에서 교사 모델의 성능을 거의 손실 없이 복구하면서도 기존의 선형화 방법을 크게 능가하는 것을 보여준다. 5-shot MMLU 벤치마크에서 Lizard는 이전 모델 대비 18점의 향상을 보였으며, 연상 회상 작업에서도 상당한 개선을 보였다.
English
We propose Lizard, a linearization framework that transforms pretrained
Transformer-based Large Language Models (LLMs) into flexible, subquadratic
architectures for infinite-context generation. Transformer-based LLMs face
significant memory and computational bottlenecks as context lengths increase,
due to the quadratic complexity of softmax attention and the growing key-value
(KV) cache. Lizard addresses these limitations by introducing a subquadratic
attention mechanism that closely approximates softmax attention while
preserving the output quality. Unlike previous linearization methods, which are
often limited by fixed model structures and therefore exclude gating
mechanisms, Lizard incorporates a gating module inspired by recent
state-of-the-art linear models. This enables adaptive memory control, supports
constant-memory inference, offers strong length generalization, and allows more
flexible model design. Lizard combines gated linear attention for global
context compression with sliding window attention enhanced by meta memory,
forming a hybrid mechanism that captures both long-range dependencies and
fine-grained local interactions. Moreover, we introduce a hardware-aware
algorithm that accelerates the training speed of our models. Extensive
experiments show that Lizard achieves near-lossless recovery of the teacher
model's performance across standard language modeling tasks, while
significantly outperforming previous linearization methods. On the 5-shot MMLU
benchmark, Lizard improves over prior models by 18 points and shows significant
improvements on associative recall tasks.