SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2609.12584 · September 2026

Clustering-Based Balanced Sampling and Allocation with Data Parallelism for High-Performance Fine-Tuning

Hyunjin Kim, Jae-Gil Lee, Wonhyeok Choi, Youngeun Nam, Jaemin Han

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-24; 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/2609.12584.json · badge: /api/ran/2609.12584.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
kaist-dmlab/CluSTER canonical (classifier label)
classifier basis: census
8 ran · 2 no recorded run
FunctionStatusWhere it lives
alpha_fit Ran
ran; our contract draft was wrong, not the code
kaist-dmlab/CluSTER/src/CluSTER/call_back.py
code served (permissive licence) · get_code("3ba2c86d3b8b785b")
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, 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 numpy as np

# Create small test vectors
np.random.seed(42)
before_vec = np.array([1.0, 2.0, 3.0, 4.0])
after_vec = np.array([0.5, 1.0, 1.5, 2.0])

ARGS = {
    "before_vec": before_vec,
    "after_vec": after_vec,
    "eps": 1e-12
}
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 tuple, ndim 1, dtype family float — a tuple 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
chunked Ran
ran; our contract draft was wrong, not the code
kaist-dmlab/CluSTER/src/CluSTER/utils.py
code served (permissive licence) · get_code("e7d9061ac996d800")
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 generator. 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 numpy as np

torch.manual_seed(0)

# The function `chunked` takes:
# - seq: a Sequence (list, tuple, string, etc.) to chunk
# - n: an int specifying chunk size

# Looking at the function body:
# - It accesses seq[i:i + n] with slicing
# - It iterates range(0, len(seq), n)
# - It needs len(seq) to work

# Create a simple sequence - a list of integers
seq = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
n = 3

ARGS = {
    "seq": seq,
    "n": n,
}
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 generator — a generator output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a generator 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
form_starcoder_infill Ran
ran; our contract draft was wrong, not the code
kaist-dmlab/CluSTER/src/CluSTER/llm_wrapper.py
code served (permissive licence) · get_code("971c70adc27358da")
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

ARGS = {
    "prefix": "def hello():\n    print(",
    "suffix": ")\n    return True"
}
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
kmeans_soft_cap_fit_predict Ran
ran; our contract draft was wrong, not the code
kaist-dmlab/CluSTER/src/CluSTER/call_back.py
code served (permissive licence) · get_code("995bffcb0724161f")
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. 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
from sklearn.cluster import KMeans

# Create small test data
np.random.seed(0)
N = 10  # number of samples
D = 4   # embedding dimension
K = 3   # number of clusters (world_size)

# Generate random embeddings
embeddings = np.random.randn(N, D).astype(np.float32)

