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

Skip step if loss is nan #227

Closed
wants to merge 1 commit into from
Closed

Skip step if loss is nan #227

wants to merge 1 commit into from

Conversation

chrisociepa
Copy link

There are various of reasons why loss might become nan. To prevent breaking training, we can just skip such step

@PershingSquare
Copy link

PershingSquare commented Mar 30, 2023

I would recommend against skipping training when the loss becomes NaN, as this usually indicates that there is some numerical instability in the model that needs to be addressed. Continuing to train the model in this state is unlikely to produce meaningful results and may even cause the model to perform worse.

Instead, it's important to investigate why the loss is becoming NaN and take appropriate steps to address the underlying issue. This could involve checking the data for errors or inconsistencies, adjusting the model architecture or hyperparameters, or using more stable numerical methods for training.

@karpathy
Copy link
Owner

agree... closing

@karpathy karpathy closed this Apr 13, 2023
klei22 pushed a commit to gkielian/ReaLLMASIC_nanogpt that referenced this pull request Aug 17, 2024
modified whisper_snac.sh to run the whole process
gkielian added a commit to gkielian/ReaLLMASIC_nanogpt that referenced this pull request Sep 5, 2024
modified whisper_snac.sh to run the whole process
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

Successfully merging this pull request may close these issues.

3 participants