- Weights and optimizer state: restores the adapter, the optimizer state, and the step count. Use it to continue an interrupted run where it stopped.
- Weights only: restores the adapter and starts a fresh optimizer. Use it to begin a new training stage from saved weights.
BASETEN_API_KEY. Export your API key first:
- Python SDK
- Loops cookbook
To continue training from saved state:Create a training client from the saved state’s path with The script prints the new run’s ID. To restore the weights with a fresh optimizer instead, call
ServiceClient. Replace <state_path> with the path that save_state() returned, then run:create_training_client_from_state() with the same path.Next steps
- Save a checkpoint: Save training state during the new run.
- Load a checkpoint into a new job: Continue from a Loops checkpoint with your own training code.