Hacker News new | past | comments | ask | show | jobs | submit login

LLM are non deterministic by nature.



Is this really true? The linear algebra is deterministic, although maybe there is some chaotic behavior with floating point handling. The non deterministic part mostly comes from intentionally added randomness, which can be turned off right?

Maybe the argument is that if you turn off the randomness you don’t have an LLM like result any more?


Floats are deterministic too (this winds up being helpful if you want to do something like test an algorithm on every single float); you just might get different deterministic outcomes on different compilation targets or with threaded intermediate values.

The argument is, as you suggest, that without randomness you don't have an LLM-like result any more. You _can_ use the most likely token every time, or beam search, or any number of other strategies to try to tease out an answer. Doing so gives you a completely different result distribution, and it's not even guaranteed to give a "likely" output (imagine, e.g., a string of tokens that are all 10% likely for any greedy choice, vs a different string where the first is 9% and the remainder are 90% -- with a 10-token answer the second option is 387 million times more likely with random sampling but will never happen with a simple deterministic strategy, and you can tweak the example slightly to keep beam search and similar from finding good results).

That brings up an interesting UI/UX question.

Suppose (as a simplified example) that you have a simple yes/no question and only know the answer probabilistically, something like "will it rain tomorrow" with an appropriate answer being "yes" 60% of the time and "no" 40%. Do you try to lengthen the answer to include that uncertainty? Do you respond "yes" always? 60% of the time? To 60% of the users and then deterministically for a period of time for each user to prevent flip-flopping answers?

The LD50 question is just a more complicated version of that conundrum. The model isn't quite sure. The question forces its hand a bit in terms of the classes of answers. What should its result distribution be?


Yes, that’s the main issue as ideally they wouldn’t be non-deterministic on well-established quantitative facts.


But they can never be. RAG gets you somewhere, but it’s still a pile of RNGs under a trenchcoat.


>> ideally


It’s just not possible. You can do a lot with nondeterministic systems, they have value - but oranges and apples. They need to coexist.


ideal (def. #2) = Existing only in the mind; conceptual, imaginary

https://en.m.wiktionary.org/wiki/ideal

(We’re allowed to imagine the impossible.)


Fair, I am loath to take away your dreams!




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: