SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2510.11168 · ICML · 2025

ELMO : Efficiency via Low-precision and Peak Memory Optimization in Large Output Spaces

Erik Schultheis, Rohit Babbar, Nasib Ullah, Jinbin Zhang

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; 2 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 6 failures of our instrument; 2 no recorded run), measured 2026-11-23; 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/2510.11168.json · badge: /api/ran/2510.11168.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
xmc-aalto/elmo canonical (classifier label)
classifier basis: census
5 ran · 2 no recorded run
warner-benjamin/optimi canonical (classifier label)
classifier basis: census
3 ran · 0 no recorded run
FunctionStatusWhere it lives
clean_str Ran
ran; our contract draft was wrong, not the code
xmc-aalto/elmo/src/utils.py
code served (permissive licence) · get_code("90b6172fa5dbab0b")
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 re

def clean_str(string):
    string = string.replace('\n', ' ')
    string = string.replace('_', ' ')
    string = re.sub('\\s{2,}', ' ', string)
    string = re.sub('/SEP/', '[SEP]', string)
    return string

ARGS = {
    'string': 'Hello\nworld_test  /SEP/  multiple   spaces'
}
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 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
debias Ran
ran, honoured the contract we drafted
warner-benjamin/optimi/optimi/utils.py
code served (permissive licence) · get_code("7f03739c008199a5")
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 float, ndim 0, dtype family float, shape () 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
import numpy as np

torch.manual_seed(0)

# The function debias takes beta (float) and step (int) as parameters
# It computes 1 - beta ** step, which is a simple mathematical operation
# No complex objects are needed

ARGS = {
    "beta": 0.9,
    "step": 10
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type float, ndim 0, dtype family float, shape () — shape () 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
debias_beta Ran
ran, honoured the contract we drafted
warner-benjamin/optimi/optimi/utils.py
code served (permissive licence) · get_code("902b134b00ed8ce7")
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 float, ndim 0, dtype family float, shape () 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
import numpy as np

# Set random seed for reproducibility
torch.manual_seed(0)

# Construct arguments for debias_beta function
ARGS = {
    "beta": 0.9,
    "step": 5
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type float, ndim 0, dtype family float, shape () — shape () 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
param_groups_weight_decay Ran
ran; our contract draft was wrong, not the code
warner-benjamin/optimi/optimi/utils.py
code served (permissive licence) · get_code("61ff1f7c9fe41c1d")
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 list, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim 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)

# Build a small model with various parameter types
class SimpleModel(nn.Module):
    def __init__(self):
        super().__init__()
        # Linear layer has weight (2D) and bias (1D)
        self.linear1 = nn.Linear(4, 3)
        # BatchNorm has weight and bias (both 1D)
        self.bn = nn.BatchNorm1d(3)
        # Another linear layer
        self.linear2 = nn.Linear(3, 2)
        # Custom parameter for testing additional_layers
        self.custom_param = nn.Parameter(torch.randn(2, 4))
    
    def forward(self, x):
        x = self.linear1(x)
        x = self.bn(x)
        x = self.linear2(x)
        return x

model = SimpleModel()

# Test with basic arguments
weight_decay_value = 0.01
additional_layers_value = ["bn", "custom"]

ARGS = {
    "model": model,
    "weight_decay": weight_decay_value,
    "additional_layers": additional_layers_value,
}
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 list, ndim 1, dtype family float — a list output has no array shape of its own; none is stated
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
print_trainable_parameters Ran
ran; our contract draft was wrong, not the code
xmc-aalto/elmo/src/utils.py
code served (permissive licence) · get_code("63eb98e4f891edda")
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)

# Create a simple model with some trainable and non-trainable parameters
class SimpleModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear1 = nn.Linear(4, 3)
        self.linear2 = nn.Linear(3, 2)
        # Make some parameters non-trainable
        self.linear2.bias.requires_grad = False
    
    def forward(self, x):
        x = self.linear1(x)
        x = self.linear2(x)
        return x

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
sparsification Ran
ran; our contract draft was wrong, not the code
xmc-aalto/elmo/src/evaluate.py
code served (permissive licence) · get_code("edd92d3fba08fcc2")
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 csr_matrix. 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
import scipy.sparse as sp
import itertools

# Create test data for sparsification function
labels = [
    [0, 1, 2],      # sample 0 has labels 0, 1, 2
    [1, 3],         # sample 1 has labels 1, 3
    [0, 2, 3],      # sample 2 has labels 0, 2, 3
]

label_map = {
    0: 0,
    1: 1,
    2: 2,
    3: 3,
}

num_labels = 4

