Skip to content

Conversation

@tohtana
Copy link
Collaborator

@tohtana tohtana commented Jan 26, 2026

Fix #7811
Issue: ZeRO-3 crashes when zero.GatheredParameters is used with modifier_rank=None and a parameter is modified in-place. The failure surfaced as an internal invariant assert in free_param, which is not actionable for users.

Solution: GatheredParameters now detects in-place mutation with modifier_rank=None and raises a clear, user-facing error early. The mutation check is synchronized across ranks to avoid divergence and hangs.
This PR also raises a clearer error from free_param when parameters are still active in submodules.”

Signed-off-by: Masahiro Tanaka <mtanaka@anyscale.com>
Signed-off-by: Masahiro Tanaka <mtanaka@anyscale.com>
@tohtana tohtana changed the title Tohtana/gather param mutation Raise clear error on in-place GatheredParameters edits without modifier_rank Jan 26, 2026
Signed-off-by: Masahiro Tanaka <mtanaka@anyscale.com>
Signed-off-by: Masahiro Tanaka <mtanaka@anyscale.com>
Signed-off-by: Masahiro Tanaka <mtanaka@anyscale.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant