Training runs

A run adapts a base model with one dataset and configuration. Use runs to train a model, inspect its progress, and manage its lifecycle. A run keeps the same identity across attempts.

The run plan

The training runs start command reads a YAML or JSON run plan. The following plan from the support triage example defines a complete supervised run:

kind: run
project: support-triage
baseModel: unsloth/Llama-3.2-1B-Instruct
config:
  dataset: support-triage/train
  method: sft
  hyperparams:
    lora:
      rank: 8
    optimizer:
      learningRate: 0.0001
    training:
      epochs: 2
  maxSeqLength: 2048
  model:
    precision: BF16
execution:
  gpus: 1
  saveEvery: 20
  keepAdapters: 4
description: two epochs at rank 8
configName: r8-e2

The plan names the training project and base model. The config object determines what the model learns. See Run plan reference for every field.

For the methods and the datasets they need, see Training methods.

Start a run

To start a run and wait for it to finish, follow these steps:

  1. Validate the plan:

    akka optimize training runs start -f run.yaml --dry-run
  2. Start the run and read its ID from the output:

    akka optimize training runs start -f run.yaml -o json --jq .runId
  3. Wait for the run to finish, replacing RUN_ID with the ID from the previous step:

    akka optimize training runs wait RUN_ID --exit-status

The --dry-run option validates the plan against the service without training. Without it, the command validates the plan and asks for confirmation. The --force option skips the prompt. Without a submissionId in the plan, every submission starts a new run, so submitting the same plan twice trains it twice. With one, a later submission reaches the run that the first started.

Inspect duplicate findings with --dry-run -o json. Read diagnostics.coverage because findings may cover only a sample.

Add --show-resolved to --dry-run to see the configuration and execution settings that the run would use. The output includes every default and every resolved dataset and reward reference:

akka optimize training runs start -f run.yaml --dry-run --show-resolved

This command reports the same values that training runs get --settings reports after the run exists. Use it to resolve a plan before starting the run. The -o json option includes the resolved configuration as structured data.

For SFT and DPO, a dry run shows a Lengths section with any available dataset analysis and suggested maxSeqLength. If no analysis is available, run the training datasets analyze command the output suggests. Prepared token rows report their recorded longest row. Reinforcement runs show no Lengths section. Use -o json to read resolved.lengths.

Smoke check

Use a smoke check to test whether SFT can reproduce a small slice of your data. If it fails, inspect the data, masking and tokenizer before a longer run.

Smoke checks accept SFT, GRPO and GSPO plans. A smoke check takes everything else from the plan. Add smoke to the plan to run one:

Field Default Description

sliceSize

200

The rows taken from the start of the dataset. These are also the rows scored afterwards.

maxSteps

2000

The cap on optimizer updates. Raise it with sliceSize, so the slice can still be memorized.

threshold

0.98

The reproduction score a working run reaches. It must not be above 1.

An UNSTABLE_READING verdict means training stopped early after reproducing enough of the slice, but the later reproduction check disagreed. Raising maxSteps does not fix it because training stopped before reaching that budget.

The training runs get command shows the verdict. The training runs wait --exit-status command exits with a non-zero status when the check fails.

The following example shows training runs get output for a smoke check. Your IDs and scores differ.

akka optimize training runs get 1a288e760284
State
  Run            1a288e760284aa43ac5247cd466c7d2d92c56483e77b4d99ed2b97c5b227d280
  Project        triage
  Method         SFT
  Base model     unsloth/Llama-3.2-1B-Instruct
  Dataset        triage/train:v1 — 2000 example(s)
  Phase          Completed
  Progress       410/2000 steps (20%), loss 0.0120
  Saved          nothing; 410 update(s) reported and none of them can be restored

Results
  Training loss  2.4100 → 0.0120 (mean 0.2880)
  Check          HEALTHY — reproduced 99% of the memorized slice in generation mode
  Scores         reproduction 0.99, grader 0.99 over 200 example(s)

Cost
  GPU            612.0 seconds over 200 examples
  Duration       10m, ended 4h49m ago (waiting for devices 3s, queued 6s, preparing 31s, training 10m, other 7s)
  Throughput     4,556 tokens per second per device, the mean over its steps
  Training peak  6.1 GiB per device, held by the training pass
  Host memory    22.6 GiB in use on node 1 at peak (11.8 GiB at start)
  Memory         at step 402, of 79.6 GiB: weights 2.3, adapter 0.0, gradients 0.0, activations 3.2, optimizer 0.1, other 0.5, allocator 0.8, outside 0.5, free 72.2