ARGS = {
    'embeddings': embeddings,
    'world_size': K,
    'seed': 0,
    'n_init': 10,
    'max_iter': 300,
    'eps': 0.3,
    'topk': 2,
    'chunk_size': 5,
    'return_full_dist_to_assigned': True,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, sklearn, 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
pad_sequences Ran
ran, honoured the contract we drafted
kaist-dmlab/CluSTER/src/CluSTER/llm_wrapper.py
code served (permissive licence) · get_code("7b178c461482e3f6")
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 2, dtype family int, shape (3, 4) 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 = {
    "sequences": [[1, 2, 3], [4, 5], [6, 7, 8, 9]],
    "pad_value": 0,
    "padding_side": "right",
    "dtype": torch.long,
    "padding_length": None,
}
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 2, dtype family int, shape (3, 4) — shape (3, 4) 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
parse_problem_solution Ran
ran; our contract draft was wrong, not the code
kaist-dmlab/CluSTER/src/CluSTER/generate_data.py
code served (permissive licence) · get_code("a4ea79c1b5ef985c")
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, 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

# Construct a valid response_text that contains both [problem description] and [solution] markers
# in the correct order
response_text = """
Some preamble here.

[Problem Description]
This is the problem we need to solve.
It has multiple lines.
We need to find the answer.

[Solution]
Here is the solution to the problem.
It involves several steps.
First we do this, then we do that.

Some conclusion here.
"""

ARGS = {
    "response_text": response_text,
}
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, ndim 1, dtype family float — a tuple 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
read_jsonl Ran
ran; our contract draft was wrong, not the code
kaist-dmlab/CluSTER/src/CluSTER/utils.py
code served (permissive licence) · get_code("764fe981599f1c88")
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 json
import tempfile
from pathlib import Path

# Create a temporary JSONL file with some test data
temp_dir = tempfile.mkdtemp()
temp_path = Path(temp_dir) / "test.jsonl"

# Write some test JSONL data
test_data = [
    {"id": 1, "text": "hello world"},
    {"id": 2, "text": "foo bar"},
    {"id": 3, "value": 42}
]

with open(temp_path, 'w') as f:
    for item in test_data:
        f.write(json.dumps(item) + '\n')

ARGS = {
    "path": temp_path
}
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 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
retry_with_exponential_backoff Ran
ran; our contract draft was wrong, not the code
kaist-dmlab/CluSTER/src/CluSTER/utils.py
code served (permissive licence) · get_code("242afd6eeaf6458a")
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 functools
import random
import time

def retry_with_exponential_backoff(errors: tuple, initial_delay: float=30, exponential_base: float=2, jitter: bool=True, max_retries: int=5):
    """Retry a function with exponential backoff."""

    def decorator(func):

        @functools.wraps(func)
        def wrapper(*args, **kwargs):
            num_retries = 0
            delay = initial_delay
            while True:
                try:
                    return func(*args, **kwargs)
                except errors as e:
                    print(f'Error: {e}. Retrying in {delay} seconds...')
                    num_retries += 1
                    if num_retries > max_retries:
                        raise Exception(f'Maximum number of retries ({max_retries}) exceeded.')
                    delay *= exponential_base * (1 + jitter * random.random())
                    time.sleep(delay)
                except Exception as e:
                    raise e
        return wrapper
    return decorator


# Setup code to construct valid arguments
ARGS = {
    "errors": (ValueError, TypeError),
    "initial_delay": 0.01,
    "exponential_base": 2.0,
    "jitter": True,
    "max_retries": 3,
}
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
compute_gradient_diversity Not yet run
unverified (harvested, no recorded run)
kaist-dmlab/CluSTER/src/CluSTER/call_back.py
code served (permissive licence) · get_code("2de3c8799e04e353")
How it ran

no invocation recorded.

get_model_context Not yet run
unverified (harvested, no recorded run)
kaist-dmlab/CluSTER/src/CluSTER/llm_wrapper.py
code served (permissive licence) · get_code("8637fa66d5a6647b")
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, 4 are also present in other papers whose code we hold (4 with at least one paper dated earlier, 0 the same month, 0 later) and 6 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
chunked 3 other papers
3 dated earlier
2406.01006 (2024-06)
SEMCODER: Training Code Language Models with Comprehensive Semantics Reasoning
2410.24198 (2024-10)
SelfCodeAlign: Self-Alignment for Code Generation
2412.21199 (2024-12)
HumanEval Pro and MBPP Pro: Evaluating Large Language Models on Self-invoking Code Generation
pad_sequences 2 other papers
2 dated earlier
2406.01006 (2024-06)
SEMCODER: Training Code Language Models with Comprehensive Semantics Reasoning
2410.24198 (2024-10)
SelfCodeAlign: Self-Alignment for Code Generation
form_starcoder_infill 1 other paper
1 dated earlier
2410.24198 (2024-10)
SelfCodeAlign: Self-Alignment for Code Generation
read_jsonl 1 other paper
1 dated earlier
2410.24198 (2024-10)
SelfCodeAlign: Self-Alignment for Code Generation

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

Instruction-tuning datasets for large language models (LLMs) are often large, redundant, and imbalanced, limiting efficient adaptation. Naive large-batch fine-tuning repeatedly includes overrepresented sample groups while weakly covering underrepresented but informative ones, especially under data parallelism (DP) across multiple GPUs. We propose CluSTER, a Cluster-aware balanced Sampling framework for Training Efficient data Reduction in DP instruction tuning. CluSTER curates a representative reduced dataset through gradient-space clustering and DP-aware balanced allocation, ensuring dual-level coverage across clusters and workers, while preserving the original data distribution by weighted update. As a result, CluSTER reduces redundant computation and improves training stability without compromising model quality. Across multiple instruction-tuning datasets, CluSTER reduces training time by up to 69.6% with almost no accuracy loss compared to prior sampling and data reduction methods. Code is available at https://github.com/kaist-dmlab/CluSTER.

For agents

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

get_harvested_code_for_paper("2609.12584")
get_code_for_paper("2609.12584")
have("2609.12584")

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

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

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

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

Connect an agent — have() is free.