LLM Fine-tuning

Adapt the behavior. Measure the difference.

LLM fine-tuning adapts an open-weight model's behavior, such as its output format, tone or handling of a specialized task, by training it on curated examples. ColdAI uses LoRA, QLoRA and full fine-tuning on model families such as Llama and Mistral, with automated evaluation against domain-specific benchmarks1. Every adapted model is judged against a prompting and retrieval baseline on examples it has never seen. This page covers what fine-tuning changes well, how a project runs and what must pass before release.

From architecture to integration to operation
Adapt the weights. Test the behavior.. Separate knowledge from behavior. Illustrative workflow.Adapt the weights. Test the behavior.BASE WEIGHTS + ADAPTER+EvaluationTask fitRobustnessReviewTaskIllustrative structure · not benchmark results

The opportunity

Start with a decision
worth improving.

A team needs consistently structured outputs from specialized documents. A fine-tuning project should demonstrate improvement on unseen examples, rather than just reproducing its training set.

From possibility to a working system

Follow the flow.

Three connected decisions. One considered architecture.

Adapt the weights. Test the behavior.. Separate knowledge from behavior. Illustrative workflow.Adapt the weights. Test the behavior.BASE WEIGHTS + ADAPTER+EvaluationTask fitRobustnessReviewTaskIllustrative structure · not benchmark results

Conceptual flow, not a live system or measured result.

01

Separate knowledge from behavior

Identify the actual failure: missing current information, inconsistent formatting or task reasoning. Establish a prompting and retrieval baseline before deciding which behavior warrants model adaptation.

Adapt the weights. Test the behavior.. Separate knowledge from behavior. Illustrative workflow.Adapt the weights. Test the behavior.BASE WEIGHTS + ADAPTER+EvaluationTask fitRobustnessReviewTaskIllustrative structure · not benchmark results
TaskPrompt baselineRetrievalGap
02

Curate the examples

Build a rights-cleared dataset with consistent inputs and desired outputs. Separate training and evaluation examples, examine edge cases and remove duplicated or sensitive material where required.

Adapt the weights. Test the behavior.. Curate the examples. Illustrative workflow.Adapt the weights. Test the behavior.BASE WEIGHTS + ADAPTER+EvaluationTask fitRobustnessReviewReviewIllustrative structure · not benchmark results
ExamplesReviewTraining setHoldout
03

Compare before release

Evaluate the adapted model against the original using the same task set. Check regressions, cost and latency, and keep a versioned release path that supports rollback if behavior deteriorates.

Adapt the weights. Test the behavior.. Compare before release. Illustrative workflow.Adapt the weights. Test the behavior.BASE WEIGHTS + ADAPTER+EvaluationTask fitRobustnessReviewEvaluationIllustrative structure · not benchmark results
Base modelAdapted modelEvaluationRelease

The work, made concrete

What we can build
with your team.

We agree scope, dependencies and acceptance criteria before delivery. Your project can start with an assessment, a pilot or an integration into an existing system.

01

A suitability and baseline assessment

Clarify the system boundary, the responsible owners and the decisions the architecture needs to support.

02

Curated training and evaluation datasets

Turn the agreed design into reviewable work, evaluated against representative inputs and explicit success criteria.

03

Model comparison and deployment recommendation

Make the next step operable: document responsibilities, known limitations and the path from pilot to ongoing use.

In depth

Go deeper into fine-tuning decisions

Two decision pages: whether fine-tuning is the right fix at all, and which method to use once it is.

  1. 01ComparisonFine-Tuning vs RAG vs Prompting: Which Fixes Your Problem?Diagnose why an LLM application fails before choosing a fix: when better prompts, retrieval-augmented generation or fine-tuning is right, and how to prove it.
  2. 02Deep diveLoRA vs QLoRA vs Full Fine-Tuning: Choosing a MethodHow LoRA, QLoRA and full fine-tuning work, what each needs in memory, which hyperparameters to test, how to avoid regressions and how adapters are served.

Behaviors fine-tuning changes well, and those it does not

BehaviorFit for fine-tuningTraining examples look likeMeasure it with
Output format and schemaStrong fitInputs paired with outputs in the exact target structureSchema validity and field-level accuracy on held-out inputs
Tone, style and house conventionsStrong fit once prompting plateausApproved responses written the way the organization writesBlind reviewer preference against the baseline, plus rubric scores
Domain classification and extractionGood fit when labels are consistentInputs with adjudicated labels or extracted spansPer-class precision and recall on unseen documents
Tool-calling conventionsGood fit for a fixed tool setConversations showing the correct tool and argumentsValid, correct calls in replayed tasks
Current facts and policiesPoor fit: use retrievalNot recommended; facts change faster than models are retrainedAnswer accuracy against the system of record
General reasoning abilityLimited: try a stronger model or task decompositionWorked solutions, with uneven transferAccuracy on held-out problems unlike the training set

The fine-tuning vs RAG comparison explains how to diagnose which of these an application is failing on.

Who hands what to whom in a fine-tuning project

