Prerequisites
- A running rollout deployment, with the model ID and deployment ID that
baseten model pushprinted. To create one, see Deploy RL Rollouts. - A published snapshot in your bucket. To publish one, see Publish checkpoints.
curl examples authenticate with BASETEN_API_KEY. Export your API key first:
Request a snapshot
To load a delta: Send aPOST request with the snapshot’s identity and the delta’s formats. Replace <model_id> and <deployment_id> with your deployment’s IDs:
{"identity": "step000003"}.
The response is {"revision": N}: Baseten stored the request, and every replica loads it. revision increases with each request, and the newest request wins, so you can request snapshots faster than replicas apply them. The API doesn’t check the snapshot. Each replica checks it and reports a bad one as rejected while it keeps serving its current snapshot.
For more information, see Set the target snapshot.
Check that every replica loaded it
To check each replica’s state: Send aGET request to the same URL:
replicas reports:
replica_status: "ready"loading_state.current_snapshot_identityset to the snapshot you requestedloading_state.hotload_stage: "done"loading_state.revisionequal to the top-levelrevision
done at an older revision hasn’t loaded your request yet. loading_state is null for a replica that hasn’t reported a state.
Replicas update independently, so rollouts can briefly come from different policies. To record which policy produced each rollout, request engine_data and save its policy_version and replica with each sample; see the RL request and response fields.
For more information, see Get snapshot loading status.
Recover from a rejected or failed load
When a replica’shotload_stage is rejected or error, loading_state.reason says why. A replica that rejects a snapshot keeps serving its current one. Fix the cause, then send the request again, or request an anchor. If the snapshot itself was bad, such as a delta built against the wrong parent, publish it again under a new identity, because published snapshots can’t change.
Clean up
The deployment bills for its GPUs until you deactivate it. To stop serving and stop the charges:--yes to skip the prompt when you script it.
Next steps
- Publish checkpoints: Publish the next delta or a new anchor.
- Deploy RL Rollouts: Upgrade the runtime or model configuration.