← All services

LLM Fine-Tuning

Adapt a language model to a defined task, output format, terminology, or response preference using tested training data.

Fine-tuning changes a model's behaviour by training it on examples. It can make a model follow a recurring format, handle domain language, classify text, or produce a specific kind of response more consistently.

It does not give a model reliable access to changing facts. Current company information usually belongs in retrieval or tools. The first step is therefore deciding whether training is the right intervention at all.

Discuss a fine-tuning project

What fine-tuning changes

A base model already contains broad language capabilities. Fine-tuning adjusts its parameters using task examples or preference data. The result is a new model version whose behaviour can be measured against the original.

The useful target is narrow and observable: valid JSON, the correct label, a required writing convention, or better choices between acceptable and unacceptable answers. A goal such as making a model know the business is too broad to evaluate.

Do you need fine-tuning?

The cause of the current failure determines the solution. Training is considered after the behaviour has been reproduced with a stable test set.

01

Prompting

Use when clearer instructions and a few examples are enough to obtain the required behaviour.

02

Retrieval

Use when answers depend on documents, policies, product data, or other information that changes.

03

Tools and code

Use when the result must come from a calculation, database query, API, or fixed validation rule.

04

Fine-tuning

Use when the model repeatedly misses a learnable task pattern, format, terminology, or response preference.

Fine-tuning methods

The method follows the target behaviour and available data. A larger training run is not automatically a better one.

Supervised fine-tuning

Trains on input and desired-output pairs. Suitable for classification, extraction, structured output, and consistent task responses.

Preference optimization

Uses preferred and rejected responses to teach relative choices when several answers may be valid but some are clearly better.

LoRA and PEFT

Updates a small set of additional parameters instead of the full model. This can reduce compute and simplify storage of task-specific adapters.

Continued pretraining

Uses larger domain corpora to adapt language patterns and terminology. It requires more data and is separate from teaching a precise instruction-following task.

Preparing the training data

Data quality has more influence than the number of examples alone. Training, validation, and final test cases remain separate so the result is not measured on examples it has seen.

  1. 01

    Define

    Write the target behaviour, failure cases, acceptance rules, and baseline score.

  2. 02

    Collect

    Gather licensed, consented examples that represent normal, difficult, and refusal cases.

  3. 03

    Review

    Remove duplicates, conflicting labels, personal data that is not needed, and accidental shortcuts.

  4. 04

    Split

    Separate training, validation, and test data before model experiments begin.

  5. 05

    Train

    Compare a small number of controlled runs and keep model, data, and parameter versions together.

  6. 06

    Evaluate

    Measure the target task, general regressions, latency, cost, and safety behaviour before release.

How the tuned model is evaluated

The tuned model is compared with the base model and the strongest prompt-only baseline. Evaluation includes representative production inputs and difficult cases that should fail safely.

A release is accepted only when the improvement matters on the intended task and regressions stay within agreed limits. The previous model version remains available for rollback.

Task quality
Exact match, label accuracy, rubric scores, or another measure tied to the task.
Format reliability
Valid schemas, required fields, length rules, and downstream parser success.
Regression checks
General instruction following, refusals, language quality, and cases outside the tuned domain.
Operations
Response time, memory, throughput, model cost, monitoring, and rollback behaviour.

What you receive

  • Data specification and reviewed datasets
  • Baseline and evaluation suite
  • Training code or managed fine-tuning configuration
  • Model or adapter artifacts with version records
  • Inference and deployment configuration
  • Evaluation report, release criteria, and operating notes

LLM fine-tuning questions

How do we know whether fine-tuning is necessary?

A small evaluation first compares prompting, retrieval, tools, and the current model. Fine-tuning is justified when the remaining problem is a repeated behaviour the model can learn from examples.

How much training data is needed?

There is no useful fixed number. A narrow, consistent task may improve with a modest reviewed set; broad or inconsistent behaviour needs more coverage. A pilot establishes the learning curve before a larger data effort.

Can company documents be used as training data?

Only when their use is permitted and the content teaches the intended behaviour. Documents containing changing facts are usually better connected through retrieval. Personal or confidential data should be minimized and handled under defined retention rules.

Can the model run on our infrastructure?

Yes, when the selected base model and licence permit it. Training may run in a separate controlled environment, while the resulting model or adapter is deployed to company-managed infrastructure.

What happens when requirements change?

Datasets, model artifacts, evaluation results, and deployment settings are versioned. A change is evaluated as a new release, and the prior version remains available until the replacement is accepted.

Technical references