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

FSDP cannot consolidate optimizer state dict with flatten params is False #1100

Open
ShenglongZ opened this issue Dec 13, 2022 · 3 comments
Open

Comments

@ShenglongZ
Copy link

I'm now training a large model with 2.5B parameters with AdamW optimizer. Due to the known issue about FSDP and activation checkpointing, I'm using FSDP with flatten params = False. When saving the training checkpoint, the model has state_dict() and local_state_dict() two methods which distinguish saving full or sharded model states. Is it possible to save all full (not sharded ) optimizer states in a single file as well?

I saw the gather_full_optim_state_dict method but there is an assertion that requires flatten_parameters=True
image

@ShenglongZ ShenglongZ changed the title FSDP consolidate optimizer state dict with flatten params is False FSDP cannot consolidate optimizer state dict with flatten params is False Dec 13, 2022
@min-xu-ai
Copy link
Contributor

Yeah, we have not find people and time to work on this. Did you try pytorch's version of FSDP?

@syorami
Copy link

syorami commented Dec 16, 2022

hi @min-xu-ai I've tried pytorch version's FSDP but it has problems with the usage of checkpointing and offload. It seems that the work is still in progress. Is there any clean implementation of saving optimizer states with flatten_parameters=False?

@min-xu-ai
Copy link
Contributor

Unfortunately. There isn’t any yet. Feel free to hack it. 😃

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

No branches or pull requests

3 participants