Skip to content

[2/8] feat: support partial checkpoint loading - #3

Merged
yueming-yuan merged 1 commit into
miles-mainfrom
feat/partial-checkpoint-loading
Feb 19, 2026
Merged

[2/8] feat: support partial checkpoint loading#3
yueming-yuan merged 1 commit into
miles-mainfrom
feat/partial-checkpoint-loading

Conversation

@yueming-yuan

Copy link
Copy Markdown
  • Allow loading checkpoints with missing keys (warn+skip instead of KeyError)
  • Add weights_only=False to torch.load for backward compat
  • Filter metadata for allow_shape_mismatch_sharded_tensors
  • Enable allow_partial_load=True in MCoreLoadPlanner
  • Handle None step in optimizer state dict

Allow loading checkpoints with missing keys by skipping them instead
of raising KeyError. This is essential for RL training where model
architecture may differ from the checkpoint.

- Add weights_only=False to torch.load for backward compatibility
- Skip missing keys in _validate_global_shapes with a warning
- Filter metadata for allow_shape_mismatch_sharded_tensors
- Enable allow_partial_load=True in MCoreLoadPlanner
- Handle None step in optimizer state and skip step key in sharded dict

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@yueming-yuan yueming-yuan changed the title feat: support partial checkpoint loading [2/8] feat: support partial checkpoint loading Feb 19, 2026
@yueming-yuan
yueming-yuan merged commit 823946d into miles-main Feb 19, 2026
guapisolo pushed a commit that referenced this pull request Feb 26, 2026
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
guapisolo pushed a commit that referenced this pull request Mar 2, 2026
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.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

Development

Successfully merging this pull request may close these issues.

1 participant