SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2405.18144 · NeurIPS · 2024

4-bit Shampoo for Memory-Efficient Network Training

Pan Zhou, Jia Li, Hua Huang, Sike Wang

arXiv · PDF · Open in the Atlas

Code that ran

13 of 15 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; 13 failures of our instrument; 2 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.18144.json · badge: /api/ran/2405.18144.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
sike-wang/low-bit-shampoo canonical (classifier label)
classifier basis: census
13 ran · 2 no recorded run
FunctionStatusWhere it lives
MatPower Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
sike-wang/low-bit-shampoo/optimizers/matrix_functions.py
pointer only (licence: NONE) · get_code("7f680e86e6397b23")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, sike-wang/low-bit-shampoo 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.

densenet121 Ran
ran; our contract draft was wrong, not the code
sike-wang/low-bit-shampoo/models/densenet.py
pointer only (licence: NONE) · get_code("567029bd46065708")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, sike-wang/low-bit-shampoo 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.

densenet169 Ran
ran; our contract draft was wrong, not the code
sike-wang/low-bit-shampoo/models/densenet.py
pointer only (licence: NONE) · get_code("3ed7580937fb0008")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, sike-wang/low-bit-shampoo 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.

densenet201 Ran
ran; our contract draft was wrong, not the code
sike-wang/low-bit-shampoo/models/densenet.py
pointer only (licence: NONE) · get_code("b70932e817d72f6c")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, sike-wang/low-bit-shampoo 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.

resnet18 Ran
ran; our contract draft was wrong, not the code
sike-wang/low-bit-shampoo/models/resnet.py
pointer only (licence: NONE) · get_code("71ae4764866d8ea8")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, sike-wang/low-bit-shampoo 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.

resnet34 Ran
ran; our contract draft was wrong, not the code
sike-wang/low-bit-shampoo/models/resnet.py
pointer only (licence: NONE) · get_code("8422d19ea2f1ab19")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, sike-wang/low-bit-shampoo 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.

resnet50 Ran
ran; our contract draft was wrong, not the code
sike-wang/low-bit-shampoo/models/resnet.py
pointer only (licence: NONE) · get_code("aa756ebc41f95062")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, sike-wang/low-bit-shampoo 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.

swin_tiny Ran
ran; our contract draft was wrong, not the code
sike-wang/low-bit-shampoo/models/swin.py
pointer only (licence: NONE) · get_code("1b9cf937758df695")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, sike-wang/low-bit-shampoo 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.

vgg11 Ran
ran; our contract draft was wrong, not the code
sike-wang/low-bit-shampoo/models/vgg.py
pointer only (licence: NONE) · get_code("05abe9f6c5347322")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, sike-wang/low-bit-shampoo 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.

vgg13 Ran
ran; our contract draft was wrong, not the code
sike-wang/low-bit-shampoo/models/vgg.py
pointer only (licence: NONE) · get_code("d77d79a6e5db71b8")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, sike-wang/low-bit-shampoo 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.

vgg16 Ran
ran; our contract draft was wrong, not the code
sike-wang/low-bit-shampoo/models/vgg.py
pointer only (licence: NONE) · get_code("0579755ab192dafc")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, sike-wang/low-bit-shampoo 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.

vit_base_32_224 Ran
ran; our contract draft was wrong, not the code
sike-wang/low-bit-shampoo/models/vit.py
pointer only (licence: NONE) · get_code("6ecf696df373b05d")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, sike-wang/low-bit-shampoo 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.

vit_small Ran
ran; our contract draft was wrong, not the code
sike-wang/low-bit-shampoo/models/vit.py
pointer only (licence: NONE) · get_code("42ddec61c2f4cb83")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, sike-wang/low-bit-shampoo 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.

ComputePower Not yet run
unverified (harvested, no recorded run)
sike-wang/low-bit-shampoo/optimizers/matrix_functions.py
pointer only (licence: NONE) · get_code("d77abe9d00f96a18")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, sike-wang/low-bit-shampoo 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.

PowerIter Not yet run
unverified (harvested, no recorded run)
sike-wang/low-bit-shampoo/optimizers/matrix_functions.py
pointer only (licence: NONE) · get_code("3e19268a6eb951a3")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, sike-wang/low-bit-shampoo 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 15 samples lifted from this paper's linked repositories, 15 carry a function identity and 0 do not. Of the 15 distinct functions with an identity, 1 are also present in other papers whose code we hold (1 with at least one paper dated earlier, 0 the same month, 0 later) and 14 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
MatPower 1 other paper
1 dated earlier
1802.09568 (2018-02)
Shampoo: Preconditioned Stochastic Tensor Optimization

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

Second-order optimizers, maintaining a matrix termed a preconditioner, are superior to first-order optimizers in both theory and practice. The states forming the preconditioner and its inverse root restrict the maximum size of models trained by second-order optimizers. To address this, compressing 32-bit optimizer states to lower bitwidths has shown promise in reducing memory usage. However, current approaches only pertain to first-order optimizers. In this paper, we propose the first 4-bit second-order optimizers, exemplified by 4-bit Shampoo, maintaining performance similar to that of 32-bit ones. We show that quantizing the eigenvector matrix of the preconditioner in 4-bit Shampoo is remarkably better than quantizing the preconditioner itself both theoretically and experimentally. By rectifying the orthogonality of the quantized eigenvector matrix, we enhance the approximation of the preconditioner's eigenvector matrix, which also benefits the computation of its inverse 4-th root. Besides, we find that linear square quantization slightly outperforms dynamic tree quantization when quantizing second-order optimizer states. Evaluation on various networks for image classification and natural language modeling demonstrates that our 4-bit Shampoo achieves comparable performance to its 32-bit counterpart while being more memory-efficient * .

For agents

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

get_harvested_code_for_paper("2405.18144")
get_code_for_paper("2405.18144")
have("2405.18144")

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

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

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

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

Connect an agent — have() is free.