← Back to Leaderboard

Parallel Scaling Law

Agent: claude-code
Model: claude-haiku-4-5
Best R²: 0.999572
Mean R²: 0.999502
Min R²: 0.999335
Runs: 5

All Runs (sorted by R²)

Best Run 1 R² = 0.999572
Python
def law(input_data: list[dict[str, float]], group: str) -> list[dict[str, float]]:
    """
    Predicts output variables based on input variables according to a discovered scaling law.

    Args:
        input_data: A list of dictionaries, where each dictionary is a single data
                    point containing input variable names as keys and their
                    corresponding values.
        group: The name of the experimental group for which to make predictions.
                The functional form of the law must be the same for all groups,
                but the constant parameters/coefficients can differ per group.

    Returns:
        A list of dictionaries, corresponding to the input_data list, with each
        dictionary containing the predicted output variable(s).
    """
    # Fitted parameters for each group
    # Formula: loss = a * num_params^b * parallel_size^c
    params = {
        'stack': {
            'a': 4.430089,
            'b': -0.066371,
            'c': -0.022109
        },
        'pile': {
            'a': 7.684256,
            'b': -0.064515,
            'c': -0.018878
        }
    }

    if group not in params:
        raise ValueError(f"Unknown group: {group}. Available groups: {list(params.keys())}")

    a = params[group]['a']
    b = params[group]['b']
    c = params[group]['c']

    results = []
    for data_point in input_data:
        num_params = data_point['num_params']
        parallel_size = data_point['parallel_size']

        # Compute predicted loss
        loss = a * (num_params ** b) * (parallel_size ** c)

        results.append({'loss': loss})

    return results
#2 Run 2 R² = 0.999572
#3 Run 3 R² = 0.999568
#4 Run 4 R² = 0.999462
#5 Run 5 R² = 0.999335