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

Fixup MS-AMP integration #3023

Closed
wants to merge 14 commits into from
Closed

Fixup MS-AMP integration #3023

wants to merge 14 commits into from

Conversation

muellerzr
Copy link
Collaborator

@muellerzr muellerzr commented Aug 16, 2024

What does this PR do?

Fixes up the MS-AMP integration to include:

  • FSDP support
  • DeepSpeed support (1-2)
  • Integration suite

Closes #2143
Closes #2971
Closes #2972

IMPORTANT:

  • This PR requires this PR be merged into MS-AMP for FSDP support. In the meantime, you can use pip install git+https://github.com/muellerzr/MS-AMP@muellerzr-make-optim-init-easier

Before submitting

  • This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
  • Did you read the contributor guideline,
    Pull Request section?
  • Was this discussed/approved via a Github issue or the forum? Please add a link
    to it if that's the case.
  • Did you make sure to update the documentation with your changes? Here are the
    documentation guidelines, and
    here are tips on formatting docstrings.
  • Did you write any new necessary tests?

Who can review?

Anyone in the community is free to review the PR once the tests have passed. Feel free to tag
members/contributors who may be interested in your PR.

@BenjaminBossan @SunMarc

Comment on lines -309 to +314
if os.environ.get("ACCELERATE_USE_FSDP", "false") == "true" or isinstance(
fsdp_plugin, FullyShardedDataParallelPlugin
):
if is_torch_version("<", FSDP_PYTORCH_VERSION):
raise ValueError(f"FSDP requires PyTorch >= {FSDP_PYTORCH_VERSION}")
# if os.environ.get("ACCELERATE_USE_FSDP", "false") == "true" or isinstance(
# fsdp_plugin, FullyShardedDataParallelPlugin
# ):
# if is_torch_version("<", FSDP_PYTORCH_VERSION):
# raise ValueError(f"FSDP requires PyTorch >= {FSDP_PYTORCH_VERSION}")
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Here I need to adjust for the FSDP version, as it doesn't quite work on the .dev related additionals when using the docker image

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Relying on #3024 to fix

@HuggingFaceDocBuilderDev

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

@BenjaminBossan
Copy link
Member

Okay, let's wait until the MS-AMP PR is merged and then revisit this PR.

@muellerzr muellerzr added enhancement New feature or request wip Work in progress labels Aug 19, 2024
@muellerzr
Copy link
Collaborator Author

Will be closing this PR and opening another. Game plan is to keep all but the FSDP support but I'll keep this here for transparency.

@muellerzr muellerzr closed this Sep 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request wip Work in progress
Projects
None yet
Development

Successfully merging this pull request may close these issues.

MS-AMP support for FSDP MS-AMP support for DeepSpeed Feature Request: Support MS-AMP
3 participants