NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

LoLCATs: On Low-Rank Linearizing of Large Language Models

Michael Zhang, Simran Arora, Rahul Chalamala, Alan Wu, Benjamin Spector, Aaryan Singhal, Krithik Ramesh, Christopher Ré

TL;DR

LoLCATs introduces a highly efficient two-step framework to convert standard, quadratic-attention Transformer LLMs into subquadratic linear-attention models. By combining layer-wise "attention transfer" via MSE loss with low-rank adaptation (LoRA), it achieves state-of-the-art linearized performance while updating only 0.2% of the parameters and using 0.4% of the tokens required by previous methods. Remarkably, this approach enables the first successful linearization of massive models up to 405B parameters.

What Problem Does This Paper Address?

Transformers are the backbone of modern LLMs, but their standard softmax attention mechanism suffers from a major flaw: its computational and memory complexity scales quadratically ($O(n^2)$) with sequence length. This makes long-context generation and large-batch inference incredibly expensive.

While "linearizing" models—swapping out quadratic attention for subquadratic alternatives like linear attention or State Space Models (SSMs)—is a promising fix, existing methods have severe limitations. They typically degrade model quality significantly, require full-parameter updates over billions of tokens, and have only been successfully demonstrated on smaller models (up to 7B/8B parameters). LoLCATs tackles these efficiency and scalability bottlenecks to make linearization accessible on commodity hardware.

Comparison of linearization methods across efficiency and scalability metrics.

Methods

The authors propose Low-rank Linear Conversion via Attention Transfer (LoLCATs), which breaks the linearization process into two distinct, parameter-efficient steps:

  1. Attention Transfer (Stage 1): Instead of training a linear transformer from scratch, LoLCATs freezes the original model and trains new linear attention feature maps ($\phi_q, \phi_k$) to mimic the outputs of the original softmax attention. This is optimized using a simple mean-squared error (MSE) loss on the attention outputs under a "teacher-forcing" setup to prevent error propagation across layers during training.
  2. Low-rank Linearizing (Stage 2): After swapping the attention mechanisms, the authors apply Low-Rank Adaptation (LoRA) to the attention projection matrices ($W_q, W_k, W_v, W_o$) and perform end-to-end next-token prediction to fix any remaining approximation errors.

To boost performance, they introduce a hybrid architecture combining a short sliding window of softmax attention (window size 64) with linear attention. For massive models (70B+), they introduce a fine-grained block-by-block training strategy to handle memory constraints and layer-wise error accumulation.

Figure 1: LoLCATs framework. We linearize LLMs by (1) training attention analogs to approximate softmax attentions (attention transfer), before swapping attentions and (2) minimally adjusting (with LoRA).

Datasets

  • Alpaca (Cleaned): A dataset of 50K instruction-following samples (~40M tokens) used for the primary linearization training.
  • RedPajama: A standard pretraining corpus used to sample tokens for baseline comparisons and scalability testing on larger models.
  • CommonsenseQA (CQA): Used as task-specific data to evaluate and improve MMLU performance.
  • Evaluation Benchmarks: Evaluated via the LM Evaluation Harness across tasks like PiQA, ARC-Easy, ARC-Challenge, HellaSwag, Winogrande, and 5-shot MMLU, alongside passkey retrieval tasks for long-context evaluation.

Key Insights and Ideas

  • The Synergy of Attention Transfer and LoRA: The authors discovered that neither attention transfer nor LoRA alone is sufficient to recover model quality. However, when used together, they rapidly close the performance gap, showing that a good architectural initialization makes low-rank fine-tuning highly effective.
  • Error Concentration in Later Layers: When training all layers jointly on massive models (like Llama 3.1 405B), later layers exhibit up to 200× the MSE of earlier layers. Breaking the training down block-by-block resolves this optimization hurdle.
  • Value and Output Projections Matter Most: Surprisingly, applying LoRA to projections not involved in weight computation ($W_v$ and $W_o$) yields comparable recovery to updating all projections. This implies that low-rank tuning mostly adjusts the values and outputs to fit the newly learned attention weights.
  • Effective Sequence Length (ESL): The context distribution of the training data matters. Data with longer ESL (like RedPajama) improves retrieval-heavy tasks like MMLU but can slightly degrade performance on general zero-shot tasks compared to instruction data (like Alpaca).

Key Results

  • Drastic Efficiency Gains: LoLCATs achieves state-of-the-art subquadratic performance while updating less than 0.2% of the parameters and using 0.04% of the training tokens compared to prior full-parameter linearization methods.
  • Quality Recovery: It closes the Transformer-linearization quality gap by 79.8% for Mistral 7B and 86.6% for Llama 3 8B on standard benchmarks, outperforming models trained from scratch.
  • Unprecedented Scale: LoLCATs successfully delivered the first linearized 70B and 405B LLMs, closing the 5-shot MMLU gap between the original and linearized Llama 3.1 variants by 77.8% and 78.1% respectively.
  • Inference Speedups: The resulting models support 3× higher throughput and 64× larger batch sizes than standard FlashAttention-2 implementations during generation.
Zero-shot LM Eval Score vs. Training Tokens, highlighting LoLCATs' extreme token efficiency and high accuracy.

Limitations and Future Work

  • Remaining Performance Gap: While LoLCATs significantly narrows the quality gap, a noticeable performance delta still remains on complex benchmarks like MMLU compared to full softmax attention.
  • Long-Context Evaluation: The authors note that while linear attention theoretically excels at long contexts, more thorough evaluation is needed to see how low-rank linearized models hold up in extreme long-context scenarios.
  • Advanced Subquadratic Features: The current implementation uses "vanilla" linear + sliding window attention. Future work could explore incorporating advanced mechanisms like decay terms or gating to further push quality.

Summary updated

BibTeX
@inproceedings{zhang2025lolcats,
  author = {Michael Zhang and Simran Arora and Rahul Chalamala and Alan Wu and Benjamin Spector and Aaryan Singhal and Krithik Ramesh and Christopher Ré},
  title = {{LoLCATs: On Low-Rank Linearizing of Large Language Models}},
  booktitle = {International Conference on Learning Representations},
  year = {2025},
  url = {https://openreview.net/forum?id=8VtGeyJyx9},
}
Figure