SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2405.15551 · NeurIPS · 2024

Thinking Forward: Memory-Efficient Federated Finetuning of Language Models

Lijun Zhang, Hui Guan, Kunjal Panchal, Sunav Choudhary, Nisarg Parikh, Yuriy Brun

arXiv · PDF · Open in the Atlas

Code that ran

8 of 12 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 8 failures of our instrument; 4 no recorded run), measured 2026-11-24; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2405.15551.json · badge: /api/ran/2405.15551.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
Astuary/Spry canonical (classifier label)
classifier basis: census
6 ran · 4 no recorded run
astuary/spry canonical (classifier label)
classifier basis: classifier_2025
2 ran · 0 no recorded run
FunctionStatusWhere it lives
agnews_train Ran
ran; our contract draft was wrong, not the code
Astuary/Spry/trainers/barebones_fedsgd_grads.py
pointer only (licence: NONE) · get_code("2b2151c3ecd6ee73")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, Astuary/Spry when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

create_position_ids_from_input_ids Ran
ran; our contract draft was wrong, not the code
Astuary/Spry/models/mezo_modeling_roberta.py
pointer only (licence: NONE); the stored copy get_code serves, from Kowsher/Propulsion, is pointer only (licence: NONE) · get_code("38f46ef4e03fee1c")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, Astuary/Spry when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

functional_xent Ran
ran; our contract draft was wrong, not the code
Astuary/Spry/utils/forward_AD_loss.py
pointer only (licence: NONE) · get_code("1e35965d04893409")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, Astuary/Spry when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

get_agnews_federated Ran
ran; our contract draft was wrong, not the code
astuary/spry/dataloaders/agnews/agnews_sequence_classification_dataloader.py
pointer only (licence: NONE) · get_code("057080b4bf59a21f")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, astuary/spry when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

get_squad_federated Ran
ran; our contract draft was wrong, not the code
Astuary/Spry/dataloaders/squad/squad_dataloader_xlnet.py
pointer only (licence: NONE) · get_code("817852bc8240850d")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, Astuary/Spry when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

model_for_prompting_forward Ran
ran; our contract draft was wrong, not the code
astuary/spry/models/mezo_models.py
pointer only (licence: NONE) · get_code("823903871ccc233c")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, astuary/spry when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

preprocess_function Ran
ran; our contract draft was wrong, not the code
Astuary/Spry/dataloaders/squad/squad_dataloader_xlnet.py
pointer only (licence: NONE) · get_code("ab07bf58ec11dfde")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, Astuary/Spry when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

xent Ran
ran; our contract draft was wrong, not the code
Astuary/Spry/utils/forward_AD_loss.py
pointer only (licence: NONE) · get_code("459bc0b35c09b3ca")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, Astuary/Spry when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

functional_fwd_pass Not yet run
unverified (harvested, no recorded run)
Astuary/Spry/utils/forward_AD_loss.py
pointer only (licence: NONE) · get_code("ec93cf99bea16b77")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, Astuary/Spry when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

get_federated_datasets Not yet run
unverified (harvested, no recorded run)
Astuary/Spry/dataloaders/agnews/agnews_language_modeling_dataloader.py
pointer only (licence: NONE) · get_code("ba81e5882d4e7bd7")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, Astuary/Spry when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

load_agnews_federated Not yet run
unverified (harvested, no recorded run)
Astuary/Spry/dataloaders/agnews/agnews_language_modeling_dataloader.py
pointer only (licence: NONE) · get_code("1f4d8a0b9446fd50")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, Astuary/Spry when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

load_squad_federated Not yet run
unverified (harvested, no recorded run)
Astuary/Spry/dataloaders/squad/squad_dataloader_xlnet.py
pointer only (licence: NONE) · get_code("7a998eeddf6c4979")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, Astuary/Spry when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

Also present in other papers' code

Of 12 samples lifted from this paper's linked repositories, 12 carry a function identity and 0 do not. Of the 12 distinct functions with an identity, 3 are also present in other papers whose code we hold (3 with at least one paper dated earlier, 0 the same month, 1 later) and 9 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

FunctionAlso present inEarliest-datedOthers named
create_position_ids_from_input_ids 28 other papers
20 dated earlier, 5 later, 3 same year, order not determinable
2107.00910 (2021-07)
Learned Token Pruning for Transformers
2107.14035 (2021-07)
ProtoTransformer: A Meta-Learning Approach to Providing Student Feedback
2201.11732 (2022-01)
IGLUE: A Benchmark for Transfer Learning across Modalities, Tasks, and Languages
and 25 more not named here
functional_xent 1 other paper
1 dated earlier
2202.08587 (2022-02)
Gradients without Backpropagation
xent 1 other paper
1 dated earlier
2202.08587 (2022-02)
Gradients without Backpropagation

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-24.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

Finetuning large language models (LLMs) in federated learning (FL) settings has become increasingly important as it allows resource-constrained devices to finetune a model using private data. However, finetuning LLMs using backpropagation requires excessive memory (especially from intermediate activations) for resource-constrained devices. While Forward-mode Auto-Differentiation (AD) can significantly reduce memory footprint from activations, we observe that directly applying it to LLM finetuning results in slow convergence and poor accuracy. In this paper, we introduce SPRY, an FL algorithm that splits trainable weights of an LLM among participating clients, such that each client computes gradients using Forward-mode AD that are closer estimations of the true gradients. SPRY achieves a low memory footprint, high accuracy, and fast convergence. We formally prove that the global gradients in SPRY are unbiased estimators of true global gradients for homogeneous data distributions across clients, while heterogeneity increases bias of the estimates. We also derive SPRY's convergence rate, showing that the gradients decrease inversely proportional to the number of FL rounds, indicating the convergence up to the limits of heterogeneity. Empirically, SPRY reduces the memory footprint during training by 1.4-7.1× in contrast to backpropagation, while reaching comparable accuracy, across a wide range of language tasks, models, and FL settings. SPRY reduces the convergence time by 1.2-20.3× and achieves 5.2-13.5% higher accuracy against state-of-the-art zero-order methods. When finetuning Llama2-7B with LoRA, compared to the peak memory consumption of 33.9GB of backpropagation, SPRY only consumes 6.2GB of peak memory. For OPT13B, the reduction is from 76.5GB to 10.8GB. SPRY makes feasible previously impossible FL deployments on commodity mobile and edge devices. Our source code is available for replication at https://github.com/Astuary/Spry. 38th Conference on Neural Information Processing Systems (NeurIPS 2024).

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2405.15551")
get_code_for_paper("2405.15551")
have("2405.15551")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/2405.15551.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/2405.15551.svg)](https://syntology.ai/paper/2405.15551)

Connect an agent — have() is free.