Branches and sweeps
A branch starts a new run from a source snapshot. Use branches to compare a different learning rate, method, dataset or device count without changing the source. To start a whole new plan from a registered model version instead, see Start from existing weights.
The child inherits the parent’s training project, base model, devices, grader and resolved configuration. An override document contains only what changes. Omitted fields keep the parent’s resolved values.
A branch is one of two kinds, and the command names which:
-
training runs continuecontinues the snapshot’s training state for--stepsmore optimizer updates. -
training runs branchtrains a fresh run from the snapshot’s weights, for the--epochsand--max-stepsa run plan would state.
Submit a branch
To validate and submit a branch, follow these steps:
-
Save the following override document as
lower-lr.yaml:hyperparams: optimizer: learningRate: 0.00005 -
Validate a continuation of the training state:
akka optimize training runs continue RUN_ID --snapshot SNAPSHOT_ID --steps 200 \ --overrides lower-lr.yaml --dry-run -
Submit it:
akka optimize training runs continue RUN_ID --snapshot SNAPSHOT_ID --steps 200 \ --overrides lower-lr.yaml --wait --exit-status -
Or train a fresh run from the same snapshot’s weights for two epochs:
akka optimize training runs branch RUN_ID --snapshot SNAPSHOT_ID --epochs 2 \ --overrides lower-lr.yaml --wait --exit-status
The --snapshot option specifies a committed snapshot of the parent from training runs snapshots. Without it, each command takes the parent’s newest committed snapshot that holds what it restores, and names the one it took.
The --steps option of continue sets the additional optimizer updates the child trains. The --epochs and --max-steps options of branch set the child’s length as a run plan’s epochs and maxSteps do: maxSteps replaces the epochs under TRL and verl SFT, and caps them under verl reinforcement learning. A child that sets one of the two takes the other at the plan default. A child that sets neither inherits both from its parent. A reinforcement child that should train N steps under verl sets enough epochs for N, such as --epochs N --max-steps N, because verl stops at its last epoch. The dry run’s Length line states what the child trains for.
The dry run shows a Diff line for each setting the child trains with a different value than its parent, as PATH: PARENT_VALUE → CHILD_VALUE. When Optimize refuses a branch, the message gives the reason, then lists each refused setting under Refused overrides: with its own reason.
The following example shows training runs branches output. Your IDs and relative times differ.
akka optimize training runs branches 2c7f4e9a1b3d
CHILD RUN PHASE SOURCE SNAPSHOT SOURCE STEP LENGTH CONFIG STARTED
4e1a9b7c2d5f Training aaaa1111bbbb 60 200 steps b5d2e8a1f37c 120m ago
1 to 1 of 1 child runs.
training runs branches lists the runs started from the parent’s snapshots.
Sweep a parameter grid
Use a sweep to submit one child run per point of a parameter grid. Each child inherits the parent’s training project, base model, devices and grader.
To submit a sweep, follow these steps:
-
Save the following grid as
grid.yaml:axes: - path: hyperparams.optimizer.learningRate values: - 0.000050 - 0.00010 - 0.00020 -
Submit the sweep:
akka optimize training runs sweep RUN_ID --snapshot SNAPSHOT_ID --epochs 2 --grid grid.yaml --compare --dataset triage/eval --grader json-label-match
Each point trains a fresh run from the snapshot’s weights, as training runs branch does, for the length --epochs and --max-steps set. A grid can vary the length fields instead. Add --continue --steps N to continue the training state at each point instead.
The grid is YAML or JSON with an axes list. Each axis has a dotted path in the branch override document and a list of values. Paths can name any field an override document takes; see Write overrides.
Use --dry-run to validate the grid and --submission-id to retry an uncertain submission. A grid submits at most 50 children. A source snapshot can have at most 50 live branches, including earlier submissions. See training runs sweep --help for all options.
After a partial submission, the command prints Submitted K of N point(s). Re-run with --submission-id T to submit the remainder. Reuse that token to submit the remaining points.
Without --compare, the command prints follow-up commands to list the branches and compare them:
akka optimize training runs branches RUN_ID
akka optimize training comparisons create --source SNAPSHOT_ID --all-branches RUN_ID --dataset DATASET
Restore modes
Each command restores one artifact of the snapshot:
| Command | Initial state | Child schedule |
|---|---|---|
|
Adapter weights, with a fresh optimizer, random-number generators, data position, and step counter. |
Starts fresh over the steps the job counts from the child’s epochs and |
|
The adapter, optimizer, random-number generators, data position, and step counter from the snapshot. |
Replaced by a new schedule of the run’s own scheduler kind and warmup over |
When a snapshot cannot continue, continue says why. Use branch to train a fresh run from its weights instead. The --restore option is replaced by the two commands, and either command refuses it.
With continue, set only the learning rate and hyperparams.training.validationFrequencySteps in the override document. Optimize refuses every other field, even if it repeats the parent’s value. A different execution.gpus is refused because the training state was saved across the parent’s GPUs. The child does not save or validate at epoch boundaries; check Epochs in training runs get --settings. Use branch for other compatible changes, including a change from SFT to reinforcement learning or DPO.
Preference training from a supervised run
To train a DPO child from a supervised run’s adapter, use training runs branch from one of the run’s snapshots. The override document sets method to dpo and dataset to a preference dataset, and can set preference and hyperparams:
method: dpo
dataset: triage/preferences
preference:
beta: 0.1
A DPO weights branch uses the inherited adapter as its reference model. Set preference.fusedLoss: false to compute the loss without Liger’s fused kernel. A DPO child otherwise inherits its DPO parent’s fusedLoss setting. See Preference optimization (DPO).
A child of a DPO run keeps its parent’s GPUs. A DPO child of another method uses one GPU unless the override document sets execution.gpus. Its learning rate defaults to 0.000005; change it with hyperparams.optimizer.learningRate. The child keeps the adapter shape, but has no validation dataset and reports no validation accuracy. Inspect its resolved settings with a dry run before submitting.
For a DPO run that started from an inherited adapter, use branch. Optimize refuses continue for that source.
Write overrides
An override document uses the run plan’s own group and field names. Write only what changes. A branch document may set epochs and maxSteps in place of the flags; a continue document may not. Use a dry run to check the result.
The following document moves a supervised run to new data, a new validation dataset and fewer GPUs, without the parent’s flex attention:
dataset: support/triage-2026-11
data:
validationDataset: support/triage-2026-11-validation
execution:
gpus: 12
model:
attentionImplementation: sdpa
With weights, a branch can change everything its adapter does not fix:
| Fields | How the child takes them |
|---|---|
|
The value you write replaces the parent’s. |
|
Each field you write replaces the parent’s. The rest of the group is inherited. |
|
The group you write replaces the parent’s whole group. Fields you leave out take their defaults, so |
|
Each field you write replaces the parent’s. The rest of the parent’s execution is inherited. |
Set model.attentionImplementation to sdpa to train without the parent’s flex attention.
The adapter fixes the base model, the precision and the adapter’s shape. Optimize refuses a branch that sets another lora.rank or sets lora.targetModules, and names the modules the adapter covers. A child that does not fit the GPU pool or the training project’s quota is refused when you submit it.
execution is outside the configuration hash, as for an ordinary run, so two children that differ only in execution share a configuration column in project scores.
Acceptance and preparation
A branch can be accepted before its child run exists. Use --wait to follow preparation and training. Without --wait, read preparation before using the child:
akka optimize training runs branches RUN_ID --submission SUBMISSION_TOKEN
Every invocation generates a new submission token, which the service treats as a new child. After an uncertain outcome, such as a lost connection, pass --submission-id with the original token. This reaches the child created by that attempt instead of starting another one. The CLI prints the recovery command. A retried submission uses its stored dataset resolution even if the reference has since changed. A dry run reserves no resources.
Lineage
Use lineage to find a branch’s parent, source snapshot, and starting step.
Read every generation below a run, or the ancestor chain leading to one run:
akka optimize training runs tree ROOT_RUN_ID
akka optimize training runs tree ROOT_RUN_ID --depth 1
akka optimize training runs ancestry RUN_ID
The tree command shows descendants. Use --depth to limit generations; 0 includes all generations. The SOURCE STEP column reports the parent’s snapshot step. The ancestry command lists the path from the root to the selected run.
Choose a readable snapshot
If continue is refused because of the snapshot layout, try branch. If its weights are also unreadable, choose another snapshot.
Compare a source with its branches
A comparison evaluates the source snapshot and selected branch models with one pinned dataset, grader, and completion-token limit. It registers the source as a candidate if necessary. For more information, see Comparisons.