News for hackers. Stuff that matters.
Re:Grok: Searching X for "From:Elonmusk (Israel or Palestine... by simonw on Thursday July 10, 2025 @08:58PM (#44527395)
I don't think those race conditions are rare. None of the big hosted LLMs provide a temperature=0 plus fixed seed feature which they guarantee won't return different results, despite clear demand for that from developers.
Re:Grok: Searching X for "From:Elonmusk (Israel or Palestine... by xnx on Thursday July 10, 2025 @09:41PM (#44527634)
Fair. I dislike "non-deterministic" as a blanket llm descriptor for all llms since it implies some type of magic or quantum effect.
Re:Grok: Searching X for "From:Elonmusk (Israel or Palestine... by dekhn on Thursday July 10, 2025 @10:42PM (#44527956)
I see LLM inference as sampling from a distribution. Multiple details go into that sampling - everything from parameters like temperature to numerical imprecision to batch mixing effects as well as the next-token-selection approach (always pick max, sample from the posterior distribution, etc). But ultimately, if it was truly important to get stable outputs, everything I listed above can be engineered (temp=0, very good numerical control, not batching, and always picking the max probability next token).

dekhn from a decade ago cared a lot about stable outputs. dekhn today thinks sampling from a distribution is a far more practical approach for nearly all use cases. I could see it mattering when the false negative rate of a medical diagnostic exceeded a reasonable threshold.

Re:Grok: Searching X for "From:Elonmusk (Israel or Palestine... by basch on Friday July 11, 2025 @01:13AM (#44528597)
I agree its phrased poorly.

Better said would be: LLM's are designed to act as if they were non-deterministic.

Re:Grok: Searching X for "From:Elonmusk (Israel or Palestine... by tanewishly on Friday July 11, 2025 @01:33AM (#44528690)
Errr... that word implies some type of non-deterministic effect. Like using a randomizer without specifying the seed (ie. sampling from a distribution). I mean, stuff like NFAs (non-deterministic finite automata) isn't magic.
Re:Grok: Searching X for "From:Elonmusk (Israel or Palestine... by EdiX on Friday July 11, 2025 @02:51AM (#44529070)
Interesting, but in general it does not imply that. For example: https://en.wikipedia.org/wiki/Nondeterministic_finite_automa...
Re:Grok: Searching X for "From:Elonmusk (Israel or Palestine... by toolslive on Friday July 11, 2025 @04:18AM (#44529574)
I, naively (an uninformed guess), considered the non-determinism (multiple results possible, even with temperature=0 and fixed seed) stemming from floating point rounding errors propagating through the calculations. How wrong am I ?
Re:Grok: Searching X for "From:Elonmusk (Israel or Palestine... by zahlman on Friday July 11, 2025 @07:41AM (#44531008)
You may be interested in https://www.lesswrong.com/posts/aPeJE8bSo6rAFoLqg/solidgoldm... .

> The non-determinism at temperature zero, we guess, is caused by floating point errors during forward propagation. Possibly the “not knowing what to do” leads to maximum uncertainty, so that logits for multiple completions are maximally close and hence these errors (which, despite a lack of documentation, GPT insiders inform us are a known, but rare, phenomenon) are more reliably produced.

Re:Grok: Searching X for "From:Elonmusk (Israel or Palestine... by impossiblefork on Friday July 11, 2025 @04:54AM (#44529836)
With a fixed seed there will be the same floating point rounding errors.

A fixed seed is enough for determinism. You don't need to set temperature=0. Setting temperature=0 also means that you aren't sampling, which means that you're doing greedy one-step probability maximization which might mean that the text ends up strange for that reason.

Re:Grok: Searching X for "From:Elonmusk (Israel or Palestine... by williamdclt on Friday July 11, 2025 @04:49AM (#44529801)
Also uninformed but I can't see how that would be true, floating point rounding errors are entirely deterministic
Re:Grok: Searching X for "From:Elonmusk (Israel or Palestine... by saagarjha on Friday July 11, 2025 @09:27AM (#44531897)
Not if your scheduler causes accumulation in a different order.
Re:Grok: Searching X for "From:Elonmusk (Israel or Palestine... by williamdclt on Friday July 11, 2025 @11:29AM (#44533285)
Are you talking about a DAG of FP calculations, where parallel steps might finish in different order across different executions? That's getting out of my area of knowledge, but I'd believe it's possible
Re:Grok: Searching X for "From:Elonmusk (Israel or Palestine... by saagarjha on Saturday July 12, 2025 @08:02PM (#44546301)
Well a very simple example would be if you run a parallel reduce using atomics the result will depend on which workers acquire the accumulator first.
Re:Grok: Searching X for "From:Elonmusk (Israel or Palestine... by bmicraft on Friday July 11, 2025 @04:43AM (#44529754)
They're gonna round the same each time you're running it on the same hardware.
Re:Grok: Searching X for "From:Elonmusk (Israel or Palestine... by toolslive on Friday July 11, 2025 @06:33AM (#44530559)
but they're not: they are scheduled on some infrastructure in the cloud. So the code version might be slightly different, the compiler (settings) might differ, and the actual hardware might differ.
Re:Grok: Searching X for "From:Elonmusk (Israel or Palestine... by diggan on Friday July 11, 2025 @04:53AM (#44529823)
> despite clear demand for that from developers

Theorizing about why that is: Could it be possible they can't do deterministic inference and batching at the same time, so the reason we see them avoiding that is because that'd require them to stop batching which would shoot up costs?