Skip to main content
Split 10 support tickets into 8 training rows, 1 validation row, and 1 test row. Then train a model and download its Model Version: the files a completed Training Run produces. Commands print IDs that you paste into later commands. Values that differ on your account appear as … or YOUR_…: IDs, timestamps, token counts, charges, and project counts. This tutorial uses project Training through the CLI.

Before you start

You need:
  • macOS or glibc Linux on ARM64 or x64. Native Windows and musl Linux standalone releases are not available.
  • A Toloka account on a team. You sign in through your browser; no API key is needed.
  • A funded team balance. Calculating the estimate is free, but a Training Run uses the balance. See Manage your team and balance.
  • A browser signed in to Toloka Platform so you can identify your team.
This tutorial starts a paid Training Run. Stop after Step 7 if you only want to validate the data and see the maximum charge.

Step 1 — Install the CLI and sign in

Install the latest CLI release:
The standalone CLI includes its runtime, so this tutorial needs neither Bun nor an SDK project dependency. Rerun the installer for an immediate update; there is no toloka update command. If the installer asks you to add a folder to PATH, do so and rerun toloka --version. Sign in through your browser:
Choose Sign in with your browser, select your provider on the page that opens, finish sign-in, and allow the Toloka CLI when asked the first time. Check the connection:
The Account line names the signed-in account. The Project line is empty until you create the project below. See CLI for noninteractive authentication and installation troubleshooting.

Step 2 — Find your team ID

Open Toloka Platform and sign in. After choosing a team, the browser address contains:
Copy the part between /teams/ and /projects.
If you land in the earlier workspace first, follow the workspace-switching step in Get your first labeled dataset, then return here.

Step 3 — Create the project

A project holds the dataset, Training, and resulting Model. Billing goes to its team. Open a new, empty folder in your terminal, then run:
project create selects the project and writes toloka.json in the current folder. Run the rest of the tutorial from this folder.

Step 4 — Save the training data

A dataset is a collection of items. The CLI calls items rows. Each line below is one chat containing a support ticket and its label. Save these 10 rows as support-tickets.jsonl:
Each final assistant turn contains the expected label: question, complaint, or praise. Keep all 10 rows in one file. The Training command will split this new dataset into 8 training rows, 1 validation row, and 1 test row. Check that the file has 10 lines:

Step 5 — Create and upload the dataset

Create the empty dataset, upload the file once, and list the project datasets:
The upload prints Uploaded 10 rows to dataset support-tickets. Uploads append, so a second run adds the same 10 rows again. Copy the ds.… dataset ID from dataset list. To inspect the project and dataset in the web app, print its address:

Step 6 — Create the Training

A Base model is the catalog model your Training starts from. List the available entries:
This tutorial uses qwen3-4b, the smallest catalog Base model. A Training is an editable draft that records the Base model, frozen dataset slice, split column, and settings. Create one named First training:
The command creates the default 80/10/10 split and freezes a slice named First training. Copy the trg.… Training ID from the create command. Method is Supervised fine-tuning (SFT). Output Model is - because no Training Run has been created yet. SFT is the default, so this command does not pass --method.

Step 7 — Review the cost estimate

A cost estimate is free. It validates the frozen Training inputs and shows the most the Training Run can cost.
Open estimate.json and require status: "ready". Review its training row count, token count, maximum GPU seconds, and maximumCharge. Expect 8 training rows and 1 validation row; the remaining test row is kept out of learning. The fingerprint identifies this exact estimate; keep the file for the next step. If the estimate is blocked, the command exits with code 1 and prints Training cannot run with these inputs: followed by one line per problem. Fix every issue, then calculate again. See Training errors.
The next step starts a paid Training Run and places a hold for the saved estimate’s maximum charge. Do not continue until you accept that amount. If the estimate is rejected or expires, calculate and review a new one before retrying.
When the Training Run settles, it charges for billable GPU use up to the maximum and returns the rest of the hold. See Training cost for minimum charges and no-charge cases.

Step 8 — Start and watch the Training Run

A Training Run is one billed execution of the Training. Start it:
The command uses the saved estimate and names the future Model Version First training. Copy the trn.… Training Run ID. Follow the logs, then check status:
Status normally moves from queued to running to completed. While it is running, the Progress row shows the current phase. Status completed with revision 1 means the Model Version is published. Charged amount is the settled cost and is no greater than the approved maximum charge. If status is blocked with reason funds, the team balance cannot cover the hold. Add funds, then run:
Nothing is charged if the Training Run stops before training begins.

Step 9 — Download the Model Version

The first Training Run creates a Model named First training; completion publishes revision 1 in that Model. List its versions:
Copy the mdv.… ID, then download the files:
The folder contains adapter_model.safetensors, adapter_config.json, and possibly additional validated .json files. Together they form a LoRA adapter that needs the matching Qwen3 4B Base model. The Model Version records the Base model ID, not a pinned upstream repository/revision; see Pinned revisions and lineage before serving it. The download command verifies every file’s size and SHA-256. The platform does not host or serve the model.

Next steps