Resources/Model training/The big picture

Concept

The training pipeline

The stages a training project moves through in Scalata, what each one produces, and why every stage is kept as its own inspectable record.

Chapter 13 min read4 references

What the pipeline is

Fine-tuning is rarely a single action. A useful result needs the right examples, prepared in the right format, trained with sensible settings, and then checked against the model you started from. Scalata breaks this into stages, each of which takes the output of the previous one and produces something you can open and inspect.

  1. 01Sessionspick chats
  2. 02Datasetcollect examples
  3. 03Providerwhere it trains
  4. 04Data prepclean + convert
  5. 05Trainrun the job
  6. 06Evaluateprove it improved
  7. 07Test chattry it yourself
  8. 08Useput it to work
The training pipeline. Each stage hands a frozen, inspectable artifact to the next, so any run can be traced back to the exact chats it learned from.

The stages, one by one

StageWhat goes inWhat comes out
SessionsYour chats in Scalata, or chats imported from other appsThe conversations to learn from
DatasetSelected chats, synthetic or imported examples, optional documents, and the replies chosen as targetsA frozen snapshot of examples
ProviderWhere the model will be trained and servedA platform and the models it offers
Data prepA dataset and cleaning settingsCleaned, redacted, split JSONL files in the provider's format
TrainPrepared files, a base model, a method and settingsA trained model, its loss curves and its cost
EvaluateThe trained model, its starting model and held-out questionsSide-by-side answers, judge scores and a win rate
Test chatA trained modelA temporary deployment you can talk to
UseA model that passed evaluationThe model at work in Scalata (coming soon)

Why every stage is a separate record

Each stage writes a record that later work does not change. A dataset is a copy of the chats, not a link to them. A data prep keeps the exact files it produced. A training run keeps the prep it used, its settings and the price quoted when it started. That makes results reproducible — months later you can still say which chats, which cleaning settings and which hyperparameters produced a given model — and makes comparisons fair, because two runs trained from the same prep really did see the same data.

It also lets you branch. One dataset can be prepared twice with different settings, one prep can train several models, and one trained model can be the starting point for another run.

Where problems usually come from

Disappointing results usually trace back to the early stages rather than to the training settings:

  • Wrong or inconsistent targets in the dataset — the model learns them faithfully.
  • Nothing held out in data prep, so the evaluation measures memory instead of skill.
  • A mismatch between training and use — a different system prompt, or real questions that look nothing like the training chats.
  • Several changes at once between runs, so you cannot tell which one helped.
A typical first project
  1. Sessions → Dataset: 400 support chats are reviewed; 320 contain replies good enough to be targets.
  2. Provider → Data prep: cleaning removes error replies and duplicates, personal data is redacted, 10% of conversations are kept aside as a test set for evaluation, and 10% of the rest are held out for validation.
  3. Train: supervised fine-tuning with Auto settings, as a baseline.
  4. Evaluate: the trained model and the base model answer the held-out test questions. A judge prefers the trained model on most of them, and its reasons point to a weakness with billing questions.
  5. Next round: more billing chats go into a new dataset, and the cycle repeats. Only one thing changed, so the next evaluation shows whether it helped.

Common mistakes

  • Tuning training settings before checking the dataset.
  • Changing the dataset, the prep settings and the hyperparameters in the same run.
  • Skipping evaluation because the training loss went down.
  • Deleting old runs instead of archiving them, which loses the record of what was tried and why it lost.

References and further reading

External sources open in a new tab.

  1. 01Datasheets for DatasetsGebru et al., 2018 · arXiv · arxiv.orgWhy every dataset should come with a record of where it came from and how it was made.
  2. 02Model Cards for Model ReportingMitchell et al., 2018 · arXiv · arxiv.orgThe same idea for trained models: document what they were trained and evaluated on.
  3. 03Supervised fine-tuningOpenAI API docs · developers.openai.comA hosted provider's version of the same pipeline: prepare data, train, evaluate.
  4. 04Customize your model to improve its performance for your use caseAmazon Bedrock User Guide · docs.aws.amazon.comHow another provider structures customisation jobs.

Turn weeks of expert work into minutes

See how Scalata fits your team, your data, and your controls.