Home / Insights / Generative AI and LLMs

Generative AI and LLMs

Fine-Tuning Small Models with LoRA: When a Custom Model Is Worth the Effort

LoRA and QLoRA have made fine-tuning a small open model affordable on a single GPU. Affordable is not the same as worthwhile: the training run is the cheap part, and the data, evaluation and maintenance decide whether a custom model pays off.

TopicsGenerative AI and LLMsAI and Machine Learning

Key takeaways

  • LoRA trains small low-rank matrices on top of a frozen model, cutting trainable parameters and memory dramatically; QLoRA adds 4-bit quantisation so even large models can be tuned on one GPU.
  • Fine-tuning is best for teaching format, style and narrow task behaviour, not for adding facts that change; use retrieval for knowledge.
  • Research suggests LoRA learns less than full fine-tuning on hard new domains but forgets less of the base model’s general ability, which suits many business tasks.
  • The deciding factor is data: you need hundreds to thousands of clean, representative examples and an evaluation set the model never trains on.
  • Budget for the pipeline, not the run: data preparation, evaluation, adapter versioning, serving and retraining when the base model or task changes.

Teams that have built a prototype with prompting often reach a plateau. The model mostly does the job but keeps drifting from the required output format, misses domain conventions or needs a very long prompt full of examples, which adds cost and latency on every call. Fine-tuning a smaller open model looks like the natural next step, and parameter-efficient methods such as LoRA have made it far cheaper than it was even a year or two ago.

This article is for CTOs and product leads deciding whether a custom fine-tuned model is worth building. It explains what LoRA and QLoRA actually do, which problems fine-tuning solves and which it does not, how much data you need, how to evaluate the result, how to serve adapters in production and what the effort really costs. It is not a training tutorial; it is a decision guide.

What do LoRA and QLoRA actually do?

Full fine-tuning updates every weight in a model, which needs a lot of GPU memory and produces a complete new copy of the model for each task. Low-Rank Adaptation, introduced in the 2021 paper LoRA: Low-Rank Adaptation of Large Language Models, takes a different approach. It freezes the original weights and trains small pairs of low-rank matrices injected into the Transformer layers. The authors report that, compared with fully fine-tuning GPT-3 175B, LoRA reduced trainable parameters by 10,000 times and GPU memory requirements by three times, with no additional inference latency and quality on par with or better than full fine-tuning on the models they tested.

Hugging Face’s PEFT documentation describes the practical consequences. The main settings are the rank r of the update matrices, the scaling factor lora_alpha and the target_modules that receive adapters, typically attention layers. Because the base weights stay frozen, you can keep several lightweight adapters for different tasks on one base model, and you can merge an adapter into the base weights for deployment so there is no extra latency.

QLoRA: fine-tuning on a single GPU

The 2023 QLoRA paper combined LoRA with a 4-bit quantised, frozen base model, using a NormalFloat 4-bit data type, double quantisation and paged optimisers to manage memory spikes. The authors report fine-tuning a 65B parameter model on a single 48 GB GPU while aiming to preserve full 16-bit fine-tuning performance. For business use, the implication is that tuning a 7B or 8B model, such as Mistral 7B or Meta’s Llama 3 8B, is within reach of a single rented GPU.

What LoRA is not

LoRA does not make a small model as capable as a much larger one. It adjusts behaviour within the base model’s existing abilities.

Which problems does fine-tuning solve, and which does it not?

The most common mistake is fine-tuning to add knowledge. Fine-tuning is good at teaching a model how to respond; it is unreliable for teaching it what is currently true.

ProblemFine-tuning with LoRABetter alternative
Output must follow a strict format or schemaStrong fitConstrained decoding or validation can also help
Consistent tone, style or house conventionsStrong fitLong few-shot prompts, at higher per-call cost
Narrow classification or extraction at high volumeStrong fit; lets a small model replace a large onePrompted large model if volume is low
Domain terminology and abbreviationsGood fit when examples are plentifulGlossary in the prompt for small vocabularies
Answering questions about your documentsPoor fit; facts go stale and are hard to citeRetrieval-augmented generation
Fast-changing information (prices, policies, stock)Poor fitRetrieval or tool calls to live systems
Hard reasoning the base model cannot doLimited benefitA larger or more capable model

Our article on choosing between RAG and fine-tuning covers the knowledge question in more depth. In many systems the answer is both: retrieval supplies facts, and a fine-tuned small model formats them reliably.

