> ## Documentation Index
> Fetch the complete documentation index at: https://docs.freesolo.co/llms.txt
> Use this file to discover all available pages before exploring further.

# Flash

> Train, deploy, and chat with custom LoRA models on managed infrastructure, from one CLI.

Flash is Freesolo's managed post-training service. Write a short config, run one
command, and Flash fine-tunes a model on managed infrastructure, then serves the
result behind an OpenAI-compatible endpoint. Nothing to host. Every command that
talks to the platform authenticates with your Freesolo API key.

<Card title="Get started in minutes" icon="rocket" href="/quickstart" horizontal>
  Install the CLI and go from an empty directory to a deployed model in a few
  minutes.
</Card>

## What you can do

### Fine-tune a model on your own task

Write a TOML config, run one command, and Flash trains a LoRA adapter (a
small set of add-on weights) on top of a [supported base model](/reference/models). Pick the model and task; Flash handles the training infrastructure. See
[Training](/guides/training).

```bash theme={null}
flash train config.toml
```

### Teach a format from examples with SFT

Supervised fine-tuning learns from the prompt/answer pairs in your [dataset](/guides/datasets).
Use it when you already have examples of the output you want.

```toml theme={null}
algorithm = "sft"
```

### Reward the behavior you want with GRPO

Reinforcement learning scores the model's own completions with your
[environment's](/guides/environments/overview) reward, then updates toward
higher-scoring completions (see [How Flash works](/how-flash-works)). Use it when
you can score an output but can't hand-write the perfect one.

```toml theme={null}
algorithm = "grpo"
```

### Distill a stronger model with OPD

On-policy distillation has a managed teacher (GLM 5.2 by default) grade your
model's own completions token by token, then pulls your model toward it. Use it when a bigger
model already does the task and you want a small one to match it — no answers to
write and no reward to design.

```toml theme={null}
algorithm = "opd"
```

### Serve it behind an OpenAI-compatible API

`flash deploy` registers the adapter with managed serving, then
`flash chat` or any OpenAI client can call it with your Freesolo key. See
[Deploy & chat](/guides/deploy-and-chat).

```bash theme={null}
flash deploy <run-id>
```

### See the cost before you spend

`--cost` prints the pre-flight estimate without submitting. You pay for the
quoted training run cost and for the tokens you serve. Cancelled runs are
repriced to the training steps they actually reached.

```bash theme={null}
flash train config.toml --cost
```

## Where Flash fits

| I want to...                                       | Start here                                                                                                       |
| -------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- |
| Fine-tune from examples I already have             | [Training: SFT](/guides/training#choose-a-training-algorithm)                                                    |
| Improve outputs I can score but can't hand-write   | [Training: GRPO](/guides/training#choose-a-training-algorithm) and [Environments](/guides/environments/overview) |
| Match a stronger model without answers or a reward | [Training: OPD](/guides/training#choose-a-training-algorithm)                                                    |
| Define the task and reward my model learns on      | [Environments](/guides/environments/overview)                                                                    |
| Call my model from my existing OpenAI code         | [Deploy & chat](/guides/deploy-and-chat#use-it-from-your-own-code)                                               |
| Understand how a run works                         | [How Flash works](/how-flash-works)                                                                              |

## Next steps

<CardGroup cols={2}>
  <Card title="Quickstart" icon="rocket" href="/quickstart">
    Install the CLI, log in, and ship your first run in a few minutes.
  </Card>

  <Card title="How Flash works" icon="diagram-project" href="/how-flash-works">
    The loop behind a run: base models, environments, algorithms, serving.
  </Card>

  <Card title="Training" icon="dumbbell" href="/guides/training">
    Write a config, submit a run, and follow it to completion.
  </Card>

  <Card title="Deploy & chat" icon="comments" href="/guides/deploy-and-chat">
    Serve an adapter, then chat with it over an OpenAI-compatible API.
  </Card>
</CardGroup>
