Skip to content

Support weights-only checkpoint loading #1993

Description

@j316chuck

What Tinker supports

Tinker 0.23 intentionally exposes two checkpoint-loading APIs:

Weights-only loading is needed for warm starts and stage transitions where parameters should transfer but stale Adam momentum and scheduler state should not.

What SkyRL is missing

SkyRL currently loses this distinction:

  1. LoadWeightsRequest does not expose the optimizer flag.
  2. The load_weights endpoint creates LoadWeightsInput without it.
  3. SkyRLTrainBackend.load_checkpoint hardcodes load_optimizer_states=True and load_lr_scheduler_states=True.

As a result, load_state() and load_state_with_optimizer() both restore optimizer and scheduler state on the SkyRL backend.

Feature Request

  • Add the load_optimizer boolean to SkyRL load-weight request/input types.
  • Thread it through the API and engine to load_checkpoint.
  • Restore optimizer and scheduler state only when load_optimizer=True.
  • Add a regression test that first creates nonzero Adam moments, then verifies:
    • load_state() resets exp_avg, exp_avg_sq, and scheduler state.
    • load_state_with_optimizer() preserves them.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions