JustGRPO icon indicating copy to clipboard operation
JustGRPO copied to clipboard

fsdp bug about single gpu

Open STAR-CV opened this issue 10 months ago • 4 comments

Great work! I'd like to ask how to resolve the following fsdp error that occurred during single gpu debugging. [rank0]: RuntimeError: Cannot writeback when the parameter shape changes [rank0]: Expects torch.Size([517996544]) but got torch.Size([126464, 4096])

STAR-CV avatar Feb 03 '26 04:02 STAR-CV

This looks like an FSDP writeback/flattened-parameter shape mismatch that can happen in single-GPU debugging.

For debugging, I’d suggest running without FSDP first (e.g., don’t use the FSDP accelerate config) to make sure the training logic is correct.

nzl-thu avatar Feb 03 '26 14:02 nzl-thu

Hello, I'd like to ask: Can I simply replace fsdp.yaml in the config directory with accelerate.yaml from the d1 directory to disable FSDP for debugging purposes?

STAR-CV avatar Feb 04 '26 03:02 STAR-CV

We haven't verified this explicitly, but please feel free to try it out:)

Hello, I'd like to ask: Can I simply replace fsdp.yaml in the config directory with accelerate.yaml from the d1 directory to disable FSDP for debugging purposes?

nzl-thu avatar Feb 05 '26 07:02 nzl-thu

Alright, thank you for your reply.

STAR-CV avatar Feb 05 '26 07:02 STAR-CV