Skip to content

Conversation

@kmehant
Copy link
Contributor

@kmehant kmehant commented Nov 29, 2025

What does this PR do?

For some reason, previous code uses self._mixed_precision to set which is not being set before, instead it should be using the mixed_precision param that is being passed to that function. This would then allow us to use accelerate config's mixed_precision param directly to set FSDPv1/v2 MP.

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?

@SunMarc

Copy link
Member

@SunMarc SunMarc left a comment

Choose a reason for hiding this comment

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

Left a comment !

self.parallelism_config is not None and self.parallelism_config.cp_enabled
):
self.distributed_type = DistributedType.FSDP
self._mixed_precision = mixed_precision
Copy link
Member

Choose a reason for hiding this comment

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

this should already be set above, if this changed, can you check why ?

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