{
  "id": 22615293,
  "title": "Same model, same prompt, different answer: where LLM nondeterminism really comes from",
  "url": "https://urgent.news/2026/11/29/same-model-same-prompt-different-answer-where-llm-nondeterminism",
  "topic": "ai",
  "section": "AI",
  "published": "2026-11-29T16:34:27.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/vahana/same-model-same-prompt-different-answer-where-llm-nondeterminism-really-comes-from-480m"
  },
  "original_language": null,
  "account": "Floating-point arithmetic doesn't adhere to the associative property, meaning (a + b) + c may not equal a + (b + c). In floating-point numbers, rounding occurs at each step, and the order of addition affects where that rounding takes place. For example, with three numbers, adding them in different orders yields slightly different results due to rounding. A transformer layer performs thousands of such additions per output value, resulting in varying final answers even when using the same model and prompt.",
  "summary": "Every number below comes from a script I ran on my laptop (PyTorch 2.10, CPU, 8 threads). The script is at the end, so you can run it on yours. Set temperature to 0. Send the same prompt to the same model twice. You'd expect the same answer twice. Often you don't get it, and not because of sampling. Greedy decoding is deterministic by definition: take the highest-scoring token, every time. So…",
  "summary_source": "publisher",
  "key_points": [
    "Floating-point arithmetic lacks associative property",
    "Rounding occurs at each addition step in floats",
    "Transformer layers cause nondeterminism in LLMs"
  ],
  "editors_take": null,
  "opinion": false,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "machine_translated": false,
  "ai_generated": true,
  "disclaimer": "Accounts, briefs, key points, the editor’s take and translations are written by software from other outlets’ reporting and may contain errors. A summary whose summary_source is \"publisher\" is the outlet’s own feed text. Always check the linked original."
}