6 ms·
Compilers also write code (they write machine code based on high level langs)… yet nobody asked the same question about them (or did they?) AI needs to be inst
by sdevonoes 2mo ago
Compilers also write code (they write machine code based on high level langs)… yet nobody asked the same question about them (or did they?)
AI needs to be instructed and then some kind of verification of the output is needed. Programmers do that
- datakan 2mo agoBad analogy. Compilers don't reason, they don't hallucinate. They take the language as given and "compile" it to the equivalent binary based on strict definitions in the language. It's reproducible and consistent. Saying they write code is factually wrong, at best they translate it. AI will do the same thing in multiple ways or veer of course and do it another way based on spoken language with no strict syntax. It will make logical leaps, it will guess, it will assume etc. These things are not equivalent at all.
- win311fwg 2mo agoThe analogy is fine. AI moves us up to a higher level language, and it is understood that higher level languages come with their own leaky abstractions, but the idea remain the same. It is different, but only to the extent that would be expected from stepping up to the next higher level. It's not something completely different. We don't yet have AGI that will magically produce the software before you even knew you needed it. We still need a programmer to write the programs.
- duncanfwalker 2mo agoIt might not be the perfect analogy, but it does show some important parallels and differences. Compilers reason to some extent - for example type inference is definitely some deductive reasoning that I would have to do if the compiler didn't do it for me. The hallucinations point is a difference and one that we haven't quite learnt to handle yet. Generally, compilers are deterministic (even it it might not feel like it sometimes) and there's a lot of useful properties that come from that. I have recently put Claude into a CI/CD pipeline and it's made me realise how much I rely on pipelines being deterministic.
- win311fwg 2mo ago> Generally, compilers are deterministic Not really. Maybe more so than they used to be thanks to deterministic algorithms becoming faster, but most compilers still aren't deterministic by default. There are still advantages to non-determinism in compilers, like not having to worry about thread execution order. To be fair, most compilers these days allow you to optionally enable determinism. Then again, LLMs also allow you to optionally enable determinism.
- foco_tubi 2mo ago> LLMs also allow you to optionally enable determinism really? Please explain
- win311fwg 2mo agoWhat's in need of explanation? Computers are designed to be deterministic, and LLMs run on computers, so LLMs must also be deterministic. There caveat to that is where external inputs give the illusion of non-determinism. Thread execution order, like we already discussed, is one such example. Technically still deterministic if you understand the external inputs, but for the sake of discussion we can consider external inputs to be non-deterministic. Which is why compilers usually end up being non-deterministic by default. However, computers are designed to be deterministic so there are ways to avoid introducing those external inputs, albeit often at the cost of performance. LLMs and compilers alike can be run deterministically. LLMs have one additional property not typically found in a traditional compiler — a call to rand() — but rand() is also deterministic when configured with a constant seed and can also be turned off completely by setting temperature to 0.
- foco_tubi 2mo agoOk, technically you’re right. You can make LLMs deterministic if you make literally every other aspect of execution deterministic as well - self-hosting and open-weights model with identical, reproducible logits, batching, FP math, etc.