Reproducibility is a bedrock of scientific progress. However, it’s remarkably 
difficult to get reproducible results out of large language models. [...]

But why aren’t LLM inference engines deterministic? One common hypothesis is 
that some combination of floating-point non-associativity and concurrent 
execution leads to nondeterminism based on which concurrent core finishes 
first. We will call this the “concurrency + floating point” hypothesis for LLM 
inference nondeterminism. 

[...]

Then, deterministic inference enables us to also modify our training stack to 
obtain bitwise identical results between sampling and training, thus resulting 
in true on-policy RL.

[...]

Modern software systems contain many layers of abstractions. In machine 
learning, when we run into nondeterminism and subtle numerical differences it 
can often be tempting to paper over them. After all, our systems are already 
“probabilistic”, so what’s wrong with a little more nondeterminism? What’s 
wrong with bumping up the atol/rtol on the failing unit test? The difference in 
logprobs between the trainer and the sampler probably isn’t a real bug, right?

We reject this defeatism. With a little bit of work, we can understand the root 
causes of our nondeterminism and even solve them! We hope that this blog post 
provides the community with a solid understanding of how to resolve 
nondeterminism in our inference systems and inspires others to obtain a full 
understanding of their systems.

Un bell'articolo tecnico sul funzionamento di un LLM in pratica: 
<https://thinkingmachines.ai/blog/defeating-nondeterminism-in-llm-inference/>

Per i non-informatici potremmo sintetizzare che il fatto che un
LLM "a temperatura 0" continui a produrre output diversi a fronte dello
stesso input è un bug software correggibile dovuto ad ottimizzazioni 
eccessive che introducono race conditions che a loro volta
cambiano l'ordine degli addendi floating point producendo risultati diversi
nelle somme.

Non c'è alcuna intelligenza che disponga di autonomia dentro un LLM.
È solo un software, deterministico come gli altri, a meno di bug (software o 
hardware).

Un software programmato statisticamente che anche in fase di compilazione
(impropriamente detta "training") può produrre "bitwise identical results",
ovvero "modelli" identici a fronte degli stessi dati sorgente.


Nulla di nuovo, chiunque abbia una minima comprensione dell'informatica
sapeva già che la variabilità dell'output degli LLM era dovuta a input casuali
non registrati, race condition e aritmetica floating point.


Tuttavia ricorderete come l'irriproducibilità del binario prodotto durante il 
training
fosse la scusa con cui l'OSI, ha giustificato una "Open Source 
AI Definition" scritta sotto dettatura di Meta, Google & friends.

La supercazzola era che poiché il processo di compilazione ("training")
non è comunque riproducibile, pretendere tutti i dati sorgente è inutile, perché
tanto non c'è modo di verificare la corrispondenza con il binario.

Questa ricerca dimostra empiricamente che l'argomento di OSI era infondato.


Ora l'OSAID è stata rilasciata e il danno è fatto, per la gioia di chi vuol far 
passare
i propri modelli Toxic Candy [1] per "open source".


Giacomo
[1] 
<https://salsa.debian.org/deeplearning-team/ml-policy/-/blob/master/ML-Policy.rst>

Reply via email to