Prompting
Instructions and a few examples in the prompt of a strong general model.
- The best first step for any new task
- No training data and no training run
- Changes take minutes
- Limits: long prompts cost more on every call, and output can drift
LLM fine-tuning trains an existing language model further on your own examples, so that it gets better at one narrow task: your format, your tone, your domain or the Swedish language. Royan AB in Stockholm fine-tunes small open models with LoRA, measures the result against the base model and runs it where your data is allowed to be.
When it pays off
Fine-tuning changes how a model behaves. It does not give the model new facts that it can cite. That makes it the right tool for some jobs and the wrong one for others.
Labels, structured JSON, filled-in forms or reports in a set layout, where a prompt alone gives the right output most of the time, but not every time.
Customer replies, product texts or translations that must follow your style guide and use your terms the same way every time.
Many small open models write weaker Swedish than English. Training on good Swedish examples can close much of that gap for your task.
A small fine-tuned model can take over a narrow task from a large general model, at a lower cost and with faster answers at high volume.
When data may not leave your servers or the EU, a fine-tuned open model can run on your own hardware or with an EU hosting provider.
If the model must answer from documents that change, cite its sources or respect each user's access rights, RAG is the better tool. Many systems use both.
Comparison
Start with the simplest option that works, and move to the next one only when the evaluation shows that you need it.
Instructions and a few examples in the prompt of a strong general model.
The model first searches your documents, then answers from what it finds.
The model is trained further on hundreds or thousands of your examples.
How we work
The quality of a fine-tune comes mostly from its data. We spend most of the effort there, and we prove the result with numbers before anything goes live.
Before training
We collect and clean examples of the task from your own material, remove bad pairs and personal data that the task does not need, and keep back a test set that the model never sees in training.
Training
We train LoRA or QLoRA adapters on an open model such as Gemma, Qwen or a Llama-class model, in a size that fits your hardware and your task.
Before launch
We compare the fine-tuned model with the base model and with a strong general model on the same test set, with automatic metrics and human review.
Under the hood
Full fine-tuning of a large model is rarely needed. Parameter-efficient methods give most of the gain for a small part of the compute.
Low-rank adaptation trains a small set of extra weights on top of a frozen model. The adapter is small, fast to train and easy to swap or roll back.
LoRA on a model loaded in 4-bit precision. A larger model can then be fine-tuned on a single GPU, with a small loss in quality that we measure.
Gemma, Qwen and Llama-class models with a few billion parameters are strong enough for many narrow tasks and run on one GPU, a server or even a phone.
We deliver the adapter, a merged model or a quantized GGUF file, and run it on your own servers, with an EU cloud provider or on the device.
We check Swedish output with human review as well as automatic scores, because fluent text that changes the meaning is a common failure.
Training data stays where you decide. We use only the data the task needs and document what went into each model, which helps your GDPR work.
Proof
Our founder, AmirHossein Teymoori, has published a full, step-by-step guide to fine-tuning Google's Gemma 4 E4B to translate English novel passages into natural Swedish: clean data, LoRA training with Unsloth, evaluation with BLEU, chrF and COMET, a second model as a reviewer, and export to GGUF to run it locally.
The whole pipeline from dataset to a model that runs locally, with the rule we follow on every project: show real numbers, never invented ones.
How LoRA works, how to choose its settings, QLoRA, evaluation, and merging the weights for production.
A fine-tuned 4B model that beats API calls on a translation task: cheaper, faster and better on the Swedish phrasing that matters, on hardware our founder already owns.
FAQ
Fine-tuning means training an existing language model further on your own examples of a task. The model keeps its general language skills and gets better at what you trained it on, such as a format, a tone, a domain or a language.
If the model must answer from your documents, stay current and cite its sources, choose RAG. If it must do a narrow task in the same way every time, such as a format, a style or a language, fine-tuning helps. Many systems use RAG for the facts and a fine-tuned model for how the answer is written.
It depends on the task. A narrow format task can improve with a few hundred good examples, while translation or a new writing style usually needs thousands. Quality matters more than quantity: a small clean set often beats a large noisy one.
The main drivers are how much data must be collected and cleaned, the size of the model, how many rounds of training and evaluation are needed, and where the model will run. A free 30-minute call comes first; then you get a fixed quote for the agreed scope.
Yes. Open models can run on your own hardware, with an EU hosting provider or on the device. Your data and the trained model stay under your control.
For a specific task, it usually does. Training on good Swedish examples improves fluency and terms for that task. We measure it on a Swedish test set and with human review before we call it a win.
Mostly small and mid-size open models such as Gemma, Qwen and Llama-class models, because they can run where you need them. We choose by running your test set through several candidates first.
You do, within the license of the base model. You get the adapter or the merged model, the data pipeline and the test set. We also check that the training data may be used for training.
Related
When the model must answer from your documents and show its sources, retrieval is the right tool.
A small fine-tuned model can be one step of an agent, for example for sorting or data extraction.
Not sure fine-tuning is worth it? A short review of your task and your data gives you the answer first.