SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2402.11592 · 2024

Revisiting Zeroth-Order Optimization for Memory-Efficient LLM Fine-Tuning: A Benchmark

arXiv · PDF · Open in the Atlas

Code that ran

9 of 13 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; 1 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 8 failures of our instrument; 4 no recorded run); 1 of them was also run on the host, not in the jail, by the peer-agreement lane that set its level, measured 2026-11-22; 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/2402.11592.json · badge: /api/ran/2402.11592.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
zo-bench/zo-llm canonical (classifier label)
classifier basis not recorded on the link
9 ran · 4 no recorded run
FunctionStatusWhere it lives
repeat_kv Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
zo-bench/zo-llm/zo-bench/modeling_llama.py
pointer only (licence: GPL-3.0) · get_code("30d7eec482ebf6b1")
How it ran

The body of this sample is withheld: GPL-3.0, as GitHub detects it on this paper's repository, zo-bench/zo-llm, is not in the permissive set Syntology serves inline. 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.

apply_rotary_pos_emb Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
zo-bench/zo-llm/zo-bench/modeling_llama.py
pointer only (licence: GPL-3.0) · get_code("d61c483a3c2b3156")
How it ran

The body of this sample is withheld: GPL-3.0, as GitHub detects it on this paper's repository, zo-bench/zo-llm, is not in the permissive set Syntology serves inline. 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.

apply_rotary_pos_emb Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
zo-bench/zo-llm/zo-bench/modeling_mistral/modeling_mistral.py
pointer only (licence: GPL-3.0) · get_code("f725bc2d76076485")
How it ran

The body of this sample is withheld: GPL-3.0, as GitHub detects it on this paper's repository, zo-bench/zo-llm, is not in the permissive set Syntology serves inline. 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.

encode_prompt Ran
ran; our contract draft was wrong, not the code
zo-bench/zo-llm/zo-bench/utils.py
pointer only (licence: GPL-3.0); the stored copy get_code serves, from zimingyy/subzero, is pointer only (licence: GPL-3.0) · get_code("f53e3216ab15d617")
How it ran

The body of this sample is withheld: GPL-3.0, as GitHub detects it on this paper's repository, zo-bench/zo-llm, is not in the permissive set Syntology serves inline. 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.

f1 Ran
ran, honoured the contract we drafted
zo-bench/zo-llm/zo-bench/metrics.py
pointer only (licence: GPL-3.0) · get_code("b989d4bce26f77ce")
How it ran

The body of this sample is withheld: GPL-3.0, as GitHub detects it on this paper's repository, zo-bench/zo-llm, is not in the permissive set Syntology serves inline. 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.

find_module Ran
ran; our contract draft was wrong, not the code
zo-bench/zo-llm/zo-bench/lora.py
pointer only (licence: GPL-3.0); the stored copy get_code serves, from JingXuTHU/Random-Masking-Finds-Winning-Tickets-for-Parameter-Efficient-Fine-tuning, is pointer only (licence: NONE) · get_code("b5adfd6ac99a1b18")
How it ran

The body of this sample is withheld: GPL-3.0, as GitHub detects it on this paper's repository, zo-bench/zo-llm, is not in the permissive set Syntology serves inline. 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.

forward_wrap_with_option_len Ran
ran; our contract draft was wrong, not the code
zo-bench/zo-llm/zo-bench/utils.py
pointer only (licence: GPL-3.0); the stored copy get_code serves, from zimingyy/subzero, is pointer only (licence: GPL-3.0) · get_code("6a8d363117a347bd")
How it ran

The body of this sample is withheld: GPL-3.0, as GitHub detects it on this paper's repository, zo-bench/zo-llm, is not in the permissive set Syntology serves inline. 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.

normalize_answer Ran
ran; our contract draft was wrong, not the code
zo-bench/zo-llm/zo-bench/metrics.py
pointer only (licence: GPL-3.0); the stored copy get_code serves, from borealisai/radar-decoding, is pointer only (licence: LGPL-3.0) · get_code("e7e75981cb464788")
How it ran

The body of this sample is withheld: GPL-3.0, as GitHub detects it on this paper's repository, zo-bench/zo-llm, is not in the permissive set Syntology serves inline. 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.

rotate_half Ran
ran; our contract draft was wrong, not the code
zo-bench/zo-llm/zo-bench/modeling_llama.py
pointer only (licence: GPL-3.0) · get_code("b99eea6376d1e212")
How it ran

The body of this sample is withheld: GPL-3.0, as GitHub detects it on this paper's repository, zo-bench/zo-llm, is not in the permissive set Syntology serves inline. 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.

attn_forward_hook Not yet run
unverified (harvested, no recorded run)
zo-bench/zo-llm/zo-bench/prefix_tuning.py
pointer only (licence: GPL-3.0) · get_code("bdb460cb247501dc")
How it ran

The body of this sample is withheld: GPL-3.0, as GitHub detects it on this paper's repository, zo-bench/zo-llm, is not in the permissive set Syntology serves inline. 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.

calculate_metric Not yet run
unverified (harvested, no recorded run)
zo-bench/zo-llm/zo-bench/metrics.py
pointer only (licence: GPL-3.0) · get_code("84c658f2c9252878")
How it ran

The body of this sample is withheld: GPL-3.0, as GitHub detects it on this paper's repository, zo-bench/zo-llm, is not in the permissive set Syntology serves inline. 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_task Not yet run
unverified (harvested, no recorded run)
zo-bench/zo-llm/zo-bench/tasks.py
pointer only (licence: GPL-3.0) · get_code("f7c384f1e681ea7a")
How it ran

The body of this sample is withheld: GPL-3.0, as GitHub detects it on this paper's repository, zo-bench/zo-llm, is not in the permissive set Syntology serves inline. 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.

prepare_inputs_for_generation Not yet run
unverified (harvested, no recorded run)
zo-bench/zo-llm/zo-bench/prefix_tuning.py
pointer only (licence: GPL-3.0) · get_code("84920a8095dca4fa")
How it ran

