Skip to content

bug: fsdp cannot load optimizor state using dcp#3904

Merged
SunMarc merged 1 commit intohuggingface:mainfrom
flymin:fix-dcp
Jan 12, 2026
Merged

bug: fsdp cannot load optimizor state using dcp#3904
SunMarc merged 1 commit intohuggingface:mainfrom
flymin:fix-dcp

Conversation

@flymin
Copy link
Contributor

@flymin flymin commented Jan 9, 2026

What does this PR do?

Fixes # (3896) partially. Fix bug when using dcp, the optimizor state cannot be loaded. Tested with fsdp2.

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.

Thanks ! Can you add a test to check that it works ?

@flymin
Copy link
Contributor Author

flymin commented Jan 9, 2026

I am not familiar with how testing system works. Could anyone else offer some help? The logic should be straightforward. Before this PR, nothing would be loaded from the optimizer checkpoint.

@SunMarc
Copy link
Member

SunMarc commented Jan 12, 2026

It's fine, we will rework on the tests at some point ! Code looks good

@SunMarc SunMarc merged commit cdb2d1f into huggingface:main Jan 12, 2026
21 of 25 checks passed
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