← Back to context

Comment by ManuelKiessling

12 hours ago

(I‘m saying this as someone who uses AI for coding a lot and mostly love it) Yeah, but is that really the same? Compilers work deterministically — if it works once, it will work always. LLMs are a different story for now.

Said another way, compilers are a translation of existing formal code. Compilers don't add features, they don't create algorithms (unrolling, etc., notwithstanding), they are another expression of the same encoded solution.

LLMs are nothing like that

  • LLMs are just translating text into output, too, and are running on deterministic computers like every other bit of code we run. They aren't magic.

    It is just the scope that makes it appear non-deterministic to a human looking at it, and it is large enough to be impossible for a human to follow the entire deterministic chain, but that doesn't mean it isn't in the end a function that translates input data into output data in a deterministic way.

    • just text !== syntactically correct code that solves a defined problem

      There is a world of difference between translation and generation. It's even in the name: generative AI. I didn't say anything about magic.

LLMs are deterministic, too. I know there is randomness in the choosing tokens, but that randomness is derived from a random seed that can be repeated.

  • Only if the seed is known. Determinism is often predicated on perfect information. Many programs do not have that. Their operations cannot be reproduced practically. The difference between saying deterministic and non-deterministic is contextual based on if you are concerned with theory or practicality.

  • If I understand your argument, you're saying that models can be deterministic, right?

    Care to point to any that are set up to be deterministic?

    Did you ever stop to think about why no one can get any use out of a model with temp set to zero?

    • llama.cpp is deterministic when run with a specified PRNG seed, at least when running on CPU without caching. This is true regardless of temperature. But when people say "non-deterministic", they really mean something closer to "chaotic", i.e. the output can vary greatly with small changes to input, and there is no reliable way to predict when this will happen without running the full calculation. This is very different behavior from traditional compilers.

    • No, LLMs ARE deterministic, just like all computer programs are.

      I get why that is in practice different then the manner in which compilers are deterministic, but my point is the difference isnt because of determinism.

      2 replies →