What the research says about trade-offs

A May 2024 study, LoRA Learns Less and Forgets Less, compared LoRA with full fine-tuning on programming and mathematics, for both instruction tuning and continued pre-training. Under standard low-rank settings, LoRA substantially underperformed full fine-tuning on the target domain, but better preserved the base model’s performance on other tasks and kept generations more diverse. The authors found full fine-tuning learns weight changes with a rank 10 to 100 times higher than typical LoRA configurations.

For business tasks this is often a good trade: you want a model that adopts your format and conventions while keeping its general language ability. If you are trying to teach a genuinely new, difficult domain, expect LoRA to need higher ranks, more data or a different approach.

How much data do you need, and what should it look like?

Data quality decides the outcome far more than hyperparameters. A few hundred excellent examples often beat thousands of inconsistent ones.

Rough guide by task type

  • Format and style adaptation: hundreds of high-quality input and output pairs can be enough.
  • Narrow classification or extraction: low thousands of labelled examples, covering every class and the awkward edge cases.
  • Broader domain adaptation: considerably more, and results are less predictable, as the research above suggests.

Treat these as starting assumptions to test, not thresholds.

Characteristics of a good training set

  • Drawn from real production inputs, not invented examples.
  • Outputs reviewed by domain experts and consistent with each other.
  • Balanced across categories, languages and difficulty.
  • Free of personal data you are not permitted to use for training, or properly anonymised.
  • Separated from a held-out evaluation set that the model never sees.

Where the data comes from

Good sources include historic human-completed work (tickets resolved, documents coded, reports written), corrected outputs from your prompted prototype, and expert-labelled samples. Using a larger model to generate synthetic training data is common, but check the large model’s terms of use and review samples carefully, because the fine-tuned model will copy its mistakes.

How do you decide whether a custom model is worth it?

Run the decision as a short, staged experiment rather than a commitment.

  1. Establish a baseline. Measure your current prompted solution on a held-out evaluation set: accuracy, format validity, latency and cost per request.
  2. Exhaust cheaper fixes. Improve prompts, add output schemas, add retrieval. Many plateaus disappear here.
  3. Estimate the prize. What is the value of the improvement: fewer human corrections, lower per-request cost by moving to a smaller model, lower latency, data staying in your environment?
  4. Run a time-boxed LoRA experiment. Train on your best data with a sensible default configuration and compare with the baseline.
  5. Decide on evidence. Continue only if the gain is clear on the held-out set and the ongoing maintenance cost is acceptable.

Signals that point to yes

  • High, steady volume where a tuned small model can replace an expensive large-model call.
  • Strict format or style requirements the prompted model keeps missing.
  • Data that must stay in your environment, ruling out large hosted models.
  • A stable task definition that will not change every month.
  • An existing pool of expert-reviewed examples.

Signals that point to no

  • The real problem is missing or outdated knowledge.
  • Low volume, where prompting a capable hosted model is cheaper overall.
  • Fewer than a few hundred reliable examples and no budget to label more.
  • No owner for retraining and evaluation after launch.

For example, a 60-person accounting practice that codes thousands of supplier invoices a month into its own chart of accounts might find that a LoRA-tuned 7B model, trained on two years of reviewed coding decisions, matches a large hosted model at a fraction of the per-invoice cost and runs inside its own cloud. A firm coding a few hundred invoices a month would likely not recover the effort. Both scenarios are illustrative.

How do you evaluate and serve a fine-tuned model?

Evaluation

  • Keep a held-out test set from the same distribution as production, plus a set of deliberately difficult cases.
  • Measure task metrics (exact match, field accuracy, schema validity) rather than relying on general chatbot benchmarks; the QLoRA authors themselves caution that chatbot benchmarks are not trustworthy for judging performance.
  • Check for regression on general behaviour you still need, such as following instructions or refusing unsafe requests.
  • Have domain experts blind-review a sample against the baseline.
  • Record the base model version, adapter version, data snapshot and configuration for every run.

Serving options

ApproachHow it worksWhen to use
Merged modelAdapter folded into base weights; deployed as a standalone modelOne task per deployment, simplest operations
Base model plus swappable adaptersOne base model in memory, adapters loaded per request or per tenantSeveral tasks or customers sharing hardware
Hosted fine-tuning serviceProvider trains and serves your custom modelNo GPU operations, data allowed to leave your environment

Whichever route you pick, put the model behind the same gateway, logging and monitoring as any other production model. Our article on MLOps and LLMOps covers versioning, deployment and monitoring practices that apply directly to adapters.