ARGS = {
    "labels": labels,
    "label_map": label_map,
    "num_labels": num_labels,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, scipy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type csr_matrix — a csr_matrix output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a csr_matrix 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
timeit Ran
ran; our contract draft was wrong, not the code
xmc-aalto/elmo/src/preprocess.py
code served (permissive licence) · get_code("655433dc7bc2388f")
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 time
import functools
import torch
import torch.nn as nn

def timeit(func):
    """Print the runtime of the decorated function"""

    @functools.wraps(func)
    def wrapper_timer(*args, **kwargs):
        start_time = time.perf_counter()
        value = func(*args, **kwargs)
        end_time = time.perf_counter()
        run_time = end_time - start_time
        print('Finished {} in {:.4f} secs'.format(func.__name__, run_time))
        return value
    return wrapper_timer


# Create a simple test function to decorate
@timeit
def sample_function(x, y):
    """A simple function that does some computation"""
    time.sleep(0.01)
    return x + y


# Define ARGS dict
ARGS = {
    'func': sample_function
}
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
to_wandb_dict Ran
ran; our contract draft was wrong, not the code
xmc-aalto/elmo/src/log.py
code served (permissive licence) · get_code("975ff6d8c2816c5a")
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 torch
import torch.nn as nn


class SimpleConfig:
    def __init__(self):
        self.data = type('obj', (object,), {
            'dataset': 'test_dataset',
            'augment_label_data': True,
            'num_labels': 10,
            'max_len': 512,
            'batch_size': 32
        })()
        
        self.model = type('obj', (object,), {
            'encoder': type('obj', (object,), {
                'encoder_model': 'bert-base-uncased',
                'pool_mode': 'mean',
                'feature_layers': [10, 11, 12],
                'embed_dropout': 0.1,
                'use_ngame_encoder_weights': False
            })(),
            'bottleneck': type('obj', (object,), {
                'use_bottleneck_layer': True,
                'bottleneck_size': 256
            })()
        })()
        
        self.training = type('obj', (object,), {
            'loss_fn': 'cross_entropy',
            'encoder': type('obj', (object,), {
                'optimizer': 'adam',
                'grad_accum_step': 4,
                'lr': 2e-5,
                'wd': 0.01,
                'warmup_steps': 500
            })(),
            'xmc': type('obj', (object,), {
                'optimizer': 'sgd',
                'lr': 1e-3
            })(),
            'epochs': 10
        })()


cfg = SimpleConfig()

ARGS = {
    'cfg': cfg
}
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
collate Not yet run
unverified (harvested, no recorded run)
xmc-aalto/elmo/src/data.py
code served (permissive licence) · get_code("8468686478a08bfd")
How it ran

no invocation recorded.

convert Not yet run
unverified (harvested, no recorded run)
xmc-aalto/elmo/src/preprocess.py
code served (permissive licence) · get_code("a42b7da783263c1b")
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, 3 are also present in other papers whose code we hold (3 with at least one paper dated earlier, 0 the same month, 0 later) and 7 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
clean_str 1 other paper
1 dated earlier
2411.03171 (2024-11)
Navigating Extremes: Dynamic Sparsity in Large Output Spaces
print_trainable_parameters 1 other paper
1 dated earlier
2411.03171 (2024-11)
Navigating Extremes: Dynamic Sparsity in Large Output Spaces
sparsification 1 other paper
1 dated earlier
2411.03171 (2024-11)
Navigating Extremes: Dynamic Sparsity in Large Output Spaces

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

Repositories linked to this paper

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

Abstract

Large output spaces, also referred to as Extreme multilabel classification (XMC), is a setting that arises, e.g., in large-scale tagging and productto-product recommendation, and is characterized by the number of labels ranging from hundreds of thousands to millions. This means that the linear classification head, usually only a tiny fraction of the overall model, turns into the main driver for compute and memory demand. Current state-of-the-art XMC methods predominantly rely on FP16-FP32 mixed-precision training, which we show can be unstable, and inefficient in terms of memory usage and computational overhead. Meanwhile, existing low-precision methods typically retain higher precision for the classification layer. In this work, we propose ELMO, a pure low-precision training framework for XMC models using BFloat16 and Float8 data types. By leveraging Kahan summation and stochastic rounding, we demonstrate that XMC models can be effectively trained entirely in Float8, without relying on single-precision master weights or tensor scaling. Low-precision training, combined with our proposed memory optimizations-gradient fusion and chunking-enables significant reductions in GPU memory usage. For example, we train a 3-million-label XMC model with only 6.6 GiB of GPU memory, compared to the 39.7 GiB required by the optimized SOTA method, Renee (Jain et al., 2023) without compromising accuracy. Code available at https://github.com/xmc-aalto/elmo.

For agents

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

get_harvested_code_for_paper("2510.11168")
get_code_for_paper("2510.11168")
have("2510.11168")

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

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

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

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

Connect an agent — have() is free.