Skip to content

How to fine-tune an LLM, and when it's worth doing

Orchestra

Fine-tuning an LLM means continuing to train a pretrained model on your own examples so it learns a specific task, format or style. Unlike a prompt, it changes the model's weights. It's worth doing when a workflow repeats every day, your team can say what a good output looks like, and better prompts have stopped closing the gap. If any of those is missing, start with prompting and an evaluation set instead.

This guide covers when prompting is enough, how to build training data from real work, the main ways to fine-tune, how to test the result, and why it matters who holds the weights.

Start with prompting, and know when it's enough

Try prompts and output controls before you train anything. A stricter schema, shorter instructions, prefilled JSON or a fixed set of allowed actions can turn a model that rambles into one that returns what your code expects. In Orchestra's operations benchmark, output scaffolding alone raised Qwen3-8B with prefill to a score of 0.9667 before any fine-tuning. Small models need output control before training covers that result.

Prompting is enough when the model already does the task and only needs clearer instructions. Fine-tuning earns its place when the model understands the task but keeps missing your house style, schema, label boundaries or action pattern. It also needs a workflow that runs often, a stable output contract and a held-out eval that reflects what the product needs. When to replace a frontier model with a specialist model walks through those gates.

Prepare training data from real examples

The best training data comes from the work the model will do. Pull real inputs from production, along with the outputs your team accepted or corrected. Corrections are especially useful, because each one records how your business defines a good result.

Choose examples on purpose rather than training on every log line. Meta researchers trained LIMA, a 65-billion-parameter LLaMa model, on only 1,000 carefully curated prompts and responses, and it learned to follow specific response formats from a handful of examples. Check that labels and formats are consistent, since conflicting examples teach conflicting habits.

Before you train, set aside a held-out set the model never sees. That set is how you'll judge the result.

Check where each example came from. If any were generated by a hosted model, read that provider's terms before you train on them. OpenAI's services agreement and Anthropic's commercial terms both restrict using their outputs to build competing AI models, so don't build training data from those models' outputs. Examples your own team wrote or approved are the safest base.

Full fine-tuning vs LoRA and other PEFT methods

Full fine-tuning updates every parameter in the model. It gives you the most room to change behavior, but every tuned copy is as large as the original, and training needs far more GPU memory.

Parameter-efficient fine-tuning, or PEFT, trains a small number of extra parameters and leaves the rest of the model frozen. Hugging Face's PEFT documentation says these methods perform comparably to a fully fine-tuned model while sharply cutting compute and storage needs.

LoRA, short for low-rank adaptation, freezes the original weights and adds small trainable matrices to each layer. In the original LoRA paper, Microsoft researchers reported that, compared with fully fine-tuning GPT-3 175B, LoRA cut trainable parameters by 10,000 times and GPU memory needs by 3 times, with quality on par or better on the models they tested. QLoRA trains LoRA adapters on top of a 4-bit quantized model, which its authors used to fine-tune a 65-billion-parameter model on a single 48GB GPU.

For a narrow production task, LoRA is a sensible default. Save full fine-tuning for cases where your evals show an adapter can't reach the bar.

Supervised fine-tuning vs preference and RL tuning

Supervised fine-tuning, or SFT, trains on input and output pairs: here is the request, here is the right answer. It fits tasks where you can write down the correct output, such as extraction, classification or replies in a set format.

Preference tuning and reinforcement learning train on judgments instead of answers. In the InstructGPT research, OpenAI fine-tuned GPT-3 on written demonstrations, then trained it further with reinforcement learning from human rankings of its outputs. In human evaluations, outputs from the 1.3-billion-parameter InstructGPT model were preferred to those from the 175-billion-parameter GPT-3. Direct Preference Optimization, or DPO, learns from the same kind of preference data with a simple classification loss, and its authors found it substantially simpler to implement and train than RL-based methods.

Reinforcement learning belongs later, once the reward is real. It can come from tests, parsers, expert preferences or task outcomes. If the reward is noisy or easy to game, RL amplifies the wrong behavior. The optimization ladder lays out that order, from prompts to SFT to RL.

Evaluate before and after

Run your evaluation set on the base model before you train, and on every candidate after. Without that baseline, you can't tell whether fine-tuning helped, hurt or just moved the errors somewhere else.

Score what the product needs. If it needs strict JSON, score strict JSON. If it needs the right business label, score the label. Have domain experts define what passing means, since they know which mistakes matter, and keep the held-out set out of training.

Keep evaluating after launch. Production inputs drift, and the set that justified the change is how you notice a tuned model slipping. Our LLM evaluation guide covers how to build that set.

Own the weights you train

Where you fine-tune decides what you keep. A model tuned through a vendor's hosted service stays with that vendor and follows the vendor's schedule. A model you fine-tune from an open-weight base is a file you keep, host where you choose and retire when you decide.

Open weights still come with a license. Llama 3's, for example, requires companies with more than 700 million monthly active users in the preceding calendar month to request a separate license from Meta. Read the license before you build on a base model.

Owning the weights also means owning what your team teaches the model. Each correction becomes training data for the next version instead of a one-off fix. What are open-weight models covers the trade-offs, and Why rented AI stops compounding makes the longer case.

Where Orchestra fits

Orchestra is model agnostic. It turns your team's definition of good into evals and benchmarks options on your product's real work. Prompts and harnesses are refined first, and a model is trained only where the evals justify it. When they do, Orchestra can train a specialist model on your own examples. A task moves to a trained model only after it passes your evals and you approve the change.

What does it mean to fine-tune an LLM?

It means continuing to train a pretrained model on your own examples so it gets better at one task, format or style. Fine-tuning changes the model's weights. A prompt only changes what you send the model on each request.

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

There's no fixed number, and quality counts for more than volume. Meta researchers fine-tuned a 65-billion-parameter LLaMa model on 1,000 carefully curated prompts and responses, and it learned specific response formats from a handful of examples. Let your evaluation set decide: if scores keep rising as you add examples, add more.

Is LoRA as good as full fine-tuning?

Often, yes. In the original LoRA paper, quality was on par with or better than full fine-tuning on RoBERTa, DeBERTa, GPT-2 and GPT-3, with far fewer trainable parameters. Test it on your own task, and move to full fine-tuning only if your evals show the adapter falls short.

Can I fine-tune a model on outputs from GPT or Claude?

Check the provider's terms before you train on any hosted model's outputs. OpenAI's services agreement and Anthropic's commercial terms both restrict using their outputs to build competing AI models. Train on examples your own team wrote, accepted or corrected instead.

Do I own a model I fine-tune?

It depends on where you train it. A model tuned inside a vendor's hosted service stays with that vendor. A model you fine-tune from an open-weight base is a file of weights you keep and can host where you choose, within the terms of the base model's license.

Follow the evidence.

We don't prove it on our data. We prove it on yours.