▲ | sgt101 8 hours ago | |||||||||||||||||||
ELI5: how (specifically) do GPU and TPU optimisations effect determinism in LLMs? Or is this all a myth? | ||||||||||||||||||||
▲ | barrkel 8 hours ago | parent | next [-] | |||||||||||||||||||
LLMs are generally deterministic. The token sampling step is usually randomized to some degree because it gets better results (creativity) and helps avoid loops, but you can turn that off (temp zero for simple samplers). | ||||||||||||||||||||
| ||||||||||||||||||||
▲ | jpgvm 7 hours ago | parent | prev [-] | |||||||||||||||||||
They don't affect determinism of the results but different architectures have different determinism guarantees with respect to performance, as a result of scheduling and other things. TPUs share a similar lineage to the Groq TPU accelerators (disclaimer: I work at Groq) which are actually fully deterministic which means not only do you get deterministic output, you get it in a deterministic number of cycles. There is a trade off though, making the hardware deterministic means you give up HW level scheduling and other sources of non-determinism. This makes the architecture highly dependent on a "sufficiently smart compiler". TPUs and processors like them are generally considered VLIW and are all similarly dependent on the compiler doing all the smart scheduling decisions upfront to ensure good compute/IO overlap and eliminating pipeline bubbles etc. GPUs on the other hand have very sophisticated scheduling systems on the chips themselves along with stuff like kernel swapping etc that make them much more flexible, less dependent on the compiler and generally easier to reach a fairly high utilisation of the processor without too much work. TLDR: TPUs MAY have deterministic cycle guarantees. GPUs (of the current generation/architectures) cannot because they use non-deterministic scheduling and memory access patterns. Both still produce deterministic output for deterministic programs. |