Get the code
Download the model configurations and checkpoint publisher from GitHub.
Prerequisites
- Contact Baseten to enable Baseten Inference Stack (BIS) and your model’s accelerator on your workspace.
- Prepare a full Hugging Face checkpoint that matches your model’s checkpoint requirements.
- Create an Amazon S3 bucket or a Google Cloud Storage (GCS) bucket. Choose a prefix for this training run, ideally in a bucket near your deployment region.
1
Install and authenticate the CLI
Install the Baseten CLI:For other platforms or a specific version, see the Baseten CLI install reference.Create a Baseten API key, then set it in your terminal:The CLI and the rollout requests below use this key. See Use API keys with CLIs for other authentication options.
- macOS or Linux
- Windows
Terminal
2
Clone the repository
Download the configurations and publisher, then install the publisher’s Python dependencies:
3
Configure publisher access
The checkpoint publisher runs on your trainer’s side, and you decide how your training loop calls it;
publish_checkpoint.py is a reference helper. Give it credentials to read and upload objects in your run’s prefix. Choose your cloud provider below and replace the placeholders with your credentials and bucket URI.- Amazon S3
- Google Cloud Storage
Grant the publisher For profiles, roles, or temporary credentials, follow the Boto3 credential setup.
s3:ListBucket on the bucket and s3:GetObject, s3:PutObject, and s3:AbortMultipartUpload on objects in the prefix. See S3 permissions for policy setup.To use access keys, set these environment variables:4
Create deployment secrets
The deployment uses the Upload the reader credentials and create See
rl_checkpoint_reader workspace secret to list and read checkpoints. Create separate reader credentials and save their values in a local file named reader.json.- Amazon S3
- Google Cloud Storage
Create an IAM access key for a user with
s3:ListBucket on the bucket and s3:GetObject on objects in your prefix. The deployment requires static keys because temporary session credentials expire.Save the reader’s access key ID, secret access key, and bucket region:reader.json
rl_bdn_partition, a random value that isolates your checkpoint cache in the Baseten Delivery Network (BDN):baseten org secret set for details. Keep reader.json out of version control.If deployment later prompts for a Hugging Face token, save a read token in an hf_access_token secret:5
Set your bucket
Open Edit only
glm-5.3-flash/b200-8/config.yaml. On the line marked EDIT, set BUCKET to the same bucket and prefix you used for ROLLOUT_BUCKET:- Amazon S3
- Google Cloud Storage
BUCKET to keep the configuration Baseten has validated for your model and accelerator.6
Publish your starting checkpoint
Upload your full checkpoint as the anchor The startup command confirms the snapshot selection:
step000001, then write STARTUP_SNAPSHOT so new replicas know which snapshot to load. Replace <HF_CHECKPOINT_DIR> with your checkpoint’s local directory:7
Push the deployment
Push the configuration file to create a model named This uploads the configuration file on its own. The command waits until the deployment is active. Copy the model ID and deployment ID from its output to use in the requests below.See
my-rollouts:baseten model push for deployment options.8
Confirm the starting snapshot
Check which snapshot each replica serves. Replace Repeat the request until every entry in Check that
<MODEL_ID> and <DEPLOYMENT_ID> with the IDs from the push:replicas reports current_snapshot_identity: "step000001" and loading_state.stage: "done". If a replica reports error, check its reason and follow the hot-load recovery instructions.Send a rollout request that includes the policy version in its response:nvext.engine_data.policy_version is 1, the policy version you assigned to the anchor. For another model, use the served_model_name from its configuration in your request.9
Load a new snapshot
After your trainer publishes a delta as HTTP
step000002, request it to update the running deployment:200 confirms that the service accepted the update. Repeat the status request from the previous step until every replica reports current_snapshot_identity: "step000002" and loading_state.stage: "done". See the hot-load API reference for errors and retries.Clean up
Deactivate the deployment when you finish to stop its replicas and GPU charges:Upgrade a deployment
To upgrade the runtime or model configuration, pull the latest files from the repository, restore yourBUCKET value, and push a new deployment. Check the configuration changelog before upgrading. To update weights during training, continue publishing snapshots to the running deployment.
Next steps
- Use the RL request and response fields to collect token IDs, log probabilities, expert routes, and policy versions.
- Connect your training loop with the Miles and Slime integration guide.