Nexolve

Architecture · Models

Fine-Tuning Pipelines: From Your Data To A Deployed Custom Model

The short answer

Fine-tuning adapts a pre-trained model to your task by training it further on your examples. Most projects use parameter-efficient methods such as LoRA, which train small adapter matrices on top of a frozen open model. A pipeline curates and redacts data, splits off a held-out evaluation set, trains, evaluates against the baseline, and serves the result on an inference server, with production data feeding the next round.

By Maitreya Kulkarni · Updated · 11 min read

01 · The architecture

What Does A Fine-Tuning Pipeline Look Like?

Data from production, experts and stronger models is curated into a training set and a held-out evaluation set. Adapters are trained on a frozen open model, scored against the evaluation set and reviewed by experts, then served privately. Monitoring sends new examples back into the data, closing the loop.

NX-AR-07 · Architecture

A custom model pipeline

  • Outside world
  • Data & integration
  • AI agent
  • Your people
  • System of record
  1. L1

    Data

    (Outside world)
    • Production logs

      . Hands work to: Curation.
    • Expert examples

      Ideal outputs

      . Hands work to: Curation.
    • Synthetic data

      From a stronger model

      . Hands work to: Curation.
  2. L2

    Prepare

    (Data & integration)
    • Curation

      Dedupe, redact PII, format

      . Hands work to: Training set, Evaluation set.
  3. L3

    Sets

    (Data & integration)
    • Training set

      . Hands work to: LoRA fine-tune.
    • Base model

      Llama, Mistral, Qwen

      . Hands work to: LoRA fine-tune.
    • Evaluation set

      Held out

      . Hands work to: Benchmark scores.
  4. L4

    Train

    (AI agent)
    • LoRA fine-tune

      Adapters on a frozen base

      . Hands work to: Benchmark scores, Expert review.
  5. L5

    Evaluate

    (Your people)
    • Benchmark scores

      Versus the baseline

      . Hands work to: Inference server.
    • Expert review

      Domain sign-off

      . Hands work to: Inference server.
  6. L6

    Serve

    (System of record)
    • Inference server

      vLLM, quantised

    • Monitoring

      Quality, drift, cost

      . Hands work to: Production logs.
The evaluation set is held out from training and fixed before training starts, so every candidate model, and the untuned baseline, is judged by the same test.

02 · When

When Is Fine-Tuning Worth It?

When you need a model to behave differently, not to know more. Fine-tuning is good at formats, tone, domain language, classification and making a small model match a large one on a narrow task. For facts that change, retrieval is better; for most problems, good prompting and retrieval come first.

Choosing an approach
PromptingUse it whenA general model can already do itData neededA few examplesRelative costLowest
Retrieval (RAG)Use it whenIt needs your facts and documentsData neededYour documentsRelative costLow
Fine-tuningUse it whenIt needs to behave in a specific wayData neededHundreds to thousands of examplesRelative costMedium
DistillationUse it whenA narrow task at high volumeData neededOutputs from a strong modelRelative costMedium, then low
Pre-trainingUse it whenA new language or modalityData neededBillions of tokensRelative costVery high

03 · LoRA

How Does LoRA Fine-Tuning Work?

Instead of updating all of a model's billions of weights, LoRA freezes them and learns small low-rank matrices alongside selected layers. The adapters are a tiny fraction of the model's size, train on modest GPUs, and can be merged into the model or swapped per task.

01

Frozen base

The original weights don't change, so the model keeps its general ability.

02

Low-rank adapters

Two thin matrices per adapted layer capture the task-specific change.

03

QLoRA

Quantising the frozen base to 4-bit lets large models be tuned on a single GPU.

04

Hot-swappable

One base model can serve many adapters, one per customer or task.

04 · Data

What Does Good Training Data Look Like?

Consistent, correct and representative. A few hundred carefully reviewed examples that match real inputs usually beat thousands of noisy ones, and the examples define the behaviour you get, including their mistakes.

01

Representative

Drawn from the real distribution of inputs, including the awkward ones.

02

Consistent

The same kind of input always gets the same kind of output.

03

Clean

Deduplicated, with personal data redacted and errors fixed by experts.

04

Held out

A separate evaluation set the model never sees in training.

05 · Serving

How Is A Custom Model Evaluated And Served?

Against the same held-out set as the baseline, then behind an inference server built for throughput. Task metrics and expert review decide whether it ships; quantisation, batching and paged attention decide what it costs to run.

01

Evaluation

Task metrics, calibrated model-graded scores and expert review, plus checks that general ability hasn't regressed.

02

Inference servers

Engines such as vLLM use paged attention and continuous batching to serve many requests per GPU.

03

Quantisation

Lower-precision weights cut memory and cost with little loss in quality.

04

The data flywheel

Production failures become new training and evaluation examples for the next version.

The ecosystem

  • PyTorch
  • Hugging Face
  • Llama
  • Mistral
  • NVIDIA
  • Python

Build it with us

We Build This For Real Businesses.

The services where this architecture does the work, designed, built and handed over by Nexolve.

FAQ

Questions About Fine-Tuning And Custom Models.

Still unsure about something? Ask us

Some providers offer fine-tuning of selected hosted models through their APIs. For full control and private deployment, open models such as Llama, Mistral and Qwen are fine-tuned and served on your own infrastructure.

Training itself often takes hours with LoRA. Most of a project's time goes into building good data and the evaluation set.

It can, which is why LoRA keeps the base frozen and evaluation includes checks on general ability, not just the target task.

Contact

Want This Architecture Built For You?

A 20-minute call. We'll listen to the problem, tell you honestly whether we're the right team for it, and outline what the build would look like.

  1. 01Tell us the problemA 20-minute call. Rough is fine.
  2. 02Get a scoped planWhat we'd build and what it takes, within 48 hours.
  3. 03Start on your timelineOnce the scope is signed off, we build in milestones.