Skip to main content
The tg training commands list and inspect the model resources, training sessions, and checkpoints of post-training. They’re read-only: to create or stop a resource or session, use the Python SDK or the console. The tg training prepare-for-fp4-inference commands, aliased tg training fp4, run FP4 preparation jobs. Each job merges a low-rank adapter (LoRA) from a post-training session into its base model and quantizes the result to FP4 for dedicated model inference.
Commands run against the project your API key belongs to. Resources, sessions, checkpoints, adapters, and jobs in other projects aren’t visible.

List model resources

List the model resources in your project, newest first.
Shell

Parameters

List training sessions

List the training sessions in your project, newest first.
Shell

Parameters

List checkpoints

List the training and inference checkpoints in your project, newest first.
Shell
For an inference checkpoint, the Model column shows the model registry ID (ml_...) of its registered adapter or merged model, which is the ID you deploy or prepare for FP4 inference.

Parameters

Get a resource, session, or checkpoint

Print the details of one model resource, training session, or checkpoint. The CLI works out which kind the ID belongs to.
Shell
A session’s details include its status, base model, current step, model resource, and checkpoint counts. A checkpoint’s details include its type, session, step, and LoRA rank, but not its model registry IDs, so use ls-checkpoints to find those.

Parameters

Create an FP4 job

Start an FP4 preparation job for an adapter.
Shell
Before it submits the job, the CLI estimates it, prints the price and expected running time, and asks for confirmation. If the price exceeds your available credit, the confirmation includes a warning, because the API rejects jobs your credit can’t cover. On success, the CLI prints the job ID (shp-quant-...).

Parameters

Estimate an FP4 job

Estimate a job’s price and running time without creating it.
Shell
The running time excludes the wait for GPU capacity. If the price exceeds your available credit, the CLI prints a warning with your credit limit. A successful estimate also confirms that the adapter is eligible.

Parameters

Get an FP4 job

Print a job’s details: its status, the adapter and base model it resolved, and the prepared model’s IDs once it completes.
Shell
With --watch, the CLI checks the job every --poll-interval seconds and prints each status change and new event. It exits when the job reaches completed, cancelled, error, or user_error. On completed, it prints the prepared model’s ID and revision ID. --watch retries connection failures, 5xx errors, and rate limits with backoff. After five minutes of consecutive failures, it stops and prints the command to resume. Stopping the CLI doesn’t stop the job. With or without --watch, get exits with a non-zero code when the job’s status is error or user_error. get is an alias of retrieve.

Parameters

List FP4 jobs

List the FP4 preparation jobs in your project, newest first, 20 per page.
Shell
The table shows each job’s ID, adapter, status, prepared model, and creation time. When more jobs remain, the CLI prints the command for the next page. ls is an alias of list.

Parameters

List FP4 job events

List a job’s events, such as the job’s start, the end of each phase, and any errors.
Shell
A failed job ends with a SHAPING_USER_ERROR or SHAPING_ERROR event. A SHAPING_USER_ERROR event’s message says how to fix the input.

Parameters

Cancel an FP4 job

Cancel a job before it completes.
Shell
The CLI asks for confirmation first. The job moves to cancel_requested right away and to cancelled once the run stops. A job that’s already in cancel_requested or a terminal status can’t be cancelled.

Parameters

Global options

Every command also accepts the global parameters, including --json for machine-readable output. The CLI turns --json on by default when it detects an AI agent. In --json or --non-interactive mode, and whenever the CLI doesn’t run in an interactive terminal (for example, in CI or with its output redirected), create and cancel don’t ask for confirmation. Check the price with estimate before you script create or let an agent run it.