Start from existing weights

A run starts from its base model unless it names a source. The source can be a registered model version or a snapshot of another run:

Start from a model version Branch from a snapshot

Write

A whole run plan with source.model.

An override document, with --snapshot.

Inherits

Nothing. Fields you leave out take the usual defaults.

The parent’s resolved plan: project, base model, devices, grader and configuration.

Restores

The version’s adapter weights.

The snapshot’s adapter weights, or its whole training state.

Command

training runs start -f run.yaml

training runs branch RUN_ID --snapshot SNAPSHOT_ID --epochs N, or training runs continue RUN_ID --snapshot SNAPSHOT_ID --steps N for the training state

To start any method from a model version, name the version under source. The following plan trains SFT on new data from a registered adapter:

project: support
baseModel: unsloth/Llama-3.2-1B-Instruct
source:
  model: support/triage:v3
config:
  dataset: support/triage-2026-11
  method: sft
execution:
  gpus: 2

The run trains the version’s adapter. Set baseModel to the version’s base model. Leave lora.rank and lora.targetModules out, since the adapter sets them. A plan that leaves the rank at its default trains at the adapter’s rank. Optimize refuses a plan that sets another rank, or target modules other than the default. A DPO run from a model version measures its rewards against a frozen copy of that adapter. In a pipeline, name an earlier stage’s model as source: {model: "@sft"}; see Pipelines.

To change only part of an earlier run, branch from one of its snapshots instead. See Branches and sweeps for what a branch inherits and what it can change.

training runs get shows the Source line the same way for both forms: model or snapshot, the reference, and the restore mode. The run detail JSON has the same values under source.

Choose validation and row handling

Set config.data.validationDataset to a separate registered dataset. SFT and DPO validate every hyperparams.training.validationFrequencySteps updates. For SFT and DPO, set validateEachEpoch: true to also validate before training and at each epoch; full-state branches skip those extra readings.

Analyze row lengths before choosing maxSeqLength. See Dataset analysis. If a row is too long, increase that limit, shorten the row, or choose a supported config.data.truncation policy:

Policy Use

error

Refuse oversized rows; the default.

drop

Leave oversized rows out.

oldest

Remove old turns, keeping the system prompt and final turn; refuse rows that still do not fit.

oldest_or_drop

Remove old turns and omit rows that still do not fit.

right

Use only with an explicit mask excluding every cut token.

DPO permits error or drop. Prepared token rows permit only error. Images and smoke checks cannot use old-turn trimming; smoke checks also cannot use drop. A long row with an explicit mask cannot be trimmed, even under oldest_or_drop. Shorten it or remove the mask. A dataset with no rows left after dropping is refused.

Leave non-default data and loss settings out of reinforcement plans. For token selection in SFT, see loss settings.

Select a base model

A run can name only a base model that the deployment allows and that someone has selected; see Base models. A run outside every measured envelope gets a warning; see Measured training envelopes.

Lifecycle

Run the following commands to read a run, list the runs that have not finished, and cancel a run:

akka optimize training runs get RUN_ID
akka optimize training runs list --phase active
akka optimize training runs cancel RUN_ID

--phase open is another word for --phase active. runs list also takes --method, --dataset and --base-model; see akka optimize training runs list --help.

Use the phase to decide whether to wait, pause, resume, or inspect a failure. A run can revisit preparation phases on a new attempt.

Phase Action

AWAITING_CAPACITY

Read the queued reason; see Capacity and quotas.

CHECKING_LENGTHS, TOKENIZING, PREPARING, QUEUED, STARTING_JOB

Wait, or read the stage for current progress.

TRAINING

Inspect metrics or request a pause.

PAUSING, CLEANING_UP, RECORDING

Wait for the operation to finish.

PAUSED

Resume when ready.

COMPLETED

Evaluate the registered model.

FAILED, CANCELLED

Read the reason and retained snapshots before retrying.

If Optimize cannot confirm that a job stopped, its devices remain claimed. Read the run’s stage and failure reason. A failed or cancelled run may still hold devices until its job ends.

A completed run registers its final adapter as a model. The training runs get command shows the model. Cancelling a run releases its devices but retains its committed snapshots, which you can still register or use as branch sources.

For training runs pause and resume, see Snapshots. For training runs branch, see Branches and sweeps.