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

Fix for Webgpt NaN loss #2438

Merged
merged 1 commit into from Apr 10, 2023
Merged

Fix for Webgpt NaN loss #2438

merged 1 commit into from Apr 10, 2023

Conversation

shahules786
Copy link
Collaborator

@shahules786 shahules786 commented Apr 10, 2023

Webgpt dataset was giving NaN loss/metrics during RM training. This was due to the presence of samples in the dataset with empty string answers.
for example,
{'question': {'dataset': 'arc-challenge', 'id': 'Mercury_7228550', 'full_text': 'How many basic units of information in a DNA molecule are required to encode a single amino acid?\nA. 1\nB. 2\nC. 3\nD. 4'}, 'quotes_0': {'title': [], 'extract': []}, 'answer_0': '', 'tokens_0': {'prefix': [2437, 867, 4096, 4991, 286, 1321, 287, 257, 7446, 27756, 389, 2672, 284, 37773, 257, 2060, 23206, 7408, 30, 198, 32, 13, 352, 198, 33, 13, 362, 198, 34, 13, 513, 198, 35, 13, 604, 48366], 'completion': [48366]}, 'score_0': 0.0, 'quotes_1': {'title': [], 'extract': []}, 'answer_1': '', 'tokens_1': {'prefix': [2437, 867, 4096, 4991, 286, 1321, 287, 257, 7446, 27756, 389, 2672, 284, 37773, 257, 2060, 23206, 7408, 30, 198, 32, 13, 352, 198, 33, 13, 362, 198, 34, 13, 513, 198, 35, 13, 604, 48366], 'completion': [48366]}, 'score_1': 0.0}

fixes : #2439

Copy link
Collaborator

@sanagno sanagno left a comment

Choose a reason for hiding this comment

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

Thanks a lot for that, good catch!

Copy link
Collaborator

@andreaskoepf andreaskoepf left a comment

Choose a reason for hiding this comment

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

thanks for debugging the NaNs! :-)

@andreaskoepf andreaskoepf merged commit 132f402 into LAION-AI:main Apr 10, 2023
1 check passed
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.

WebGPT outputs NaN loss during RM training
3 participants