--method gisting and --prompt-file. For weight adaptation, use Fine-tune a model.
To work with a coding agent, run
claude -p "Let's use gisting. Follow https://platform.toloka.ai/agents/gisting.md" or give the same runbook URL to another agent.Before you start
You need:- macOS or Linux on ARM64 or x64. The installer uses compatible Bun or a standalone executable; standalone Linux downloads require glibc.
- A Toloka account on a team. Browser sign-in needs no API key. Noninteractive automation can use an API key from the Business Console.
- A funded team balance. Cost estimation is free; starting a Training Run places a hold up to the printed maximum charge.
- Example conversations and a non-blank UTF-8 prompt file no larger than 256 KiB.
Step 1 — Install and sign in
PATH fixes, and noninteractive authentication.
Step 2 — Create or select a project
The Training, datasets, prompt, billing, and output Model belong to one project.--team-id. To reuse an existing project:
Step 3 — Put example conversations in a dataset
Each JSONL row is one chat. At least one turn must beuser, and the final turn must be assistant with the expected output.
Save these rows as support-tickets.jsonl:
ds.… ID.
Step 4 — Write the prompt file
Save this asprompt.txt:
Step 5 — Choose a Base model
qwen3-4b and qwen3-8b. Larger catalog tiers exceed Model Version size limits because gisting publishes full weights. This guide uses qwen3-8b.
You can also start from an SFT LoRA adapter Model Version based on one of the supported tiers. Pass --model-version instead of --base-model. A full-weight Model Version cannot be a source.
Step 6 — Create the gisting Training draft
Created training trg.…. To use an existing ready slice, pass --slice <id> instead of --dataset; see Dataset selections. Copy that Training ID and inspect the draft:
Prompt gisting. Output Model is - until the first Training Run is created, even if that run later blocks or fails before publishing a version.
Optional gisting settings are --gist-tokens, --epochs, --learning-rate, --batch-size, and --max-sequence-length.
--gist-tokens takes 8, 32, or 64, or the prompt fraction 1/4, 1/8, 1/16, or 1/32. The default is 1/8. See Training settings for accepted values and defaults.
Step 7 — Review the cost
estimate.json, require status: "ready", and review the training rows, tokens, maximum GPU seconds, maximumCharge, and fingerprint. With the 10-row example and default split, expect 8 training rows and 1 validation row; 1 test row stays out of learning. Keep this file for the run command. Gisting counts each training token twice when calculating work. If validation blocks the estimate, the command exits with code 1 and lists every issue.
See Training cost for the estimate, hold, settlement, and no-charge cases.
Step 8 — Start the Training Run
Support ticket gisting as the Model Version name. Copy the trn.… Training Run ID. Omitting --estimate-file would calculate a new estimate instead of using the one you reviewed.
queued to running to completed. Progress queued or pending means the job is waiting for GPU capacity.
A Training Run can train longer than estimated. Its charge remains capped at the approved maximum, and it publishes when complete. Do not start a duplicate because the first Training Run is slower than estimated.
If status is blocked with reason funds, add funds and run toloka training resume trn.YOUR_RUN_ID. See Training errors for other blocked states.
Step 9 — Use the trained model
When status iscompleted, inspect the Training and list its Model Versions:
mdv.… Model Version ID and download it:
config.json and either model.safetensors or a complete numbered set of model-*.safetensors weight shards. Tokenizer files, merges.txt, and chat_template.jinja can be included but are not guaranteed. Inspect the download manifest before choosing serving tooling. The CLI verifies each file’s size and SHA-256.
The platform does not host or serve the downloaded Model Version.