Skip to main content

What a checkpoint is

A managed job (grpo, grpo_harness, sft_text, dpo) saves a checkpoint at a fixed cadence while it trains: the model weights (or the LoRA adapter), plus the optimizer and scheduler state, the RNG state and the trainer state. That is everything needed to continue training exactly where it stopped. Each checkpoint is uploaded in the background while training goes on, and becomes visible only once every file is stored. Checkpoints are addressed by an id (ckpt_...) or by <job_id>@<step>, where step is the trainer’s global step.

Turning it on and tuning it

Two hyperparameters on every managed method: null counts as unset only for these two knobs, because the job object shows them as null when they are unset. Other hyperparameters take a value or are left out: kl_coef, for example, must be a number of 0 or more, and null is a 400.
Why the defaults differ: an adapter checkpoint is a few hundred megabytes and costs nothing noticeable to write, so ten per run is cheap insurance. A full fine-tune checkpoint is about 6 bytes per parameter (24 GB for a 4B model), and writing it pauses training for a couple of minutes on a cloud root disk; four per run keeps that overhead bounded while a failure still costs at most a quarter of the run. Set checkpoint_every yourself to change either. Each save keeps one checkpoint on the training machine’s local disk and uploads a copy. Uploads run in the background, one at a time with the newest save waiting next; on a slow link an intermediate save can be skipped in favour of a newer one, which the job’s events report as checkpoint_upload_skipped. If three checkpoints would not fit on the local disk (a large full fine-tune on a provider with a small disk), the job turns periodic saves off and records checkpoint_disabled_disk; the final artifact is still saved.

Working with checkpoints

download fetches the model and tokenizer files by default, which load with from_pretrained. Pass --artifact resumable to include the optimizer and trainer state (roughly two thirds of a full fine-tune checkpoint’s bytes), or --artifact adapter for the LoRA adapter files only. Each checkpoint carries the loss or reward logged at its step (metrics), so picking the best step is a list call.

Resuming a job

A job that failed, was cancelled, or simply stopped at max_steps can be continued from one of its checkpoints as a new job:
The new job has its own id, logs and bill. When it starts, the training machine downloads the checkpoint and the trainer continues from it: the global step, the optimizer, the learning-rate schedule and the data order all pick up where they stopped, so the loss curve continues rather than restarting. What must stay the same, because the checkpoint only fits the run it came from: method, base_model, the dataset (and its snapshot), the LoRA settings (lora_rank, lora_alpha, load_in_4bit) and gpu_count. The source job’s reward functions are reused automatically; do not send new ones. What may change: max_steps or num_epochs (raise them to train further), lora_dropout, output_name, the provider, region and GPU type. resume() sends back the source job’s hyperparameters as its job object shows them, so the continued run keeps the source’s kl_coef (none, if the source left it unset). The source job must have finished, and the checkpoint must still be ready. A request that breaks any rule is refused at submit with the reason. veri jobs resume and client.training_jobs.resume send the snapshot the source job trained on (its dataset_snapshot_id), so rows appended to a stream dataset since then do not change the run; when you build the request yourself, pass that snapshot (<dataset_id>@snap-N) as dataset_id when it is set, and the plain dataset id otherwise (uploaded datasets have no snapshot).

Resuming from a config file

A kind = "train" config resumes when its [job] section sets resume_from to a checkpoint id or <job_id>@<step>. The rest of the config must describe the same run as the source job (the rules above); raise max_steps to train further.
With resume_from = "<job_id>@<step>", the SDK and CLI look up the source job and, when [dataset].id is that job’s dataset id, send the snapshot it trained on instead, so rows appended to a stream dataset since then do not get the resume refused. A ckpt_... id does not name its job, so [dataset].id is sent as written: for a stream dataset, use the <job_id>@<step> form or set [dataset].id to the source job’s dataset_snapshot_id. GRPO jobs regenerate their rollouts after a resume. A step-count checkpoint_every is aligned to a generation boundary automatically so the continued run matches an uninterrupted one.

Retention

Checkpoints and the final artifact are kept until you delete them: deleting the job (or the workspace) deletes its checkpoints and its final artifact. Nothing expires on its own. The only automatic deletion is the keep-last limit you set with checkpoint_keep: with it, older checkpoints of the job are deleted as new ones are written. The checkpoints you keep are billed for storage, about $0.03 per GiB-month, prorated by the days kept (see Checkpoint storage), and so is the final artifact of a completed job (see Model storage).

Custom scripts

A custom script has no trainer for Veri to hook, so it uses a directory contract instead: write a checkpoint-<step> directory into $VERI_CHECKPOINT_DIR and Veri uploads it once it stops changing (and once more when the script exits). On a multi-node job only node 0 uploads. Custom-script checkpoints are downloadable like managed ones; resume_from applies to managed jobs only.