behavior spec, rubricapproved training setfrozen held-out setcandidate checkpointscores vs baselinerelease decisionsampled live outputsregression alert01Product owner02Data reviewers03Trainingpipeline04Evaluationharness05Serving platform
  1. Product owner

    Defines the target behavior and makes the release decision.

  2. Data reviewers

    Domain experts who approve training examples and build the held-out set.

  3. Training pipeline

    Versioned code that turns a dataset version into a candidate model.

  4. Evaluation harness

    Scores every candidate and the baseline on the same frozen tasks.

  5. Serving platform

    Runs the released model and samples live outputs for review.

  1. Product owner to Data reviewersbehavior spec, rubric
  2. Data reviewers to Training pipelineapproved training set
  3. Data reviewers to Evaluation harnessfrozen held-out set
  4. Training pipeline to Evaluation harnesscandidate checkpoint
  5. Evaluation harness to Product ownerscores vs baseline
  6. Product owner to Serving platformrelease decision
  7. Serving platform to Evaluation harnesssampled live outputs
  8. Evaluation harness to Product ownerregression alert
Conceptual sequence of hand-offs in a fine-tuning project. Roles may sit in one team, but the held-out set never passes through the training pipeline.

Writing training examples that teach the behavior

A fine-tuning dataset is a specification written as examples. Each example pairs an input the model will really receive with the output you want, in the chat format and template the base model expects. Mismatched templates are a common, silent cause of poor results, because the model learns a conversation structure it will never see in use.

Quality matters more than volume. Examples should come from real inputs, cover the edge cases where the baseline fails and be approved by people who know what a correct answer looks like. Remove duplicates, strip personal or confidential details the behavior does not need, and draw the held-out set from different documents, customers or periods so evaluation tests generalization rather than recall. Curated training and evaluation datasets are a named deliverable of this practice for that reason1.

Where the goal is to prefer one kind of answer over another rather than imitate a single correct answer, preference data helps: pairs of a preferred and a rejected response to the same input. Direct Preference Optimization learns from such pairs without a separate reward model2 and can run on adapters. Curation in full, from label taxonomy to leakage checks, is covered in building a training dataset.

Release gate for a fine-tuned model

An adapted model should clear every item before it replaces the baseline in production.

0 of 7 checked

Operating risks once a fine-tuned model is live

The base model is superseded or its terms change

Early signalA new base version appears, or its publisher revises the license.

MitigationPin the exact base version, keep the training pipeline reproducible and budget for re-tuning and re-evaluation on a new base.

The behavior drifts from what users now need

Early signalReviewers keep correcting the same kind of output.

MitigationFeed corrected outputs into a new dataset version and re-tune when the evidence calls for it, not on a fixed calendar alone.

Knowledge goes stale inside the weights

Early signalAnswers reflect policies or facts as they stood at training time.

MitigationKeep facts in retrieval and train the model to answer from supplied context instead of memory.

The evaluation set becomes contaminated

Early signalHeld-out scores rise steadily while user feedback does not.

MitigationRotate in fresh held-out examples and check new training data for overlap with the evaluation set.

How fine-tuning connects to the rest of an AI stack

Fine-tuning is rarely a project on its own. A tuned model usually sits behind retrieval, tools and access controls, and it has to be hosted somewhere. On AWS, ColdAI's Bedrock work includes fine-tuned model management alongside prompt versioning and observability4; for workloads that must stay inside your own infrastructure, the enterprise AI practice covers private deployment. When adapting an existing model is not enough, the next step is custom model development on your own data.

Frequently asked questions

Which base models can be fine-tuned in this practice?

The practice maintains fine-tuning pipelines for open-weight families such as Llama and Mistral, as well as custom architectures1. The right base depends on the task, the languages involved, the hardware it must run on and the license: some open-weight models carry use restrictions or naming conditions that matter if you distribute the result. The method comparison covers those checks.

Does fine-tuning an open-weight model keep our data in our environment?

It can. Because the weights are open, training and serving can run on infrastructure you control, so training examples and the adapted model need not pass through a third-party service. Whether that is practical depends on the hardware available and on who will operate the model afterwards, so it should be settled during the suitability assessment rather than after training.

How is the success of a fine-tuning project judged?

Against the baseline it was meant to beat, on examples it never saw. Before training, the team freezes a held-out set and scores the best prompting and retrieval setup on it. The adapted model must improve on that score without unacceptable regressions, cost or latency; if it does not, the recommendation is to keep the baseline.

Can a fine-tuned model be updated as our needs change?

Yes. With adapter-based methods, a new version is a new adapter trained from an updated dataset version, which keeps changes small, reviewable and easy to roll back. Each update should pass the same release gate as the first, including regression and safety checks, because small dataset changes can shift behavior in unexpected places.

Who needs to own a fine-tuned model after launch?

Someone who understands the task as well as the infrastructure. A platform team can run day-to-day serving, but reviewing new training examples, reading evaluation results and deciding when to re-tune need people close to the work the model supports. The deployment recommendation at the end of a project should name those owners.

Sources

  1. LLM Fine-tuning: practice description, stages, deliverables and boundary — ColdAI
  2. Direct Preference Optimization: Your Language Model is Secretly a Reward Model (Rafailov et al.) — arXiv
  3. Fine-tuning Aligned Language Models Compromises Safety, Even When Users Do Not Intend To! (Qi et al.) — arXiv
  4. AWS Bedrock: multi-model pipelines and fine-tuned model management — ColdAI

Connect the architecture

The next connection.

Explore the complementary capabilities that can turn an individual technology into a complete workflow.

Your next move

Bring us the
real problem.

A workflow that takes too long. A system that cannot connect. An idea that needs a technical path. Start there, and we can define what to investigate, build and measure.

  • Representative examples of the desired behavior
  • A data rights and privacy review
  • A base model that supports the approach
See how we approach delivery
Where are you starting?

Opens your email app with an editable brief. Nothing is sent until you send it.

shayan@coldai.org