Skip to content
dhii.ai

Model Training & ML

LLM Fine-Tuning (LoRA & QLoRA)

Smaller, faster, cheaper models that behave exactly the way your task needs — trained on your examples, evaluated against your baseline and deployed where you choose.

Feasibility & baseline
1–2 weeks
First fine-tuned model
3–6 weeks
GPU budget
Estimated in discovery

Why fine-tune at all

Frontier models are remarkable generalists, but generalists are expensive, sometimes slow, and occasionally inconsistent at exactly the narrow thing you need. A fine-tuned 7–14B parameter open model can match or beat a much larger model on a specific task — classifying support tickets into your categories, extracting fields from your document types, writing in your house style — at a fraction of the cost per call, and it can run on hardware you control.

Fine-tuning is not the answer to everything, though. It is a poor way to teach a model facts that change, and it adds an asset you have to maintain. That’s why our first step is always a baseline: we measure how far careful prompting and retrieval get you. If they get you most of the way, we’ll tell you, and save you the training bill.

Data is the project

Training runs are the quick part. The real work is the dataset. We help you assemble examples from historical records, expert annotations and — carefully — synthetic generation, then clean, deduplicate and balance them. We write labelling guidelines so examples are consistent, because a model learns your inconsistencies as faithfully as your rules. A held-out test set, never seen in training, is the honest judge at the end.

Training and evaluation

We use parameter-efficient methods — LoRA and QLoRA — via tools such as Hugging Face PEFT, TRL, Unsloth and Axolotl. They let us try several base models and settings quickly on modest GPUs. Every run is tracked with its data version, configuration and scores.

Evaluation goes beyond a single accuracy number. We compare against the base model and a frontier API on your test set, check that general capabilities and safety behaviour haven’t regressed, and review samples by hand. You get a clear table: quality, latency and estimated cost per thousand requests for each option.

Deployment you control

Finished models are quantised where it helps and served with vLLM, TGI, llama.cpp or Ollama — on your cloud, on-premises or on a dedicated GPU server. You receive the weights, configs and a retraining recipe, so the model can improve as your data grows.

Deliverables

What you get

  • 01

    Fine-tuning feasibility report

    Whether fine-tuning beats prompting or RAG for your task, with evidence from a quick baseline.

  • 02

    Training dataset

    Cleaned, deduplicated and formatted examples, with a held-out test split and a data card.

  • 03

    Trained adapters or model

    LoRA/QLoRA adapters or merged weights for the chosen base model, with training configs.

  • 04

    Evaluation report

    Task metrics and side-by-side comparison against the base model and a frontier API.

  • 05

    Serving setup

    Quantised model served with vLLM, TGI, llama.cpp or Ollama, or exported for your platform.

  • 06

    Retraining recipe

    Scripts and notes so the model can be refreshed as new data arrives.

Process

How a llm fine-tuning (lora & qlora) project runs

  1. Step 1

    Baseline

    Measure how well prompting and RAG already perform — the bar fine-tuning must clear.

  2. Step 2

    Curate data

    Assemble, clean and label examples; generate synthetic data only where it is validated.

  3. Step 3

    Train

    Run LoRA/QLoRA experiments over base models and hyperparameters, tracking every run.

  4. Step 4

    Evaluate

    Score on the held-out set, plus regression checks on general ability and safety.

  5. Step 5

    Deploy

    Quantise, serve and monitor; set up a retraining loop.

Engagement models

Ways to work together

Every engagement starts with a fixed, written quote. See engagement models & pricing or the how much does llm fine-tuning cost?.

FAQ

LLM Fine-Tuning (LoRA & QLoRA): common questions

When should we fine-tune instead of using prompts or RAG?

Fine-tune when you need consistent format or style, a specialised skill such as classification or extraction in your domain, lower latency and cost from a smaller model, or offline/private deployment. Use RAG when the model needs up-to-date facts. Often the best system combines a fine-tuned model with retrieval.

What is the difference between LoRA and QLoRA?

LoRA trains small adapter matrices instead of all model weights, which cuts memory and cost dramatically. QLoRA does the same on a base model loaded in 4-bit precision, so larger models fit on a single GPU. Quality is usually close to full fine-tuning for most business tasks.

How much data do we need?

For narrow tasks, a few hundred to a few thousand high-quality examples are often enough. Quality and consistency matter far more than volume. We assess your data in the feasibility phase.

Who owns the fine-tuned model?

You do — the adapters, merged weights, datasets and training code are delivered to you, subject to the base model's licence terms, which we review with you before training.

Can you fine-tune hosted models like GPT?

Yes, where the provider offers fine-tuning. But we often recommend open-weight models because you keep the weights, control hosting and avoid lock-in.

Related services

Start a project

Have a workflow that should run itself?

Tell us what you want automated or built. You get a written assessment of feasibility, risks and a fixed quote — usually within two business days.