Skip to content

Quickstart

Submit your first hosted SFT job, wait for it to finish, and inspect the outputs.

Run a supervised fine-tuning job from the CLI in a few minutes. This assumes you already have:

  • a workspace you can submit jobs into (authentication)
  • a published capability that defines the agent you want to adapt
  • a published dataset of prompt/response demonstrations
  • a base model identifier the training backend can reach
Terminal window
dn train sft \
--model meta-llama/Llama-3.1-8B-Instruct \
--capability [email protected] \
--dataset [email protected] \
--steps 100 \
--wait

With --wait, the command blocks until the job reaches a terminal state and exits non-zero on anything other than completed. Without it, sft prints the job ID and returns immediately — you poll or open the App to track progress.

Three places show progress:

Terminal window
dn train get <job-id> # resolved refs + current status + metrics
dn train logs <job-id> # structured worker log entries

The App’s Training view renders the same job with live loss, accuracy, reward, and learning-rate charts, plus the logs panel and a one-click cancel/retry.

When the job completes:

Terminal window
dn train artifacts <job-id> --json

You’ll get a JSON document with the resolved capability, the checkpoint handles the backend produced, the training dataset reference, and the eval dataset if you passed one. See outputs for the full artifact shape and the manual path to publishing a checkpoint into the Models registry.

  • --model names the base model being adapted.
  • --capability NAME@VERSION pins the policy scaffold — system prompt, instructions, and agent config come from the capability at submission time.
  • --dataset NAME@VERSION is the supervised corpus. Rows are normalized into chat-formatted conversations before training.
  • --steps caps the optimizer step count. Pair with --learning-rate, --batch-size, --gradient-accumulation-steps, and --lora-rank when you want to tune.
  • --wait turns the submit into a synchronous shell workflow.

The App’s + New job button on the Training view exposes the same four-step CLI flow as a guided modal, so you can pick up the exact command from there:

Create a training job modal showing the four CLI steps