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

remove the obsolete code related to fairscale FSDP #26651

Merged
merged 2 commits into from
Oct 30, 2023

Conversation

statelesshz
Copy link
Contributor

@statelesshz statelesshz commented Oct 7, 2023

What does this PR do?

As the title says, this PR introduces two modifications:

  1. remove the gradient clipping code related to fairscale FSDP, as fairscale FSDP has been removed. See: remove SharedDDP as it is deprecated #25702
  2. updated the error message when mixing --bf16 and --half_precision_backend apex as the cuda_amp option is no longer available. I'm not sure how to write it more appropriately, so I just use auto instead.

@statelesshz
Copy link
Contributor Author

@muellerzr and @ArthurZucker could you please take a look at this PR? Thanks :D

Copy link
Contributor

@muellerzr muellerzr left a comment

Choose a reason for hiding this comment

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

Thanks! Looks good to me

@HuggingFaceDocBuilderDev

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint.

Copy link
Collaborator

@ArthurZucker ArthurZucker left a comment

Choose a reason for hiding this comment

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

Sounds good, let's rather raise an error here saying that it is no longer supported!

" `--half_precision_backend apex`: GPU bf16 is not supported by apex. Use"
" `--half_precision_backend cuda_amp` instead"
)
raise ValueError(" `--half_precision_backend apex`: GPU bf16 is not supported by apex.")
Copy link
Contributor Author

Choose a reason for hiding this comment

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

update error info. cc @ArthurZucker

@statelesshz
Copy link
Contributor Author

@amyeroberts sorry for bothering, could you please review this PR?

Copy link
Collaborator

@amyeroberts amyeroberts 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 updating the code and iterating!

@amyeroberts amyeroberts merged commit d751dbe into huggingface:main Oct 30, 2023
3 checks passed
@statelesshz statelesshz deleted the cleanup branch October 31, 2023 01:41
EduardoPach pushed a commit to EduardoPach/transformers that referenced this pull request Nov 19, 2023
* remove the obsolete code related to fairscale FSDP

* apple review suggestion
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.

5 participants