The body of this sample is withheld: GPL-3.0, as GitHub detects it on this paper's repository, zo-bench/zo-llm, is not in the permissive set Syntology serves inline. 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 13 samples lifted from this paper's linked repositories, 13 carry a function identity and 0 do not. Of the 13 distinct functions with an identity, 13 are also present in other papers whose code we hold (11 with at least one paper dated earlier, 10 the same month, 13 later) and 0 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
rotate_half 360 other papers
68 dated earlier, 25 the same month, 258 later, 6 same year, order not determinable, 3 undated · 30 only as an assembly brick
1901.02860 (2019-01)
Transformer-XL: Attentive Language Models Beyond a Fixed-Length Context
2203.08913 (2022-03)
Memorizing Transformers
2302.13971 (2023-02)
LLaMA: Open and Efficient Foundation Language Models
and 357 more not named here
repeat_kv 243 other papers
33 dated earlier, 19 the same month, 187 later, 2 same year, order not determinable, 2 undated · 22 only as an assembly brick
1901.02860 (2019-01)
Transformer-XL: Attentive Language Models Beyond a Fixed-Length Context
2203.08913 (2022-03)
Memorizing Transformers
2305.17888 (2023-05)
LLM-QAT: Data-Free Quantization Aware Training for Large Language Models
and 240 more not named here
normalize_answer 133 other papers
59 dated earlier, 8 the same month, 65 later, 1 undated · 1 only as an assembly brick
1508.06615 (2015-08)
Character-Aware Neural Language Models
1606.05250 (2016-06)
SQuAD: 100,000+ Questions for Machine Comprehension of Text
1608.07905 (2016-08)
Machine Comprehension Using Match-LSTM and Answer Pointer
and 130 more not named here
apply_rotary_pos_emb 83 other papers
19 dated earlier, 11 the same month, 51 later, 2 same year, order not determinable · 6 only as an assembly brick
2306.15595 (2023-06)
Extending Context Window of Large Language Models via Positional Interpolation
2307.05695 (2023-07)
ReLoRA: High-Rank Training Through Low-Rank Updates
2307.06945 (2023-07)
In-context Autoencoder for Context Compression in a Large Language Model
and 80 more not named here
apply_rotary_pos_emb 75 other papers
9 dated earlier, 5 the same month, 61 later · 2 only as an assembly brick
2309.11499 (2023-09)
DreamLLM: Synergistic Multimodal Comprehension and Creation
2312.02051 (2023-12)
TimeChat: A Time-sensitive Multimodal Large Language Model for Long Video Understanding
2312.03414 (2023-12)
Compressed Context Memory For Online Language Model Interaction
and 72 more not named here
find_module 8 other papers
3 dated earlier, 2 the same month, 3 later
2305.17333 (2023-05)
Fine-Tuning Language Models with Just Forward Passes
2310.09639 (2023-10)
DPZero: Private Fine-Tuning of Language Models without Backpropagation
2312.15184 (2023-12)
ZO-AdaMU Optimizer: Adapting Perturbation by the Momentum and Uncertainty in Zeroth-order Optimization
and 5 more not named here
calculate_metric 7 other papers
3 dated earlier, 1 the same month, 3 later
2305.17333 (2023-05)
Fine-Tuning Language Models with Just Forward Passes
2310.09639 (2023-10)
DPZero: Private Fine-Tuning of Language Models without Backpropagation
2312.15184 (2023-12)
ZO-AdaMU Optimizer: Adapting Perturbation by the Momentum and Uncertainty in Zeroth-order Optimization
and 4 more not named here
f1 7 other papers
3 dated earlier, 1 the same month, 3 later
2305.17333 (2023-05)
Fine-Tuning Language Models with Just Forward Passes
2310.09639 (2023-10)
DPZero: Private Fine-Tuning of Language Models without Backpropagation
2312.15184 (2023-12)
ZO-AdaMU Optimizer: Adapting Perturbation by the Momentum and Uncertainty in Zeroth-order Optimization
and 4 more not named here
get_task 7 other papers
3 dated earlier, 4 later
2305.17333 (2023-05)
Fine-Tuning Language Models with Just Forward Passes
2310.09639 (2023-10)
DPZero: Private Fine-Tuning of Language Models without Backpropagation
2312.15184 (2023-12)
ZO-AdaMU Optimizer: Adapting Perturbation by the Momentum and Uncertainty in Zeroth-order Optimization
and 4 more not named here
attn_forward_hook 6 other papers
3 dated earlier, 1 the same month, 2 later
2305.17333 (2023-05)
Fine-Tuning Language Models with Just Forward Passes
2310.09639 (2023-10)
DPZero: Private Fine-Tuning of Language Models without Backpropagation
2312.15184 (2023-12)
ZO-AdaMU Optimizer: Adapting Perturbation by the Momentum and Uncertainty in Zeroth-order Optimization
and 3 more not named here
prepare_inputs_for_generation 6 other papers
3 dated earlier, 1 the same month, 2 later
2305.17333 (2023-05)
Fine-Tuning Language Models with Just Forward Passes
2310.09639 (2023-10)
DPZero: Private Fine-Tuning of Language Models without Backpropagation
2312.15184 (2023-12)
ZO-AdaMU Optimizer: Adapting Perturbation by the Momentum and Uncertainty in Zeroth-order Optimization
and 3 more not named here
encode_prompt 2 other papers
2 later
2406.00132 (2024-06)
QuanTA: Efficient High-Rank Fine-Tuning of LLMs with Quantum-Informed Tensor Adaptation
2410.08989 (2024-10)
Zeroth-Order Fine-Tuning of LLMs in Random Subspaces
forward_wrap_with_option_len 1 other paper
1 later
2410.08989 (2024-10)
Zeroth-Order Fine-Tuning of LLMs in Random Subspaces

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-22.

Repositories linked to this paper

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

Abstract

In the evolving landscape of natural language processing (NLP), fine-tuning pre-trained Large Language Models (LLMs) with first-order (FO) optimizers like SGD and Adam has become standard. Yet, as LLMs grow {in size}, the substantial memory overhead from back-propagation (BP) for FO gradient computation presents a significant challenge. Addressing this issue is crucial, especially for applications like on-device training where memory efficiency is paramount. This paper proposes a shift towards BP-free, zeroth-order (ZO) optimization as a solution for reducing memory costs during LLM fine-tuning, building on the initial concept introduced by MeZO. Unlike traditional ZO-SGD methods, our work expands the exploration to a wider array of ZO optimization techniques, through a comprehensive, first-of-its-kind benchmarking study across five LLM families (Roberta, OPT, LLaMA, Vicuna, Mistral), three task complexities, and five fine-tuning schemes. Our study unveils previously overlooked optimization principles, highlighting the importance of task alignment, the role of the forward gradient method, and the balance between algorithm complexity and fine-tuning performance. We further introduce novel enhancements to ZO optimization, including block-wise descent, hybrid training, and gradient sparsity. Our study offers a promising direction for achieving further memory-efficient LLM fine-tuning. Codes to reproduce all our experiments are at https://github.com/ZO-Bench/ZO-LLM .

For agents

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

get_harvested_code_for_paper("2402.11592")
get_code_for_paper("2402.11592")
have("2402.11592")

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

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

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

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

Connect an agent — have() is free.