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

Split Sizes Throws Error #3

Closed
jstremme opened this issue Mar 31, 2022 · 2 comments
Closed

Split Sizes Throws Error #3

jstremme opened this issue Mar 31, 2022 · 2 comments

Comments

@jstremme
Copy link
Contributor

jstremme commented Mar 31, 2022

@MichalBrzozowski91, thanks for this project! Really great stuff.

I get the following error in main.py on a four GPU setup when attempting to fine-tune a BERT model:

With batch size 1:
RuntimeError: split_with_sizes expects split_sizes to sum exactly to 800 (input tensor's size at dimension 0), but got split_sizes=[16]

With batch size 4:
RuntimeError: split_with_sizes expects split_sizes to sum exactly to 2750 (input tensor's size at dimension 0), but got split_sizes=[25, 6, 8, 16]

I would expect number_of_chunks to be of variable size for each record in the batch, but no matter my batch size, I seem to get an error at preds_split = preds.split(number_of_chunks) in main.py.

Any idea what I might be missing?

@MichalBrzozowski91
Copy link
Collaborator

Does an example work on your setup?

@jstremme
Copy link
Contributor Author

Does an example work on your setup?

Apologies for the late reply. Your example code works with my setup. It must be the customizations I was adding to your code that aren't working.

I'll close this issue, as there doesn't appear to be anything wrong with your code.

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

2 participants