Papers › Linearizing Large Language Models

Linearizing Large Language Models

10 May 2024arXiv:2405.06640archive 2025-07-28

Jean Mercat, Igor Vasiljevic, Sedrick Keh, Kushal Arora, Achal Dave, Adrien Gaidon, Thomas Kollar

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 formulation suffers from poor scaling and underperforms compute-matched transformers. Recent linear models such as RWKV and Mamba have attempted to address these shortcomings by proposing novel time-mixing and gating architectures, but pre-training large language models requires significant data and compute investments. Thus, the search for subquadratic architectures is limited by the availability of compute and quality pre-training datasets. As a cost-effective alternative to pre-training linear transformers, we propose Scalable UPtraining for Recurrent Attention (SUPRA). We present a method to uptrain existing large pre-trained transformers into Recurrent Neural Networks (RNNs) with a modest compute budget. This allows us to leverage the strong pre-training data and performance of existing transformer LLMs, while requiring 5% of the training cost. We find that our linearization technique leads to competitive performance on standard benchmarks, but we identify persistent in-context learning and long-context modeling shortfalls for even the largest linear models. Our code and models can be found at https://github.com/TRI-ML/linear_open_lm.

PaperPDFCodeCode Syntology ran

In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="2405.06640")

Code

Syntology Ran 15 of 18 code samples harvested from 1 repository linked to this paper; 3 have no recorded run. Of those that ran: 3 ran · violated contract; 12 ran with no contract checked.

By repository: official repository: 18 samples from 1 repository, 15 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

tri-ml/linear_open_lm officialmentioned in papermentioned on GitHubpytorchMIT report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

18 samples harvested; 15 ran; 0 honoured the contract we drafted; 3 have no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

3ran · violated contract
12ran
3unverified

Licence: 0 of the 18 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from tri-ml/linear_open_lm. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

check_replacement_type tri-ml/linear_open_lm/open_lm/params.py official repository ran fingerprinted MIT (permissive) · 11254c5664bf9e38 · report
combine_average_meters tri-ml/linear_open_lm/open_lm/meters.py official repository ran MIT (permissive) · 21f8a6ae2cd2f6b2 · report
combine_ci_meters tri-ml/linear_open_lm/open_lm/meters.py official repository ran MIT (permissive) · 37990e880b7555d5 · report
get_norm_class tri-ml/linear_open_lm/open_lm/norms.py official repository ran MIT (permissive) · df90feaeceb948d1 · report
get_rectangular_causal_mask tri-ml/linear_open_lm/open_lm/attention.py official repository ran MIT (permissive) · 03aee31b8bbd541f · report
get_slopes_power_of_2 tri-ml/linear_open_lm/open_lm/model.py official repository ran MIT (permissive) · 234d4be90599afa0 · report
is_global_master tri-ml/linear_open_lm/open_lm/distributed.py official repository ran · violated contract MIT (permissive) · 7c29b374198bddcd · report
is_local_master tri-ml/linear_open_lm/open_lm/distributed.py official repository ran · violated contract MIT (permissive) · 0377e309e95cfc3e · report
is_master tri-ml/linear_open_lm/open_lm/distributed.py official repository ran · violated contract MIT (permissive) · b092791002b40e8a · report
maybe_load_config tri-ml/linear_open_lm/open_lm/params.py official repository ran MIT (permissive) · 703ae0b4a799d756 · report
no_slope_tensor tri-ml/linear_open_lm/open_lm/model.py official repository ran MIT (permissive) · e347aa4278492da6 · report
preprocess_json tri-ml/linear_open_lm/open_lm/data.py official repository ran fingerprinted MIT (permissive) · 913e58b6265fae28 · report
preprocess_txt tri-ml/linear_open_lm/open_lm/data.py official repository ran MIT (permissive) · fc518c7f20985201 · report
proc_token tri-ml/linear_open_lm/open_lm/data.py official repository ran fingerprinted MIT (permissive) · cc40644322b3f4f3 · report
torch_attn tri-ml/linear_open_lm/open_lm/attention.py official repository ran MIT (permissive) · 632965ea87f107bf · report
remote_sync tri-ml/linear_open_lm/open_lm/file_utils.py official repository unverified MIT (permissive) · c8826eee91bf0f73 · report
remote_sync_fsspec tri-ml/linear_open_lm/open_lm/file_utils.py official repository unverified MIT (permissive) · 5ef1e6fce93e5928 · report
remote_sync_s3 tri-ml/linear_open_lm/open_lm/file_utils.py official repository unverified MIT (permissive) · 0cf5fb2e3a3a9114 · report

Tasks

In-Context LearningMamba

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

Methods

Softmax

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections