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

Fixes and updates training code for Transformers 4.48.1 #774

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

michaelbenayoun
Copy link
Member

@michaelbenayoun michaelbenayoun commented Jan 31, 2025

What does this PR do?

  • Update the training loop in the Trainer to match Transformers
  • BERT can train
  • Grad norm is surprisingly low compared to the GPU version of the same training
  • TP produces NaNs during BERT training
  • The end of the training takes forever

Copy link
Collaborator

@tengomucho tengomucho left a comment

Choose a reason for hiding this comment

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

I find difficult to understand what your changes have accomplished, can you give more details about that please?
Also, would you mind pointing to a test (or example) that now works after your changes?

Comment on lines 226 to 227
# if self.state.mp_plugin.pipeline_parallel_size == 1:
# data_loader = MpDeviceLoader(data_loader, self.device)
Copy link
Collaborator

Choose a reason for hiding this comment

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

remove this code instead of commenting it out

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.

2 participants