Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Loss Explodes to NaN in large batch-size #8778

Open
IsNoobgrammer opened this issue Mar 3, 2025 · 0 comments
Open

Loss Explodes to NaN in large batch-size #8778

IsNoobgrammer opened this issue Mar 3, 2025 · 0 comments
Labels
bug Something isn't working xla:tpu TPU specific issues and PRs

Comments

@IsNoobgrammer
Copy link

🐛 Bug

When using larger batch size on v4-8 , the loss after 2 optimizer step becomes nan ;
This issue primarily due to newer torch-xla and libtpu ;

To Reproduce

Here is the Notebook you can use for quick repro

Environment

  • Reproducible on XLA backend [TPU (v4-8)]:
  • torch-xla 2.7.0+gitc76e949 (can occur in any torch-xla after 2.5.0)
  • libtpu 0.0.10.dev20250210+nightly

Additional context

As mentioned earlier #8591 and #8683 (comment)

However even after trying recommended choice we were not able to mitigate it

Tagging @tengyifei @zpcore !! Thanks for your efforts

@ysiraichi ysiraichi added bug Something isn't working xla:tpu TPU specific issues and PRs labels Mar 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working xla:tpu TPU specific issues and PRs
Projects
None yet
Development

No branches or pull requests

2 participants