Skip to main content
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

“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. 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:

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. 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.

Train on one of several train parts

Split a dataset into two train parts, freeze a slice, and train on one part:
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:
Always calculate a new cost estimate after changing settings.