Skip to content

Fine-tuning with Naive Pipeline Parallel: NaN after optimizer step #4

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

Open
fs4r opened this issue Mar 12, 2023 · 2 comments
Open

Fine-tuning with Naive Pipeline Parallel: NaN after optimizer step #4

fs4r opened this issue Mar 12, 2023 · 2 comments

Comments

@fs4r
Copy link

fs4r commented Mar 12, 2023

Your model does not seem to be able to calculate the gradients of the layers correctly. When I run finetune_pp.py and print the loss during training, after the first optimizer step, the loss becomes the following:

tensor(nan, device='cuda:1', dtype=torch.float16, grad_fn=)

Can you reproduce this on your machine? Otherwise, would you be willing to share your pip freeze, so that I can try out, if there is a package mismatch?

@yysjasmine
Copy link

I met the same situation, how did you fix it?

@chaoyi-wu
Copy link

chaoyi-wu commented Mar 20, 2023

I met the same situation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants