Skip to main content
List the checkpoints a training run saved — no ls, no guessing the path.

Quick Start

1

List the checkpoints

Point at the run’s output directory and see every saved step, newest first.
2

Get JSON for scripts

Add --json to emit a machine-readable array your shell can parse.

How It Works

The command scans output_dir for checkpoint-<n> directories, sums each one’s file sizes, and sorts by step — newest first. Only directories named checkpoint-<n> count — checkpoint-final is skipped, not read as step 0. Sorting is numeric, so checkpoint-1000 comes before checkpoint-200.

Configuration Options

An empty or missing directory exits with code 1 and prints a remediation suggesting save_steps in config or --model-dir pointing at the run’s output_dir.

JSON Output

Each entry has three fields — the step number, the checkpoint path, and its size in bytes.

Common Patterns

Auto-pick the newest step for export

Pipe --json through jq to grab the newest checkpoint path, then hand it to export.
The list is sorted newest-first, so .[0] is always the latest step.

Confirm a run actually saved

Run it right after an interrupted job to see what survived before deciding whether to resume.

Best Practices

The scan matches checkpoint-<n> exactly. A directory called checkpoint-final is ignored — it is never listed as step 0. Rename or move stray directories if you expect them in the listing.
Checkpoints live under the run’s output_dir (default outputs), not final_model_dir (default lora_model). Point -d at the same output_dir the run used.
Each checkpoint is the full adapter size. Set save_total_limit in config.yaml to keep only the newest few — the listing then stays short and disk stays bounded.
--json gives a stable {step, path, bytes} schema. Parse it with jq to auto-select a checkpoint instead of hardcoding a step number that changes every run.

Checkpointing

Config keys — save_strategy, save_steps, save_total_limit, resume_from_checkpoint.

Export a trained model

Publish a chosen checkpoint to HF, GGUF, or Ollama.

Infer CLI

Prompt a model you just trained and watch it stream.

Train CLI

Full flag reference for every subcommand.