SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2402.02314 · 2024

Selecting Large Language Model to Fine-tune via Rectified Scaling Law

arXiv · PDF · Open in the Atlas

Code that ran

6 of 6 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, 2 violated it and 0 have no contract verdict; 4 failures of our instrument; 0 no recorded run), 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.02314.json · badge: /api/ran/2402.02314.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
linhaowei1/fine-tuning-scaling-law canonical (classifier label)
classifier basis: classifier_2025
6 ran · 0 no recorded run
FunctionStatusWhere it lives
fit_vanilla_law Ran
ran; our contract draft was wrong, not the code
linhaowei1/fine-tuning-scaling-law/src/fit_law.py
code served (permissive licence) · get_code("e84b542b5196e046")
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) 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
import random

# Set seed for reproducibility
random.seed(0)
np.random.seed(0)

# Create synthetic data for fitting
# Generate log_x values
log_x = np.array([-2.0, -1.5, -1.0, -0.5, 0.0, 0.5, 1.0, 1.5])

# Generate synthetic log_y values using a known vanilla law transform
# y = alpha * log(1 / (B * exp(x)^beta) + |E|)
alpha_true = 2.0
B_true = 0.5
beta_true = 1.5
E_true = 0.1

log_y = alpha_true * np.log(1 / (B_true * np.exp(log_x) ** beta_true) + abs(E_true))

# Add small noise to make it more realistic
log_y = log_y + np.random.normal(0, 0.01, log_y.shape)

ARGS = {
    "log_x": log_x,
    "log_y": log_y,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
numpy, scipy — 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
golden_select Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
linhaowei1/fine-tuning-scaling-law/src/model_select.py
code served (permissive licence) · get_code("ec411a328f2089cf")
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) 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
import pandas as pd

def golden_select(data, predict_data_num):
    """
    Select the best model based on the golden data
    """
    data['rank'] = data[predict_data_num].rank(ascending=True)
    best_performance = data[predict_data_num].min()
    worst_performance = data[predict_data_num].max()
    return (data['rank'].to_numpy(dtype=np.float32), best_performance, worst_performance, data[predict_data_num].to_numpy(dtype=np.float32))

# Create a small pandas DataFrame with numeric data
data = pd.DataFrame({
    'model_1': [0.85, 0.92, 0.78, 0.88],
    'model_2': [0.90, 0.87, 0.95, 0.81],
    'model_3': [0.75, 0.88, 0.82, 0.91]
})

predict_data_num = 'model_1'

ARGS = {
    'data': data,
    'predict_data_num': predict_data_num
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
numpy, pandas — 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
our_law_transform Ran
ran, violated the contract we drafted
linhaowei1/fine-tuning-scaling-law/src/fit_law.py
code served (permissive licence) · get_code("a9b5d8cf8107430b")
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) and returned ndarray, ndim 1, dtype family float, shape (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 numpy as np

# Analyze the function:
# - log_x: appears to be a numpy array or scalar (used in arithmetic with beta)
# - A: scalar, used in arithmetic
# - B: scalar, used in arithmetic
# - beta: scalar, used in arithmetic with log_x
# - E: scalar, used in arithmetic (abs(E) is called)

# Create small valid arguments
log_x = np.array([0.5, 1.2, 0.8, 1.5])  # log scale input, small batch
A = 10.0  # scalar parameter
B = 2.0   # scalar parameter
beta = 0.5  # scalar parameter
E = 1.0   # scalar parameter

ARGS = {
    "log_x": log_x,
    "A": A,
    "B": B,
    "beta": beta,
    "E": E
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 1, dtype family float, shape (4,) — shape (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
subtuning_select Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
linhaowei1/fine-tuning-scaling-law/src/model_select.py
code served (permissive licence) · get_code("242ad109fa69c9fb")
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) and returned tuple, ndim 2, 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
import pandas as pd

# Create a small DataFrame with numeric columns
# The function expects 'data' to be a DataFrame with columns that can be accessed by max_data_num and predict_data_num
# It calls .rank(ascending=True) and .to_numpy(dtype=np.float32) on these columns

data = pd.DataFrame({
    'model_1': [0.5, 0.3, 0.8, 0.2],
    'model_2': [0.6, 0.4, 0.7, 0.1],
    'model_3': [0.55, 0.35, 0.75, 0.15]
})

max_data_num = 'model_1'
predict_data_num = 'model_2'

ARGS = {
    'data': data,
    'max_data_num': max_data_num,
    'predict_data_num': predict_data_num
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
numpy, pandas — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 2, 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
vanilla_law_transform Ran
ran, violated the contract we drafted
linhaowei1/fine-tuning-scaling-law/src/fit_law.py
code served (permissive licence) · get_code("5f64cad811d8f947")
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) and returned ndarray, ndim 1, dtype family float, shape (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 numpy as np

# Analyze the function signature and body:
# - log_x: used in np.exp(log_x), so needs to be a numeric array/scalar
# - alpha: scalar multiplier
# - B: scalar used in division
# - beta: exponent for np.exp(log_x) ** beta
# - E: scalar used with abs()

# Create small numeric values for all parameters
log_x = np.array([0.5, 1.2, 0.8, 1.5])  # log scale input, shape (4,)
alpha = 2.5  # scalar multiplier
B = 0.3  # scalar divisor
beta = 1.2  # scalar exponent
E = 0.1  # scalar offset

ARGS = {
    "log_x": log_x,
    "alpha": alpha,
    "B": B,
    "beta": beta,
    "E": E,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 1, dtype family float, shape (4,) — shape (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
zero_shot_select Ran
ran; our contract draft was wrong, not the code
linhaowei1/fine-tuning-scaling-law/src/model_select.py
code served (permissive licence) · get_code("d3c1ef846a7f3714")
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) and returned tuple, ndim 2, 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
import pandas as pd

# Create a small DataFrame with a '0' column containing test loss values
data = pd.DataFrame({
    0: [0.5, 0.3, 0.7, 0.2],
    'other_col': [1, 2, 3, 4]
})

ARGS = {
    'data': data,
    'max_data_num': 10,
    'predict_data_num': 5
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
numpy, pandas — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 2, 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

Also present in other papers' code

Of 6 samples lifted from this paper's linked repositories, 6 carry a function identity and 0 do not. Of the 6 distinct functions with an identity, 0 are also present in other papers whose code we hold (0 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.

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

The ever-growing ecosystem of LLMs has posed a challenge in selecting the most appropriate pre-trained model to fine-tune amidst a sea of options. Given constrained resources, fine-tuning all models and making selections afterward is unrealistic. In this work, we formulate this resource-constrained selection task into predicting fine-tuning performance and illustrate its natural connection with Scaling Law. Unlike pre-training, we find that the fine-tuning scaling curve includes not just the well-known "power phase" but also the previously unobserved "pre-power phase". We also explain why existing Scaling Law fails to capture this phase transition phenomenon both theoretically and empirically. To address this, we introduce the concept of "pre-learned data size" into our Rectified Scaling Law, which overcomes theoretical limitations and fits experimental results much better. By leveraging our law, we propose a novel LLM selection algorithm that selects the near-optimal model with hundreds of times less resource consumption, while other methods may provide negatively correlated selection. The project page is available at rectified-scaling-law.github.io.

For agents

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

get_harvested_code_for_paper("2402.02314")
get_code_for_paper("2402.02314")
have("2402.02314")

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

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

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

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

Connect an agent — have() is free.