Command-line interface

Command-line interface#

The aim_fine_tune command-line interface (CLI) prepares and runs fine-tuning jobs from local model and dataset inputs. It provides a common workflow over the engine-specific fine-tuning engines.

Commands#

The CLI has three commands:

  • list-recipes lists the packaged recipes and can filter to recipes compatible with the available accelerators.

  • train selects a recipe, validates the request, and creates the engine launch workspace.

Use the command help to see the available inputs:

uv run aim_fine_tune --help
uv run aim_fine_tune train --help

Training workflow#

The train command requires a model directory, a training dataset file, an output directory, and an AIM model identifier. It uses those inputs together with the available accelerators to select a compatible recipe.

Dry-run is the default mode. It renders the launch workspace, including the normalized training request, launch specification, and engine configuration, without starting training. Pass --execute only when the CLI is running in the target execution environment and its required paths are mounted.

uv run aim_fine_tune train \
  --model-path inputs/model \
  --train-data-path inputs/data.jsonl \
  --output-path outputs \
  --aim-model-id vendor/model \
  --execute

Configuration sources#

Inputs can be supplied as command-line flags or environment variables. For example, --model-path corresponds to AIMFT_MODEL_PATH, and --recipe-id corresponds to AIMFT_RECIPE_ID. Command-line flags take precedence over environment variables, while recipe defaults provide the remaining training settings.

Use --recipe-id to select a specific recipe. Use --recipes-root or AIMFT_RECIPES_ROOT when the recipes are stored outside the default location. Engine-specific configuration belongs either in a recipe or in the AIMFT_ENGINE_ARGS JSON object. See engines for details on the engine boundary.