Skip to main content
Go from an empty directory to a deployed model. Train a LoRA adapter on managed infrastructure, serve it, and chat with it from the CLI.

Prerequisites

  • Python 3.11 or 3.12, with uv, pipx, or pip to install the CLI.
  • A Freesolo API key, created in your dashboard at freesolo.co. Commands that contact Freesolo, including --dry-run and an SFT --cost, authenticate with it. A GRPO or OPD --cost quotes offline from the catalog. Neither submits a training run.

Step 1: Install the CLI

Step 2: Log in

Flash verifies the key against Freesolo and stores it locally, so you only do this once. You can also set FREESOLO_API_KEY instead of passing --api-key.

Step 3: Create a project

Every run and environment belongs to a project. Create one and keep its UUID; the next steps need it.
This prints the project UUID. flash projects list shows them all later.

Step 4: Scaffold an environment

Already have a published environment id, yours or one shared with you? Set it as [environment] id in your config and skip ahead to step 6.
This writes a ready-to-edit starter into the current directory:
Rerunning is safe: flash env setup leaves any file that already exists untouched.
Skip the hand-editing. Point your coding agent (Claude Code, Cursor, etc.) at the environment guide and have it find and port your existing reward and dataset into environment.py. A prompt to start from:

Step 5: Publish your environment

An environment is the task and reward your model trains on. Publish the scaffolded one to the managed Environments Hub to get an id:
This prints an environment id of the form your-org/starter.

Step 6: Configure and validate your run

flash env setup already wrote project into each generated config. Open configs/sft.toml and set the one thing that’s yours, the environment id from the previous step:
configs/sft.toml
Validate it first. --dry-run applies the real submit-time checks, including unrecognized [train] keys, without allocating a training GPU. On an SFT config with no cached workload profile it starts a short billed profile run first; see flash train:
That first --dry-run starts the workload profile and prints its run id. Wait for it before going on, or the next two commands only join the profile instead of quoting and training:
Once it reports done, see what the run will cost before committing. --cost prints the pre-flight USD cost and never submits a training run:

Step 7: Train

This is the first step that spends money on training, though on an SFT config the profile run behind --dry-run and --cost above was already billed on its own. At submit time Flash checks your org balance against the pre-flight estimate, then bills successful runs at the quoted Flash cost. Setup and cold start time are reported separately for observability and are not billed.
Flash then follows the logs live. Press Ctrl-C to detach. The run keeps going on the server, and you can follow it again any time:
The run reaches done when training finishes. Start small: finish one short run end to end before you scale up. When you do, raise train.epochs or train.max_examples and change little else.

Step 8: Deploy

Serve the trained adapter on Freesolo’s managed serving service. Serving is billed per token for requests you send:
Every real deploy resolves an immutable adapter revision and runs a bounded serving smoke before the stable run-id alias is activated. Without --wait the command returns while the revision is still queued, so the next step would call a model that is not servable yet. You can also deploy and tear down from the dashboard.

Step 9: Chat

That completes the loop. When you’re done, tear the endpoint down:

Essential commands

The commands you used above, plus the ones you’ll reach for next. Run flash <command> --help for the full set of flags, or see the CLI reference.

Next steps

How Flash works

The loop behind a run, and the concepts each command refers to.

Training in depth

SFT, GRPO, and OPD, config options, monitoring, and cost.

Build an environment

Replace the starter task with your own data and reward.

Deploy & chat

Serving billing and the OpenAI-compatible API.