results = ThreadPool(workers=1000).imap_unordered(calc, inputs)
print(math.fsum(results))
Due to the magic of the fsum alg, the result is deterministic whatever order we get results in.
https://docs.python.org/3/library/math.html#math.fsumI guess if determinism is so important implementations can be changed, it is just maybe not that high priority.
You could use just one thread on your 10000 thread GPU too and it would be deterministic, sure. Completely beside the point.
One non-determinism we see with a temperature of 0 is that once you have quantized weights, many predicted pieces will have the same probability, including multiple pieces with the highest probability. And then the sampler (if you are not using a greedy decoder) will sample from those pieces. So, generation is non-deterministic with a temperature of 0.
In other words, a temperature of 0 is a poor man’s greedy decoding. (It is totally possible that OpenAI’s implementation switches to a greedy decoder with a temperature of 0).
There's no difference here. This isn't a GPU problem.