Snapshots
A snapshot saves an adapter, training state or both. Use one to resume training, start a branch or register an earlier model.
Save snapshots
Set execution.saveEvery to a number of optimizer updates. Without periodic or epoch saves, the run saves only at the end. A completed training run always leaves its final save as a snapshot, with its adapter and its training state, so you can branch from it or register it. A smoke check under TRL leaves no final save. See execution settings for defaults and retention controls.
List snapshots and inspect one:
akka optimize training runs snapshots RUN_ID
akka optimize training snapshots get SNAPSHOT_ID
akka optimize training runs snapshots 2c7f4e9a1b3d
SAVED STEP EPOCH SNAPSHOT ARTIFACTS SWEPT SIZE STATUS HELD BY
60 — aaaa1111bbbb weights, trainingState — 150.0 MiB Available candidate 999988887777
120 — 1111aaaa2222 weights — 50.0 MiB Available —
1 to 2 of 2 snapshots.
training runs snapshots lists the snapshots a run committed, with the artifacts each holds and what holds it.
Optimize publishes a snapshot after the engine finishes writing it. Training can continue during upload.
When uploads fall behind, some snapshots save only model weights, without the training state needed to resume. Check Saved before pausing with latest. Change execution.resumableSaveEvery or execution.resumableSaveMinutes to control how often training state uploads. An Unrecorded save cannot be resumed, branched from or registered.
Pause a run
Save at the next optimizer boundary and stop:
akka optimize training runs pause RUN_ID --checkpoint save
akka optimize training runs get RUN_ID
Choose --checkpoint latest to stop at the newest restorable snapshot instead. Resuming then repeats updates after that snapshot. A run without restorable training state cannot use this policy after making progress.
Wait for PAUSED and pause.resourcesReleased: true before resuming. Training continues until the job reads the pause request. If it finishes first, the pause reports OVERTAKEN.
Pause at a step
Schedule a save and pause at a specific update:
akka optimize training runs pause RUN_ID --at-step 500
akka optimize training runs start -f run.yaml --pause-at-step 500
Choose a future step before the training budget ends. To ensure the job reads it before reaching that step, set it at start or while paused. A running job that passes the step before reading it reports a failed pause.
Use --clear-step to remove a scheduled step. Once saving at that step begins, the run still pauses. The wait command returns when the scheduled pause takes effect.
Resume a run
Resume from the newest full-state snapshot:
akka optimize training runs resume RUN_ID
Alternatively, select an earlier retained step:
akka optimize training runs resume RUN_ID --step 100
After either choice, wait for the run to finish:
akka optimize training runs wait RUN_ID --exit-status
The run keeps its identity, engine and GPU count. The --step option requires a paused run and retained training state at that step. Check Resumed to see where the new attempt started.
Keep the snapshots you need
The following settings control unreferenced saves:
-
Set
execution.keepAdaptersto keep recent adapter weights. -
Set
execution.keepRecoverableto keep recent training states for resuming from their steps. -
Epoch holds, branch references and pins protect the artifacts they reference.
Pin a snapshot before resuming from an older step if you need to keep later saves. Retention can delete those later saves. SWEPT identifies deleted artifacts; a listed snapshot does not necessarily retain both kinds.
Registered model versions keep their own weights, so deleting snapshot weights does not delete those models. Deployments with shared-filesystem checkpoints list no snapshots and cannot resume from a named step.
Save each epoch
For SFT, set execution.saveEachEpoch: true to register an adapter at each epoch boundary. Those weights have an epoch hold and do not count toward keepAdapters. After the run finishes, release a hold with:
akka optimize training snapshots release SNAPSHOT_ID RUN_ID
A completed run registers its own model after its epoch adapters, so latest names the run’s model. The run waits up to 15 minutes for the epoch adapters to register. Where one takes longer, the run registers its model first, and that epoch adapter becomes the newest version. Use the exact model version shown by training runs get for the run’s final result. Full-state branches do not save at epoch boundaries.
The save at the run’s last update is the run’s own model, and training runs get names it on the Model line. training snapshots register for that save registers nothing new. It returns the run’s model version, or says the run has not registered it yet.
Choose a restore policy
Resume restores full training state. A weights branch starts a new training schedule from adapter weights. A full-state branch needs the same GPU count as its snapshot, and a reinforcement branch needs the same method.
For an inherited reinforcement adapter, positive klBeta requires one GPU and prevents full-state branching. Set klBeta: 0, train without an inherited adapter, or use a weights branch. See Branches and sweeps.