Skip to content

Conversation

@muellerzr
Copy link
Contributor

@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
Contributor 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
Contributor 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

@muellerzr muellerzr force-pushed the muellerzr-msamp-ds-fsdp branch from 1c78d9e to 4a37e5f Compare August 16, 2024 19:05
@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
Contributor 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

4 participants