upvote
In many cases they are not deterministic even with a deterministic seed because many runtimes embrace races that interact with floating point rounding to improve latency.
reply
Ah, that’s interesting. That is what I was attempting to cover with my last parenthesis but I was mot aware of that!
reply
in practice, as actually used, LLMs are nondeterministic.

It is possible, if you control the execution environment sufficiently, and are careful not to use certain kinds of parallelism which can lead to nondeterminism, and you set the seed deterministically and ensure that the prompts are byte identical, you can operate them deterministically.

But no one actually does all of that. Almost everyone uses cloud hosted APIs where the provider could change any number of variables at any time. Everyone wants faster cheaper inference so uses inference engines which may trade off a certain amount of determinism for more speed. Different versions of harnesses and chat templates and benchmark software may introduce small differences in text.

And even though the cloud providers have in the past offered seed and system fingerprints to try to give people a way to control or detect non-determinism (see https://developers.openai.com/cookbook/examples/reproducible...), that has all been deprecated and removed in the newer APIs.

So yeah, while in theory it's possible that if you control the whole stack you can get deterministic results, that's not how anyone is using it, and there is no way for third party benchmarks to ensure deterministic results of hosted models, the latest APIs don't even support it at all.

This whole "well, actually, LLMs are deterministic if you hold them right" is a red herring. In any actual real-world use, they are basically always non-deterministic.

And of course, there are reasons that providers have dropped these attempts at providing deterministic results; because the results are chaotic, perturbed by small changes in input, it's almost never useful to try to make them act deterministic or detect when non-determinism has happend. Instead, it's better to think about them non-deterministically, and look at the distribution of results, rather than just considering a single pass or fail on a single test to be meaningful.

reply
Fair. I wasn’t advocating for “holding them right”, I feel it’s an important nuance to keep in mind when conceptualizing them, i.e. it’s procedural, determistic, yet both inherently and in practice extremely chaotic and therefore not practically deterministic software.
reply