SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2408.04667 · 2024

Non-Determinism of "Deterministic" LLM Settings

arXiv · PDF · Open in the Atlas

Code that ran

4 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, 0 violated it and 0 have no contract verdict; 4 failures of our instrument; 2 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/2408.04667.json · badge: /api/ran/2408.04667.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
Comcast/llm-stability canonical (classifier label)
classifier basis: classifier_2025
3 ran · 0 no recorded run
breckbaldwin/llm-stability extension (classifier label)
classifier basis: classifier_2025
1 ran · 2 no recorded run
FunctionStatusWhere it lives
check_hand_annotated_cache Ran
ran; our contract draft was wrong, not the code
Comcast/llm-stability/evaluate.py
code served (permissive licence) · get_code("76cadee5f7964ff8")
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 pandas as pd

# Create a sample row with the required columns
row = pd.Series({
    'response': 'This is a test response',
    'task': 'task_001',
    'model': 'gpt-3.5',
    'rubric_id': 'rubric_123',
    'rubric': 'Sample rubric text'
})

# Create a sample answer cache DataFrame with some cached entries
answer_cache_df = pd.DataFrame({
    'response': ['Previous response 1', 'Previous response 2'],
    'task': ['task_002', 'task_003'],
    'model': ['gpt-4', 'claude-2'],
    'rubric_id': ['rubric_456', 'rubric_789'],
    'parsed_answer': ['Parsed answer 1', 'Parsed answer 2']
})

ARGS = {
    'row': row,
    'answer_cache_df': answer_cache_df
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
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
get_experiment_configs Ran
ran; our contract draft was wrong, not the code
Comcast/llm-stability/evaluate.py
code served (permissive licence) · get_code("59024a627e4343c6")
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 list, 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 pandas as pd

# Create a sample DataFrame with experiment run data
data_df = pd.DataFrame({
    'model': ['bert', 'gpt2', 'bert', 'gpt2', 'bert'],
    'model_config': ['config_a', 'config_b', 'config_a', 'config_b', 'config_a'],
    'task': ['classification', 'generation', 'classification', 'generation', 'classification'],
    'task_config': ['task_1', 'task_2', 'task_1', 'task_2', 'task_1']
})

ARGS = {
    'data_df': data_df
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
pandas — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 2, 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
load_runs Ran
ran; our contract draft was wrong, not the code
Comcast/llm-stability/evaluate.py
code served (permissive licence) · get_code("151e9739708eb70c")
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 DataFrame. 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 os
import tempfile
import pandas as pd
import json

# Create a temporary directory with test CSV files
temp_dir = tempfile.mkdtemp()

# Create a simple test CSV file with the expected columns
test_data = {
    'prompt': ['{}', '{}'],
    'model_config': ['{"temperature": 0.0}', '{"temperature": 0.0}'],
    'task_config': ['{"shots": "0"}', '{"shots": "0"}'],
    'rubric': ['{}', '{}'],
    'response': ['test response 1', 'test response 2'],
    'raw_response': ['test response 1', 'test response 2']
}

test_df = pd.DataFrame(test_data)
test_csv_path = os.path.join(temp_dir, 'test_run_1.csv')
test_df.to_csv(test_csv_path, index=False)

# Create another test CSV file in a subdirectory
subdir = os.path.join(temp_dir, 'subdir')
os.makedirs(subdir, exist_ok=True)
test_csv_path_2 = os.path.join(subdir, 'test_run_2.csv')
test_df.to_csv(test_csv_path_2, index=False)

ARGS = {
    'directory': temp_dir,
    'old_format': False
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
pandas — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type DataFrame — a DataFrame output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a DataFrame output the recorded ndim 2 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
run_model Ran
ran; our contract draft was wrong, not the code
breckbaldwin/llm-stability/run_experiment.py
code served (permissive licence) · get_code("48505ee862750c1e")
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 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
import json
import os
import tempfile
from datetime import datetime

class MockLLM(nn.Module):
    """Mock LLM module with a run method"""
    def __init__(self):
        super().__init__()
        self.counter = 0
    
    def run(self, prompt, model_config):
        """Returns response and run_config"""
        self.counter += 1
        response = f"Response {self.counter}"
        run_config = {
            'prompt': prompt,
            'temperature': model_config.get('temperature', 0.7),
            'top_p_k': model_config.get('top_p_k', 0.9),
            'seed': model_config.get('seed', 42),
            'logprobs': [
                {'token': 'hello', 'logprob': -0.5},
                {'token': 'world', 'logprob': -0.3}
            ]
        }
        return response, run_config

# Create temporary output directory
temp_dir = tempfile.mkdtemp()

# Create test rubrics
test_rubrics = [
    {
        'input': 'What is 2+2?',
        'target': '4'
    },
    {
        'input': 'What is the capital of France?',
        'target': 'Paris'
    },
    {
        'input': 'What is 3+3?',
        'target': '6'
    }
]

# Create model config
model_config = {
    'temperature': 0.7,
    'top_p_k': 0.9,
    'seed': 42,
    'max_tokens': 100
}

# Create task config
task_config = {
    'task_type': 'qa',
    'difficulty': 'easy'
}

# Create date string
date_str = datetime.now().isoformat()

# Create LLM instance
llm = MockLLM()

ARGS = {
    'llm': llm,
    'out_dir': temp_dir,
    'outfile_root': 'test-model-task',
    'num_runs': 2,
    'model_config': model_config,
    'test_rubrics': test_rubrics,
    'model_name': 'test-model',
    'task_name': 'test-task',
    'task_config': task_config,
    'date': date_str,
    'context': None
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
pandas, torch, tqdm — 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
load_runs Not yet run
unverified (harvested, no recorded run)
breckbaldwin/llm-stability/evaluate.py
code served (permissive licence) · get_code("2aa869fcf2a593c3")
How it ran

no invocation recorded.

run Not yet run
unverified (harvested, no recorded run)
breckbaldwin/llm-stability/run_experiment.py
code served (permissive licence) · get_code("0e000ac3dfcc1171")
How it ran

no invocation recorded.

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

LLM (large language model) practitioners commonly notice that outputs can vary for the same inputs under settings expected to be deterministic. Yet the questions of how pervasive this is, and with what impact on results, have not to our knowledge been systematically investigated. We investigate non-determinism in five LLMs configured to be deterministic when applied to eight common tasks in across 10 runs, in both zero-shot and few-shot settings. We see accuracy variations up to 15% across naturally occurring runs with a gap of best possible performance to worst possible performance up to 70%. In fact, none of the LLMs consistently delivers repeatable accuracy across all tasks, much less identical output strings. Sharing preliminary results with insiders has revealed that non-determinism perhaps essential to the efficient use of compute resources via co-mingled data in input buffers so this issue is not going away anytime soon. To better quantify our observations, we introduce metrics focused on quantifying determinism, TARr@N for the total agreement rate at N runs over raw output, and TARa@N for total agreement rate of parsed-out answers. Our code and data are publicly available at https://github.com/breckbaldwin/llm-stability.

For agents

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

get_harvested_code_for_paper("2408.04667")
get_code_for_paper("2408.04667")
have("2408.04667")

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

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

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

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

Connect an agent — have() is free.