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

Different batch_size results in different evaluation loss. #710

Open
iminfine opened this issue Jul 25, 2024 · 0 comments
Open

Different batch_size results in different evaluation loss. #710

iminfine opened this issue Jul 25, 2024 · 0 comments

Comments

@iminfine
Copy link

I have modified the code in train_gpt2.py to enable loading a pre-trained model and conveniently obtaining its evaluation loss by inserting a break statement at the beginning of the training loop:

 if args.init_from =='eval' :  
    break

after

print0(f"val loss {val_loss}")

I have unexpectedly observed that when the evaluation batch size is varied from the size used during training, the evaluation loss also varies. This observation is counterintuitive. The evaluation loss should remain consistent regardless of the evaluation batch size. Does any one know why?

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

1 participant