Remix.run Logo
glitchc 5 days ago

> LLMs, by their very nature are probabilistic. Probabilistic is NOT deterministic.

Although I'm on the side of getting my hands dirty, I'm not sure if the difference is that different. A modern compiler embeds a considerable degree of probabilistic behaviour.

ashton314 5 days ago | parent | next [-]

Compilers use heuristics which may result in dramatically different results between compiler passes. Different timing effects during compilation may constrain certain optimization passes (e.g. "run algorithm x over the nodes and optimize for y seconds") but in the end the result should still not modify defined observable behavior, modulo runtime. I consider that to be dramatically different than the probabilistic behavior we get from an LLM.

davidrupp 5 days ago | parent | prev [-]

> A modern compiler embeds a considerable degree of probabilistic behaviour.

Can you give some examples?

hn_acc1 5 days ago | parent | next [-]

There are pragmas you can give to a compiler to tell it to "expect that this code path is (almost) never followed". I.e. if you have an assert on nullptr, for example. You want it to assume the assert rarely gets triggered, and highly optimize instruction scheduling / memory access for the "not nullptr" case, but still assert (even if it's really, REALLY slow, relatively speaking) to handle the nullptr case.

glitchc 4 days ago | parent | prev | next [-]

Any time the language specification is undefined, the compiler behaviour will be probabilistic at best. Here's an example for C:

https://wordsandbuttons.online/so_you_think_you_know_c.html

WD-42 5 days ago | parent | prev | next [-]

I keep hearing this but it’s a head scratcher. They might be thinking of branch prediction, but that’s a function of the cpu, not the compiler.

ModernMech 5 days ago | parent | prev [-]

It’s not that they embed probabilistic behavior per se. But more like they are chaotic systems, in that a slight change of input can drastically change the output. But ideally, good compiler design is idempotent — given the same input, the output should always be the same. If that were not generally true, programming would be much harder than it is.

glitchc 4 days ago | parent [-]

No, it can also vary on the input. The -ffast-math flag in gcc is a good example.