Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I'm not sure what you mean by "deterministic". You can set the sampling temperature to zero (greedy sampling), or alternately use an ultra simple seeded PRNG to break up the ties in anything other than greedy sampling.

LLM inference outputs a list of probabilities for next token to select on each round. A majority of the time (especially when following semantic boilerplate like quoting an idiom or obeying a punctuation rule) one token is rated 10x or more likely than every other token combined, making that the obvious natural pick.

But every now and then the LLM will rate 2 or more tokens as close to equally valid options (such as asking it to "tell a story" and it gets to the hero's name.. who really cares which name is chosen? The important part is sticking to whatever you select!)

So for basically the same reason as D&D, the algorithm designers added a dice roll as tie-breaker stage to just pick one of the equally valid options in a manner every stakeholder can agree is fair and get on with life.

Since that's literally the only part of the algorithm where any randomness occurs aside from "unpredictable user at keyboard", and it can be easily altered to remove every trace of unpredictability (at the cost of only user-perceived stuffiness and lack of creativity.. and increased likelihood of falling into repetition loops when one chooses greedy sampling in particular to bypass it) I am at a loss why you would describe LLMs as "not deterministic".



When I did my research on reasoning strategic games in 4x4 tic tac toe boards, LLMs with given nominal parameters and low temperature would still show variance in their assessment of the situation.


> low temperature

"low" is the key word. If it's anything other than 0, it becomes non-deterministic.

If you use a temperature of 0, then the output of an LLM will be completely deterministic. Any given input would have the exact same output every time.




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

Search: