Skip to content
TensorBundle
TensorBundle
Get in touch
EN TR

LLM fine-tuning

Fine-tuning changes a model's behavior by training it on examples. It can make a model follow a recurring format, use your domain language, classify text or give a particular kind of answer more consistently.

It does not give a model reliable access to facts that change. Current company information usually belongs in retrieval (RAG) or tools. That is why we first check whether training is the right fix at all.

What does fine-tuning change?

Fine-tuning adjusts a base model's parameters with task examples or preference data. The result is a new model version you can measure against the original.

Good targets are narrow and observable, such as valid JSON, the correct label, a required writing convention or better choices between acceptable and unacceptable answers. A goal like "make the model know our business" is too broad to evaluate.

Do you need fine-tuning?

Which fix is right depends on why the model fails today. We start with a small test that compares the simpler options with your current setup, and consider training only once the problem shows up reliably on a stable test set.

  • Prompting

    Clearer instructions and a few examples are enough to get the behavior you need.

  • Retrieval (RAG)

    Answers depend on documents, policies, product data or other information that changes.

  • Tools and code

    The result has to come from a calculation, a database query, an API or a fixed validation rule.

  • Fine-tuning

    The model keeps missing a pattern it could learn, such as a task, a format, terminology or a preferred kind of response.

Fine-tuning methods

We pick the method to fit the target behavior and the data you have. The size of the training run comes second.

  • Supervised fine-tuning

    Trains on input and desired output pairs. Suits classification, extraction and structured output.

  • Preference optimization

    Learns which of several valid responses is better from examples of preferred and rejected answers.

  • LoRA and PEFT

    Trains a small set of extra parameters instead of the whole model. It needs less compute, and the adapter files it produces are small.

  • Continued pretraining

    Adapts language and terminology with large collections of domain text. It needs more data than teaching a precise task.

Preparing the data and training

Data quality matters more than the number of examples.

  1. Define

    Write down the target behavior, failure cases, acceptance rules and a baseline score.

  2. Collect

    Gather examples you are allowed to use, including normal and difficult cases and ones the model should refuse.

  3. Review

    Remove duplicates, conflicting labels, unnecessary personal data and accidental shortcuts.

  4. Split

    Separate training, validation and test data before any experiments start. That way the model is never scored on examples it has already seen.

  5. Train

    Compare a few controlled runs and record the model, data and parameter versions together.

How the tuned model is evaluated

We compare the tuned model with the base model and the best prompt-only version, on realistic inputs and on hard cases that should fail safely. It is released only if the improvement matters and regressions stay within agreed limits.

  • Task quality

    Exact match, label accuracy, rubric scores or another measure tied to the task.

  • Format reliability

    Valid schemas, required fields, length rules and whether the systems reading the output can parse it.

  • Regression checks

    General instruction following, refusals, language quality and cases outside the tuned area.

  • Operations

    Response time, memory, throughput and cost.

What you receive

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

Frequently asked questions

How much data do we need to fine-tune an LLM?

There is no fixed number. A narrow, consistent task can improve with a fairly small set of checked examples, while broader tasks need more. A pilot shows how much extra data would help before you invest in it.

Can we fine-tune an LLM on our company documents?

Only if you are allowed to use them and they show the behavior you want. Information that changes often is usually better looked up from the documents than trained into the model. Keep personal or confidential data to a minimum.

Can a fine-tuned model run on our own servers?

Yes, if the license of the chosen model allows it. The tuned model then runs on servers you manage.

What happens to a fine-tuned model when our requirements change?

Every model version is kept. A change is tested as a new release, and the current version stays in use until the new one is approved.

Technical references

Work with us

Tell us in a few lines what you're working on. We'll get back to you.

Get in touch