All jobs use supervised fine-tuning with LoRA. The table lists every setting you can change. Defaults are those of the console’s SFT quick preset; LoRA rank defaults to the base model’s recommended rank.
| Setting | Allowed values | Default |
|---|---|---|
| LoRA rank | 1 to 32 | 8 |
| Learning rate | 1e-7 to 1e-2 | 1e-4 |
| Learning-rate schedule | constant, linear, cosine |
cosine |
| Warmup ratio | 0 to 0.2 | 0.03 |
| Weight decay | 0 to 0.2 | 0 |
| Gradient clip norm | 0 to 10 | 1 |
| Batch size | 1 to 512 | 16 |
| Max sequence length | 128 up to the base model’s limit | 2,048 or the model’s limit, if lower |
| Epochs | 1 to 20 | 1 |
| Max steps | 1 to 100,000 | |
| Loss on | assistant or all |
assistant |
Epochs or steps
Set either a number of epochs or a maximum number of steps, not both. Epochs are easier to reason about for small datasets; max steps give you a fixed amount of training regardless of dataset size.
Loss on
With assistant (the default) the model only learns from assistant messages, which is what you want for chat assistants. With all it also learns to predict system and user turns.
Tips
- Start with the defaults. Change one setting at a time and compare runs.
- LoRA rank. Higher ranks can capture more behaviour but cost more and overfit sooner on small datasets. 8 or 16 suits most tasks.
- Sequence length. Rows longer than the maximum sequence length are truncated. Check your longest conversations before lowering it.
- Learning rate. If the loss jumps around or rises, lower the learning rate. If it barely moves, raise it a little.
