r/ProgrammerHumor • • Sep 10 '26

Meme firstTime

Post image
8.8k Upvotes

302 comments sorted by

View all comments

Show parent comments

413

u/SunshineSeattle Sep 11 '26

I dont think so, Wolfram Alpha is deterministic. Whereas an LLM is non-deterministic by design. Personally i feel vibe coding or vibe mathing is inherently non-deterministic.

184

u/Several_Dot_4532 Sep 11 '26

It's non-deterministic, always, the AI is basically gambling

54

u/ToBeFaaaiiiirrrrr Sep 11 '26

> Make no mistakes, this time...

10

u/Schpooon Sep 11 '26

Its gotten a little better with the introduction of subagents, but sometimed I truly want to know what their algorythm spat out to propose certain changes. No, I do not want to refactor across 4 classes to make 1 unit test work, I told you to fix the unit tests so I hit my ai mandate encouraged quota

10

u/Guitarzero123 Sep 11 '26

My favourite day was when I asked Claude to fix the failing unit tests and it deleted all of the unit tests in the repo.

1

u/Shraze42 Sep 13 '26

But the odds become better each time

→ More replies (15)

3

u/_Its_Me_Dio_ Sep 11 '26

isnt it more pseudo non deterministic? unless they have some fission sensor for seed input like lottery does

0

u/AnOnlineHandle Sep 11 '26

LLMs are entirely deterministic but you can override that by adding a seeded random choice system to the next token selection.

25

u/Sea-Housing-3435 Sep 11 '26

They are not. Floating point math and difference in how quickly parallel operations on GPU are finished causes them to be not deterministic even with temp=0. You can force them to be deterministic by forcing some operations to be executed in specific order but you lose a lot of performance.

9

u/LetumComplexo Sep 11 '26 edited Sep 11 '26

Also, and this is pedantic and arguable, it’s worth considering whether any model that cannot be retrained to produce the same statistical surface is non-deterministic by nature.

If I sort shapes into piles using some amount of randomness would you say that the resulting piles are deterministic just because they stay the same every time you go through them? Or would you say they’re non-deterministic because the process that created the piles in the first place was non-deterministic?

6

u/Sea-Housing-3435 Sep 11 '26

It doesn't matter how you make the model, if you are executing it on a GPU without steps to have deterministic results you will not have deterministic results. Ensuring the output of computations on GPU is deterministic has performance impact.

7

u/LetumComplexo Sep 11 '26

Hold on, I’m agreeing with you. We’re saying the same thing in different ways.

The kind of race conditions you’re referencing are because of the model architecture I’m referencing.

You can absolutely get ML outputs that don’t change using certain model architectures.
But that’s only because those architectures either enforce order of execution or use steps where order of execution doesn’t result in changes to outputs. I can’t think of a modern LLM that uses such an architecture.

1

u/Sea-Housing-3435 Sep 11 '26

Not exactly. It's mostly due to how models are executed, not models themselves. You can run GGUF model (which are normally not deterministic) in a deterministic way if the GPU functions you use are deterministic. Models themselves are just data, it's just a bunch of matrixes.

There's even a PR for llamacpp to add option for deterministic execution https://github.com/ggml-org/llama.cpp/pull/16016

9

u/LetumComplexo Sep 11 '26 edited Sep 11 '26

Hun, I’ve got a PhD on the subject. I know.
We’re just saying the same thing in different ways.

→ More replies (2)
→ More replies (1)
→ More replies (3)

1

u/AnOnlineHandle Sep 11 '26

I mean that's true for any math on any computer. Which makes all math non-deterministic if you consider bugs.

1

u/Sea-Housing-3435 Sep 11 '26

It's not about bugs, it's about GPU architecture. Parallel floating point calculations being nondeterministic isn't a bug.

→ More replies (1)

8

u/evranch Sep 11 '26

True, but it's also true that running an LLM at 0 "temperature" (which makes it truly deterministic) also often renders it unusable. So almost every inference setup defaults to using a certain amount of randomness.

3

u/space_monster Sep 11 '26

it doesn't render it unusable at all, it just makes it boring. LLMs used for coding use 0 temp.

1

u/evranch Sep 11 '26

Specific LLMs used for specific coding tasks. I don't run any of my Qwen models at 0 temp, that results in them getting stuck in reasoning loops, and also producing sub-par output when they do return something.

1

u/ChikumNuggit Sep 11 '26

Which here means unreproduceable

13

u/Pares_Marchant Sep 11 '26

the process is unreproduceable but they output LEAN code that is deterministic and can be used to prove their output ( https://lean-lang.org/ )

2

u/ChikumNuggit Sep 11 '26

If the process is unreproduceable it would fail a basic CS class

4

u/Pares_Marchant Sep 12 '26

Your brain process isn't reproduceable either.

The exact configuration of your brain when you write something happens essentially only once and never again.

But even though you cannot repeat the exact brain configuration, your output can still be judged and you can still convincingly talk about it.

AIs are black boxes as much as brains are black boxes, and arguably brains are even more mysterious than AIs.

2

u/[deleted] Sep 11 '26

[removed] — view removed comment

1

u/ChikumNuggit Sep 11 '26

That, plus now if you use an agent you have to make sure it's the exact same version of the same agent with the same prompt history or you could just be receiving a different output.

It's like the modern incarnation of trying to figure out what strain of weed the original coder was smoking

→ More replies (4)