SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2602.02016 · ICML · 2026

DASH: Faster Shampoo via Batched Block Preconditioning and Efficient Inverse-Root Solvers

Dan Alistarh, Mher Safaryan, Erik Schultheis, Ionut-Vlad Modoranu, Philip Zmushko

arXiv · PDF · Open in the Atlas

Code that ran

8 of 10 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; 7 failures of our instrument; 2 no recorded run), measured 2026-11-21; 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/2602.02016.json · badge: /api/ran/2602.02016.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
IST-DASLab/DASH canonical (classifier label)
classifier basis: census
8 ran · 2 no recorded run
FunctionStatusWhere it lives
add_model_params Ran
ran; our contract draft was wrong, not the code
IST-DASLab/DASH/src/run_dash.py
code served (permissive licence) · get_code("603f31728a058332")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned dict. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import math

ARGS = {
    'model_size': 100,
    'tokens_ratio': 0.5,
    'seq_len': 512,
    'batch_size': 16,
    'acc_steps': 4,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
compute_layer_sparsities Ran
ran; our contract draft was wrong, not the code
IST-DASLab/DASH/src/optim/optim.py
code served (permissive licence) · get_code("f187a1faab667d73")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned str. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn

torch.manual_seed(0)

class SimpleModel(nn.Module):
    def __init__(self):
        super().__init__()
        # Create parameters with some zeros to get non-zero sparsity
        self.linear1 = nn.Linear(4, 3)
        self.linear2 = nn.Linear(3, 2)
        
        # Set some weights to zero to create sparsity
        with torch.no_grad():
            self.linear1.weight[0, :] = 0
            self.linear2.bias[0] = 0

model = SimpleModel()

ARGS = {
    "model": model
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
cos_inf_schedule Ran
ran; our contract draft was wrong, not the code
IST-DASLab/DASH/src/optim/utils.py
code served (permissive licence) · get_code("91d9a7a7d597054b")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned function. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import numpy as np

ARGS = {
    "n_iterations": 1000,
    "n_warmup": 100,
    "div_factor": 25.0,
    "final_div_factor": 10000.0,
    "n_inf": 50,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type function — a function output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a function output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
get_batch Ran
ran; our contract draft was wrong, not the code
IST-DASLab/DASH/src/optim/utils.py
code served (permissive licence) · get_code("f9dc20d4ad58a5f9")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple. The image it ran in was not recorded. The code mentions cuda, and the harness aliases cuda to the CPU for every sample; whether this run needed that is not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

torch.manual_seed(0)

class DataReader:
    def sample_batch(self):
        x = torch.randn(2, 4)
        y = torch.randn(2, 3)
        return x, y

datareader = DataReader()
device = 'cpu'

ARGS = {
    'datareader': datareader,
    'device': device
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple — a tuple output has no array shape of its own; none is stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
move_to_cpu Ran
ran; our contract draft was wrong, not the code
IST-DASLab/DASH/src/logger/logger.py
code served (permissive licence) · get_code("1bd86a911c3f78a3")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned dict. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import copy
import torch

torch.manual_seed(0)

# Create test data structures with tensors on CPU
tensor_on_cpu = torch.randn(2, 4)
nested_dict = {
    'a': torch.randn(2, 3),
    'b': {
        'c': torch.randn(2, 4, 5),
        'd': 42
    }
}
nested_list = [
    torch.randn(2, 4),
    [torch.randn(3, 4), 'string'],
    {'key': torch.randn(2, 2)}
]
nested_tuple = (
    torch.randn(2, 4),
    (torch.randn(3, 2), 100),
    {'nested': torch.randn(2, 3)}
)
mixed_structure = {
    'tensors': [torch.randn(2, 4), torch.randn(3, 4)],
    'scalars': [1, 2.5, 'test'],
    'nested': (torch.randn(2, 2), {'inner': torch.randn(4, 3)})
}

ARGS = {
    'data': mixed_structure,
    'clone': False
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
precompute_freqs_cis Ran
ran, honoured the contract we drafted
IST-DASLab/DASH/src/models/llama.py
code served (permissive licence) · get_code("a1d6f89d43fc42e1")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 3, dtype family float, shape (2, 2, 2) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

torch.manual_seed(0)

ARGS = {
    "dim": 4,
    "end": 2,
    "theta": 10000.0,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 3, dtype family float, shape (2, 2, 2) — shape (2, 2, 2) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
self_preserving_overwrite Ran
ran; our contract draft was wrong, not the code
IST-DASLab/DASH/src/logger/logger.py
code served (permissive licence) · get_code("198aea734522a443")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned function. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn
from functools import wraps

def self_preserving_overwrite(method):

    @wraps(method)
    def _impl(inner_self, *args, **kwargs):
        return method(*args, **kwargs)
    return _impl


# Create a simple test method
def test_method(*args, **kwargs):
    return "test_result"


# ARGS must map every parameter of self_preserving_overwrite to a value
# The only parameter is 'method', which should be a callable
ARGS = {
    "method": test_method
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type function — a function output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a function output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
wsd_schedule Ran
ran; our contract draft was wrong, not the code
IST-DASLab/DASH/src/optim/utils.py
code served (permissive licence) · get_code("e8ac769090ecbe45")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned function. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import math

ARGS = {
    'n_iterations': 10000,
    'final_lr_factor': 0.1,
    'n_warmup': 1000,
    'init_div_factor': 100,
    'fract_decay': 0.1,
    'decay_type': 'linear'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type function — a function output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a function output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
apply_rotary_emb Not yet run
unverified (harvested, no recorded run)
IST-DASLab/DASH/src/models/llama.py
code served (permissive licence) · get_code("9891174b43bd9c9a")
How it ran

no invocation recorded.

get_model Not yet run
unverified (harvested, no recorded run)
IST-DASLab/DASH/src/models/utils.py
code served (permissive licence) · get_code("843859340885ab12")
How it ran

no invocation recorded.

Also present in other papers' code

Of 10 samples lifted from this paper's linked repositories, 10 carry a function identity and 0 do not. Of the 10 distinct functions with an identity, 8 are also present in other papers whose code we hold (8 with at least one paper dated earlier, 4 the same month, 4 later) and 2 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
precompute_freqs_cis 6 other papers
3 dated earlier, 1 the same month, 2 later
2405.18392 (2024-05)
Scaling Laws and Compute-Optimal Training Beyond Fixed Training Durations
2502.05003 (2025-02)
QuEST: Stable Training of LLMs with 1-Bit Weights and Activations
2507.09846 (2025-07)
Through the River: Understanding the Benefit of Schedule-Free Methods for Language Model Training
and 3 more not named here
apply_rotary_emb 5 other papers
2 dated earlier, 1 the same month, 2 later
2405.18392 (2024-05)
Scaling Laws and Compute-Optimal Training Beyond Fixed Training Durations
2507.09846 (2025-07)
Through the River: Understanding the Benefit of Schedule-Free Methods for Language Model Training
2602.07425 (2026-02)
Sign-Based Optimizers Are Effective Under Heavy-Tailed Noise
and 2 more not named here
move_to_cpu 5 other papers
3 dated earlier, 1 the same month, 1 later
2405.18392 (2024-05)
Scaling Laws and Compute-Optimal Training Beyond Fixed Training Durations
2502.05003 (2025-02)
QuEST: Stable Training of LLMs with 1-Bit Weights and Activations
2507.09846 (2025-07)
Through the River: Understanding the Benefit of Schedule-Free Methods for Language Model Training
and 2 more not named here
self_preserving_overwrite 5 other papers
3 dated earlier, 1 the same month, 1 later
2405.18392 (2024-05)
Scaling Laws and Compute-Optimal Training Beyond Fixed Training Durations
2502.05003 (2025-02)
QuEST: Stable Training of LLMs with 1-Bit Weights and Activations
2507.09846 (2025-07)
Through the River: Understanding the Benefit of Schedule-Free Methods for Language Model Training
and 2 more not named here
get_model 2 other papers
2 dated earlier
2405.18392 (2024-05)
Scaling Laws and Compute-Optimal Training Beyond Fixed Training Durations
2502.05003 (2025-02)
QuEST: Stable Training of LLMs with 1-Bit Weights and Activations
cos_inf_schedule 1 other paper
1 dated earlier
2405.18392 (2024-05)
Scaling Laws and Compute-Optimal Training Beyond Fixed Training Durations
get_batch 1 other paper
1 dated earlier
2405.18392 (2024-05)
Scaling Laws and Compute-Optimal Training Beyond Fixed Training Durations
wsd_schedule 1 other paper
1 dated earlier
2405.18392 (2024-05)
Scaling Laws and Compute-Optimal Training Beyond Fixed Training Durations

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

Repositories linked to this paper

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

Abstract

Shampoo is one of the leading approximate second-order optimizers: a variant of it has won the MLCommons AlgoPerf competition, and it has been shown to produce models with lower activation outliers that are easier to compress. Yet, applying Shampoo currently comes at the cost of significant computational slowdown, due to its expensive internal operations. In this paper, we take a significant step to address this shortcoming by proposing DASH (for Distributed Accelerated SHampoo), a faster implementation of Distributed Shampoo based on two main new techniques: First, we show that preconditioner blocks can be stacked into 3D tensors to significantly improve GPU utilization; second, we introduce the Newton-DB iteration and the Chebyshev polynomial approximations as novel and faster approaches for computing the inverse matrix roots required by Shampoo. Along with these algorithmic contributions, we provide a first in-depth analysis of how matrix scaling critically affects Shampoo convergence. On the practical side, our GPU-aware implementation achieves up to 5.6× faster optimizer steps compared to the well-optimized Distributed Shampoo, while Newton-DB attains the lowest validation perplexity per iteration among all tested methods. Our code is available at https://github.com/IST-DASLab/DASH.

For agents

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

get_harvested_code_for_paper("2602.02016")
get_code_for_paper("2602.02016")
have("2602.02016")

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

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

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

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

Connect an agent — have() is free.