[Question] why jax use float32 while torch use bfloat16?
Hi, I'm currently running PI 0.5. I noticed that the default data type in JAX is float32, whereas it's bfloat16 in PyTorch. Could you explain the reason behind this difference?
This is more of a JAX, and upstream NumPy question, than a PI question.
You may want to ask the devs of those projects for a better answer, but my guess is, NumPy is a general purpose numeric library, and so uses the more precise float16, while machine learning requires a wider dynamic range and so PyTorch uses bfloat16.
I hope this helps.
This is more of a JAX, and upstream NumPy question, than a PI question.
You may want to ask the devs of those projects for a better answer, but my guess is, NumPy is a general purpose numeric library, and so uses the more precise float16, while machine learning requires a wider dynamic range and so PyTorch uses bfloat16.
I hope this helps.
Thanks. I have confirmed that the JAX model already adopts mixed precision. Additionally, I observed that the PyTorch model has lower inference latency than the JAX model in 4090 GPU, the speedup is about 140%. torch.compile is the main source of speedup.
Hey, have you observe performance gap between models of jax and pytorch?
Hi, I observed a significant performance gap between the JAX and PyTorch models. Under the same dataset and normalization settings, the JAX version performs very well, while the PyTorch version shows noticeably worse results.
Hi, I observed a significant performance gap between the JAX and PyTorch models. Under the same dataset and normalization settings, the JAX version performs very well, while the PyTorch version shows noticeably worse results.
which model are you using acutually?
Figure 2 shows the jax version's performance, while Figure 1 shows the pytorch version. It seems that pytorch is completely unable to work? Have you ever run into this situation?
Hi, I observed a significant performance gap between the JAX and PyTorch models. Under the same dataset and normalization settings, the JAX version performs very well, while the PyTorch version shows noticeably worse results.
Did you solve this problem? Did you ultimately use the torch model or the jax model