What does a fine-tuning project really cost?

With QLoRA on a small model, GPU time for a training run is usually a minor line item. The cost sits in everything around it.

Cost components

  • Data preparation: extracting, cleaning, anonymising and expert-reviewing examples. Often the largest cost.
  • Experimentation: several training runs to compare data subsets, ranks and target modules.
  • Evaluation: building and maintaining test sets and expert review time.
  • Serving: GPU hosting for the tuned model, unless you use a hosted service.
  • Maintenance: retraining when the task changes, when data drifts or when you move to a newer base model, since adapters are tied to the base model they were trained on.

Risks

  • Overfitting to the training set: great test scores, poor production results. Keep evaluation data independent and refresh it.
  • Baked-in errors: inconsistent labels become consistent mistakes.
  • Base model churn: a better base model arrives and your adapter does not transfer. Budget for retraining rather than treating the model as finished.
  • Licence obligations: the base model licence applies to your tuned model; check terms on derivatives and distribution.
  • Data protection: training data containing personal information needs a lawful basis and appropriate safeguards.

Go or no-go checklist

  1. The task is narrow, stable and measurable.
  2. The problem is behaviour or format, not missing knowledge.
  3. A prompted baseline has been measured on a held-out set.
  4. Cheaper fixes (prompts, schemas, retrieval) have been tried.
  5. At least several hundred expert-reviewed examples exist or can be produced.
  6. The value of the improvement has been estimated in cost, quality or latency.
  7. The base model licence permits your intended use and any distribution.
  8. A serving approach and hosting location are agreed.
  9. An owner is named for evaluation, retraining and monitoring.
  10. A time-boxed experiment with a clear success threshold is planned.

PoliteTech’s Private AI Deployment team benchmarks open models on clients’ own tasks, deploys them in the client’s cloud account, private cloud or on-premises, and sets up monitoring and an update plan, which is the foundation a fine-tuned model needs to stay useful after launch.

Frequently asked questions

What is the difference between LoRA and full fine-tuning?

Full fine-tuning updates all model weights and needs much more memory and storage. LoRA freezes the base model and trains small low-rank matrices, which is far cheaper and lets you keep several task adapters on one base model. Research suggests LoRA learns less on hard new domains but forgets less of the model’s general ability.

Can fine-tuning teach the model our company knowledge?

Not reliably. Fine-tuned facts go out of date and cannot be cited. Use retrieval to supply current knowledge and reserve fine-tuning for format, style and narrow task behaviour.

What hardware do we need to fine-tune a 7B or 8B model?

With QLoRA, a single modern data-centre GPU is typically enough for a 7B or 8B model, and the QLoRA authors fine-tuned a 65B model on one 48 GB GPU. Renting GPUs for experiments avoids buying hardware before you know the approach works.

How long does a LoRA project take?

A time-boxed experiment on existing data can be quick. Most of the elapsed time goes into preparing and reviewing data and building evaluation, so the timeline depends on how ready your examples are.

Do we have to retrain when a new base model comes out?

If you want to move to the new base model, yes. Adapters are tied to the base model they were trained on. Keep your data and evaluation pipeline reusable so retraining is routine.

Sources and methodology

Guidance reflects PoliteTech delivery experience. The external references below informed specific points in this article.

  1. Hu et al.: LoRA: Low-Rank Adaptation of Large Language Models (arXiv, 2021) — accessed 9 November 2026. How LoRA works and reported reductions in trainable parameters and GPU memory, with no added inference latency.
  2. Dettmers et al.: QLoRA: Efficient Finetuning of Quantized LLMs (arXiv, 2023) — accessed 9 November 2026. 4-bit NF4, double quantisation, paged optimisers, 65B fine-tuning on a single 48 GB GPU, and caution about chatbot benchmarks.
  3. Biderman et al.: LoRA Learns Less and Forgets Less (arXiv, May 2024) — accessed 9 November 2026. Comparison of LoRA and full fine-tuning on code and maths: lower target-domain gains, less forgetting, rank gap.
  4. Hugging Face: PEFT conceptual guide to LoRA — accessed 9 November 2026. Key LoRA parameters, multiple adapters on one base model and merging adapters for deployment.

Is a fine-tuned small model the right next step for your AI prototype?

We can measure your current baseline, run a time-boxed LoRA experiment on your data and tell you whether a custom model will pay for itself.