Skip to content

Conversation

@ggerganov
Copy link
Member

Update llama-eval-callback to stop on first tensor with a NaN. I think this is always useful when debugging - don't see a reason not to stop.

}

if (std::isnan(sum)) {
exit(0);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A log message before exiting would be nice.

@ggerganov ggerganov merged commit df36bce into master Aug 14, 2025
41 of 47 checks passed
@ggerganov ggerganov deleted the gg/eval-callback-stop-on-nan branch August 14, 2025 19:10
// TODO: make this abort configurable/optional?
if (std::isnan(sum)) {
LOG_ERR("encountered NaN - aborting\n");
exit(0);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this should have been exit(1) ..

@copilot Can you fix this for me in a new PR?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately only works in PRs where Copilot is involved. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants