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

# Training settings

> Reference SFT and gisting settings, accepted values, defaults, cost effects, and CLI flags.

Settings belong to a Training draft. A Training Run copies them when it starts, so editing the draft never changes an existing Training Run.

The CLI accepts the same setting flags on `toloka training create` and `toloka training update`.

## Settings table

| Setting | CLI flag | API field | SFT | Gisting | Default | Cost effect |
| - | - | - | - | - | - | - |
| LoRA rank | `--lora-rank` | `loraRank` | `8`, `16`, `32` | Not accepted | `16` | No direct effect |
| Gist tokens | `--gist-tokens` | `gistTokens` | Not accepted | `8`, `32`, `64`, `1/4`, `1/8`, `1/16`, `1/32` | `1/8` | No direct effect |
| Epochs | `--epochs` | `epochs` | Integer `1`–`5` | Integer `1`–`5` | `3` | Grows linearly with epochs |
| Learning rate | `--learning-rate` | `learningRate` | `0.00001`–`0.001` | `0.001`–`0.3` | SFT `0.00015`; gisting `0.03` | No direct effect |
| Batch size | `--batch-size` | `batchSize` | `8`, `16`, `32`, `64` | `8`, `16`, `32`, `64` | `8` | No direct effect |
| Maximum sequence length | `--max-sequence-length` | `maxSequenceLength` | Integer `64`–`16,384` | Integer `64`–`16,384` | SFT `12,288`; gisting `3,072` | No direct effect |

“Cost effect” describes the estimate formula. A setting can still change training behavior, memory use, or whether the data passes validation.

## LoRA rank

LoRA rank controls the adapter's capacity. The platform supports `8`, `16`, and `32`, with `16` as the default.

* Rank `8` is the smallest adapter.
* Rank `16` is the balanced default.
* Rank `32` has the most adapter capacity and needs enough data to avoid overfitting.

This setting applies only to SFT. Passing `--lora-rank` to gisting is rejected.

## Gist tokens

Gist tokens are the learned soft tokens that replace the original prompt. Choose either:

* An absolute count: `8`, `32`, or `64`.
* A fraction of the prompt: `1/4`, `1/8`, `1/16`, or `1/32`.

The default is `1/8`. Fewer tokens compress more aggressively; more tokens preserve more prompt capacity. A fraction keeps the compression ratio tied to prompt length.

This setting applies only to gisting. Passing `--gist-tokens` to SFT is rejected.

## Epochs

Epochs are complete passes over the training selection. Both methods accept 1 through 5 and default to 3.

Epochs directly increase estimated work. Doubling epochs doubles the training-token part of the maximum-charge calculation.

## Learning rate

SFT accepts `0.00001` through `0.001` and defaults to `0.00015`.

Gisting accepts `0.001` through `0.3` and defaults to `0.03`. Gisting trains soft tokens rather than the model weights, so its default is much higher than the SFT default.

Learning rate does not directly change the maximum charge.

## Batch size

Batch size is the number of sequences per optimizer step across all GPUs. Both methods accept `8`, `16`, `32`, or `64` and default to `8`.

The selected train parts must contain at least `batchSize` valid rows. If the slice supplies no validation rows, the platform first holds out 10% of the train rows, rounded up. The remaining rows must fill one batch or the cost estimate is blocked.

## Maximum sequence length

Maximum sequence length is the token budget for one complete training example, including prompt and target. It can be 64 through 16,384 tokens.

* SFT default: 12,288.
* Gisting default: 3,072.

The cost estimate is blocked when the longest selected example exceeds this value. The platform does not silently truncate it.

## Dataset selections

A Training reads one ready, frozen dataset slice. Pass exactly one of `--dataset` or `--slice` when creating it.

| CLI flag | API field | Purpose |
| - | - | - |
| `--dataset <name-or-id>` | — | Use the dataset's split column and freeze a new slice named after the Training. A dataset with no split column gets the default `split` column: 80% `train`, 10% `validate`, 10% `test`. |
| `--slice <id>` | `sliceId` | Use a ready slice that freezes a split column. Required in an API Training configuration. |
| `--split-column <name-or-id>` | `splitFieldId` | Choose the split column when more than one is available. The API takes its field ID. With `--dataset`, a name the dataset does not have creates a new split column with the default shares. |
| `--parts <names>` | `trainParts` | Comma-separated names of parts to learn from; the API takes an array. Defaults to every part with the `train` role. |

Training uses all parts with the `validate` role for validation. Parts selected with `--parts` must have the `train` role. Rows marked as test in any split column are excluded from learning.

If the slice supplies no validation rows, the platform holds out 10% of the selected train rows for validation. With a fresh 10-row dataset and the default split, Training uses 8 train rows and 1 validation row and keeps 1 test row out of learning.

Later uploads and changes to frozen fields do not change the slice. To include them, run `toloka training update <training> --dataset <dataset>` and calculate a new cost estimate. Existing split assignments are kept. For an automatic split, unassigned rows receive parts using its saved proportions. If parts come from values you supplied, rows without a part stay unselected. Use `--slice` to switch to another ready slice.

## Slices and split columns

`--dataset` builds the split column and the slice for you. To choose the shares, balance labels, or train on part of a dataset, build them with the commands below and pass the slice with `--slice`.

A split column gives each row one part. A part has the role `train`, `validate`, or `test`; both `validate` and `test`; or no role. A `train` part has no other role, and a column holds at most 10 parts. The default column is named `split`:

| Part | Role | Share |
| - | - | - |
| `train` | `train` | 80% |
| `validate` | `validate` | 10% |
| `test` | `test` | 10% |

### Fill a split column

`toloka dataset split <dataset>` gives a part to every row that has none, sampled by share. Rows that already have a part keep it, so test rows stay test as the dataset grows. The command waits until the rows are placed, then prints the column's parts and row counts.

| Flag | Default | Effect |
| - | - | - |
| `--column <name>` | `split` | The column to fill. A new name creates a split column. An existing split column keeps its parts. |
| `--ratios <train/validate/test>` | `80/10/10` for a new column, then the column's own shares | Whole percentages that add up to 100. A part with `0` gets no rows. |
| `--parts <parts>` | — | Parts as `name[=roles][:percent]`, for example `train:70,dev=validate:10,holdout=test:20`. Without `=roles`, the name is the role. Pass `--ratios` or `--parts`, not both. |
| `--validate-on-test` | Off | The test part also serves as the validation set. Needs a validate ratio of `0`, for example `--ratios 80/0/20`. |
| `--balance-by <field>` | — | Splits the rows of each value of a label field by the shares. The field can have at most 1,000 distinct values. |
| `--seed <n>` | Generated, then kept by the column | Fixes the row order. A whole number from `0` through `2147483647`. |
| `--filter <field=value>` or `--slice <slice-id>` | Every row | Places only the rows whose field equals the value, or only the rows of a slice. Repeat `--filter` for more fields. |
| `--no-wait`, `--timeout <ms>`, `--json` | Waits up to 60 seconds | Return once placing starts, wait longer, or print JSON. |

A dataset field whose values name parts becomes a split column when you pass it with `--column`: each row keeps the part its value names. The values `train`, `validation`, `validate`, `val`, `dev`, and `test`, in any letter case, get the matching role; name other values with `--parts`. Rows without a value get a part only when you also pass shares.

`--filter`, `--balance-by`, and an existing `--column` must name dataset fields. A field that exists only in the uploaded rows needs `toloka dataset fields add <dataset> <field>` first.

`toloka dataset columns <dataset>` lists the dataset's columns. For a split column it shows the status (`filling`, `ready`, or `failed`) and each part with its share and roles.

### Freeze a slice

A slice freezes a dataset's rows and the values of its columns at the moment you take it. A slice always freezes the dataset's split columns, so take it after the split column is `ready`.

| Command | Effect |
| - | - |
| `toloka dataset slice create <dataset>` | Freezes every row, or only the rows that match `--filter <field=value>` (repeatable). `--name` names the slice (default `Slice 1`, `Slice 2`, and so on). `--from <slice-id>` takes an earlier slice again with its filter, picking up rows added or changed since. `--freeze <columns>` limits the frozen columns (default every column). Waits until the slice is ready unless you pass `--no-wait`. |
| `toloka dataset slice list <dataset>` | Lists the dataset's slices, newest first, with each slice's ID (`dsl.…`), name, status, and row count. |
| `toloka dataset slice show <slice-id>` | Shows a slice's status, filter, frozen columns, and row count. |

### Train on one of several train parts

Split a dataset into two train parts, freeze a slice, and train on one part:

```sh theme={null}
toloka dataset split support-tickets --column split_v2 \
  --parts first=train:40,second=train:40,validate:10,test:10
toloka dataset slice create support-tickets --name "Support tickets v2"
toloka dataset slice list support-tickets
toloka training create "Support ticket SFT" \
  --base-model qwen3-8b \
  --slice dsl.YOUR_SLICE_ID \
  --split-column split_v2 \
  --parts first
```

If the dataset already has a `split` column, rows it marks as test stay out of learning here too.

## Model source and prompt

Pass exactly one source:

* `--base-model <id>` for a catalog Base model.
* `--model-version <id>` for a LoRA adapter Model Version in the same project.

Gisting also requires `--prompt-file <path>`. The prompt must be non-blank UTF-8 text and no larger than 256 KiB.

## Example

Create an SFT Training with non-default settings:

```sh theme={null}
toloka training create "Support ticket SFT" \
  --base-model qwen3-8b \
  --dataset ds.YOUR_DATASET_ID \
  --lora-rank 32 \
  --epochs 4 \
  --learning-rate 0.0002 \
  --batch-size 16 \
  --max-sequence-length 4096
```

Always calculate a new [cost estimate](https://docs.platform.toloka.ai/docs/train/concepts/cost.md) after changing settings.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.