[Paper Review] Non-Determinism of "Deterministic" LLM Settings
The paper analyzes how large language models remain non-deterministic even with fixed inputs and deterministic hyper-parameters, showing variability in raw outputs and parsed answers across multiple runs and tasks.
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.
Motivation & Objective
- Quantify how much variation exists in LLM responses across repeated identical runs.
- Assess stability of final parsed answers versus raw model outputs.
- Investigate correlations between stability, accuracy, input length, and output length.
- Provide insights for benchmarking, deployment, and parsing pipelines in LLM applications.
Proposed method
- Use few-shot prompting without chain-of-thought across multiple tasks and models.
- Set temperature to 0 and top-p to 1, with fixed seeds and 5 identical runs per setup.
- Evaluate on BBH and MMLU benchmark tasks using GPT-3.5 Turbo, GPT-4o, Llama-3-70B-Instruct, Llama-3-8B-Instruct, and Mixtral-8x7B-Instruct.
- Measure stability with metrics such as minimum/median/maximum accuracy, accuracy spread, and total agreement rate (TAR) for parsed and raw outputs.
- Analyze correlations via Spearman rank correlation and assess non-normal distributions with normality tests.

Experimental results
Research questions
- RQ1What is the extent of variation in LLM final performance across repeated runs with identical inputs and settings?
- RQ2How do raw outputs and parsed answers differ across runs, and how does this affect stability?
- RQ3Are stability and accuracy correlated, and how do input/output lengths influence stability?
- RQ4Does stability vary by task and model type?
Key findings
- Models are rarely deterministic at the raw output level even with deterministic settings.
- Parsed (TARa) stability is higher than raw (TARr) stability but not 100% for any model/task.
- Stability and accuracy vary by task, with college math being particularly unstable and European history relatively stable.
- Output length negatively correlates with both TARa and TARr, suggesting longer outputs decrease stability.
- Accuracy and TARa are positively correlated, while TARr shows no clear correlation with accuracy.

Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.