Skip to main content
To continue training after a run ends or is preempted, start a new run from a training-state checkpoint. The new run uses the checkpoint’s base model and LoRA configuration. Choose how much state it restores:
  • 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.
To save training state, see Save a checkpoint. The Python SDK and the cookbook authenticate with BASETEN_API_KEY. Export your API key first:
To continue training from saved state:Create a training client from the saved state’s path with ServiceClient. Replace <state_path> with the path that save_state() returned, then run:
The script prints the new run’s ID. To restore the weights with a fresh optimizer instead, call create_training_client_from_state() with the same path.
Use the new run’s ID to list its checkpoints or deactivate it.

Next steps