Debuly

Guide · Developer platforms

How to fine-tune an LLM on your own data

Fine-tune a language model on your own examples: when to do it, the steps, seven tools and platforms compared with pricing and stated limits, and common mistakes.

By the end of this guide you will have fine-tuned a language model on your own examples, measured whether it beats the base model on a held-out test set, and deployed it behind an API or on your own machine. Fine-tuning means continuing a model's training on a smaller set of input and output pairs, so it learns your format, tone or task.

If you want to fine-tune an LLM on your own data, the key decision is where the training runs: a hosted fine-tuning service, a framework on your own hardware, or rented GPUs. This guide walks through each and compares seven tools from our Developer platforms category.

Key takeaways

  • Fine-tuning teaches a model a behaviour, format or style from examples. It is a poor way to add facts that change often; retrieval is usually simpler for that.
  • The workflow is: write the task down, build a clean dataset of examples, hold some back for testing, train an adapter, compare against the base model, then deploy.
  • The main decision is where training runs: a hosted service (Fireworks AI, FlexAI, Replicate), a local framework (Ludwig, MLX), a desktop workbench that sends jobs to providers (Kiln), or rented GPUs (Lambda).
  • Your training data is the product. Remove personal and confidential data, and check you have the right to use every example.

What you need before you start

  • A clearly defined task. For example, "turn support emails into a structured ticket" or "answer in our house style".
  • Examples of good outputs. Real input and output pairs, checked by a person. Quality matters more than quantity.
  • A held-out test set. Examples you never train on, used to compare models.
  • Permission to use the data. Customer messages, personal data and licensed text may not be usable for training. Check your privacy policy and contracts.
  • Compute. Either an account with a hosted service, a machine with enough GPU or Apple silicon memory, or rented GPU time.
  • Time and difficulty. A first small run can fit in an afternoon once the data is ready, and preparing the data is usually the longer part. Difficulty is moderate to hard.

Which kind of AI tool fits this job

Choose by where you want training to run and how much you want to manage.

A hosted service that trains and serves for you. Fireworks AI hosts open models behind an API and offers Managed Training for supervised, preference and reinforcement fine-tuning, plus a Serverless Training API for LoRA runs (listed as private preview). FlexAI offers managed fine-tuning and lets you deploy fine-tuned checkpoints and LoRA adapters through an OpenAI-compatible API. Replicate lets you fine-tune supported models on your own data, for example image models such as Flux, and deploy custom models packaged with its open-source tool Cog.

A framework or workbench on your own machine. Ludwig is an open-source declarative framework where you describe training in a YAML file and run ludwig train. It covers supervised fine-tuning, preference alignment and LoRA-family adapters. MLX is Apple's open-source array framework for Apple silicon, and its examples collection includes LoRA fine-tuning. Kiln is a free desktop app and Python library for building evals, generating synthetic data and fine-tuning across 60+ models on 4 providers; the app runs on your machine, while fine-tuning runs with the provider you choose.

Rented GPUs when you want full control. Lambda rents on-demand NVIDIA GPU instances with CUDA, PyTorch and JupyterLab preinstalled, billed per GPU hour. Use this when you run your own training scripts.

Step 1: Decide whether to fine-tune at all

Fine-tuning takes effort, so confirm it is the right tool first.

  1. Write the task as one sentence and list five example inputs with the output you want.
  2. Try a strong prompt with examples first. If that already works, you may not need training.
  3. If the problem is missing or changing knowledge, use retrieval instead; see how to build a RAG chatbot over your own docs.
  4. Choose fine-tuning when you need a consistent format, tone or behaviour that prompting cannot hold.

Check it worked by being able to state what the model does wrong today in one sentence.

Step 2: Build and clean your dataset

Your examples teach the model, so mistakes in them become mistakes in the model.

  1. Collect input and output pairs from real work, and have a person review them.
  2. Remove personal data, secrets and anything you do not have the right to train on.
  3. Make the format consistent: the same instruction style, the same output structure.
  4. Add edge cases and examples where the correct answer is to refuse or say "not enough information".
  5. If real examples are scarce, consider synthetic data. Kiln lists synthetic data generation from topic trees, but a person should review generated examples.

Check it worked by reading a random sample of examples and finding no wrong or sensitive ones.

Step 3: Split off a test set and write an eval

You need a way to know whether training helped.

  1. Set aside a portion of the examples that the model never trains on.
  2. Define how you will score answers: exact match for structured output, human ratings, or a model acting as a judge.
  3. Record the base model's score on the test set before you train anything.
  4. Kiln lists evals with LLM-as-judge scoring and human ratings. The listings for the other tools do not describe built-in evaluation, so plan your own scoring there.

Check it worked by having a baseline number for the untouched base model. For more on this, see how to evaluate LLM outputs before you ship.

Step 4: Choose a tool and a base model

You end this step with a platform, a base model and a budget.

  1. Decide where training will run: hosted, on your own computer, or on rented GPUs.
  2. Pick a base model whose licence allows your use, and start with a smaller one. Smaller models are cheaper to train and serve.
  3. Check costs. Fireworks AI lists Managed Training from $0.50 per 1M tokens, prepaid credits, and on-demand GPU deployments. Lambda lists on-demand rates from $0.69 per GPU per hour.
  4. Check requirements for local runs. Ludwig requires Python 3.12 or newer and a PyTorch environment, and MLX is built mainly for Apple silicon.

Check it worked by estimating the cost of one training run and confirming it fits your budget.

Step 5: Run a small training job first

Start small so mistakes are cheap.

  1. Upload or point the tool at your training file in the format it expects.
  2. Choose an adapter method such as LoRA, which trains a small add-on instead of every weight. Ludwig lists LoRA-family adapters with 4-bit QLoRA, and Fireworks AI lists LoRA runs through its Serverless Training API, which is in private preview.
  3. Run a short job on a small slice of the data to catch format errors.
  4. Then run the full job, watching the training and validation loss if the tool reports them.

Check it worked by seeing the job finish and produce a model or adapter you can call.

Step 6: Evaluate against the base model

Compare, do not assume.

  1. Run the test set through both the base model and the fine-tuned one.
  2. Score both the same way, then read the outputs where the fine-tuned model is worse.
  3. Check for new problems such as overly long answers, lost general ability or memorised private data.
  4. Adjust the data, not just the settings, when you find patterns of failure, then train again.

Check it worked by the fine-tuned model beating the base on your test set without new failures.

Step 7: Deploy, monitor and retrain

Put the model where it will be used and keep watching.

  1. Deploy the adapter or model. Fireworks AI and FlexAI list deployment of fine-tuned models through APIs, Replicate lets you deploy a custom model, and Ludwig can start a REST API with ludwig serve.
  2. Test on live-like requests and keep a fallback to the base model.
  3. Log real inputs and outputs, with privacy controls, and review them regularly.
  4. Retrain when your task or data changes. Keep each dataset and model version together.

Check it worked by calling the deployed endpoint with your test inputs and getting the same results as in Step 6.

Tools for this job compared

Tool Good fit for Pricing Stated limits
Replicate Fine-tuning supported models and deploying custom ones via API Paid, from $0.09, usage-based (checked 24 Oct 2026) Private models bill for setup and idle time; public models share a hardware pool, so cold boots can occur
Fireworks AI Hosted fine-tuning and serving of open models Paid, from $0.01, usage-based (checked 24 Oct 2026) Prepaid credits; some features such as the Serverless Training API are in private preview
Kiln Evals, synthetic data and fine-tuning from a desktop app Freemium Auto Prompt Optimizer runs on Kiln's servers and needs a paid plan; desktop app is source-available
Ludwig Config-driven fine-tuning on your own hardware Open source Needs Python 3.12 or newer and a PyTorch environment; large models need suitable GPUs
MLX Training and running models on Apple silicon Open source Built mainly for Apple silicon, with Linux CUDA and CPU builds as add-ons
FlexAI Managed fine-tuning with an OpenAI-compatible API Paid, from $0.01, usage-based (checked 24 Oct 2026) Token prices differ by model; fine-tuning starts at dedicated capacity; AgentOS is listed as in trial
Lambda Renting GPUs to run your own training Paid, from $0.69, usage-based (checked 24 Oct 2026) Each instance is tied to one region; cluster pricing needs the sales team

Prices and plan limits change, so confirm the current terms on each vendor's site before you commit.

Common mistakes to avoid

  • Fine-tuning to add facts. Models do not reliably memorise new facts, and facts go stale. Fix it by using retrieval for knowledge and fine-tuning for behaviour.
  • Training on unchecked data. Wrong, biased or sensitive examples become wrong, biased or leaky outputs. Fix it by reviewing a sample by hand and removing personal data before training.
  • Having no test set. Without held-out examples you cannot tell if the model improved. Fix it by splitting data first and scoring the base model as a baseline.
  • Starting with the biggest model and the full dataset. Mistakes then cost real money. Fix it by running a small model on a small slice first.
  • Ignoring licences and consent. Base models, datasets and customer content carry terms. Fix it by checking the base model's licence and your right to use each data source.

How we put this together

This is an evidence-based guide built from each tool's listing in our directory, which is compiled from the vendor's own site and pricing page. It is not a review based on using the tools. We don't rank tools, and nobody paid to be included. Some outbound links may be affiliate links; see our disclosure.

Frequently asked questions

Can I fine-tune an LLM for free?

Partly. Ludwig and MLX are free open-source frameworks, and Kiln's Individual tier is free, but you still need hardware or paid compute. Hosted services such as Fireworks AI and Replicate charge for training and serving.

How much data do I need?

The tools in our directory do not publish a required number, and it depends on the task. Start with a small, high-quality set, measure on a held-out test set, and add examples where the model fails. Quality of examples usually matters more than volume.

Can I fine-tune a model on a Mac?

Yes, for smaller models. MLX is built for Apple silicon and its examples collection includes LoRA fine-tuning of language models, and Kiln's macOS desktop app can start fine-tunes with the providers it supports. Larger models may need rented GPUs, for example from Lambda.

Is fine-tuning better than RAG?

They solve different problems. Fine-tuning changes behaviour, format and style, while retrieval gives the model current documents to answer from. Many projects use retrieval first and add fine-tuning only if behaviour is still wrong.

Can I keep my training data private?

Running a framework such as Ludwig or MLX on your own machine keeps data local. Kiln states that API calls go from your computer to the provider you choose. Hosted services receive your data, so read each vendor's data terms first, and have a person check any regulated or sensitive material.

Compare more options in our Developer platforms category.

Related guides

Developer platforms · Image generation

How to add image generation to your app with an API

Add an image generation API to your app: how to choose a provider, call it safely, control cost and licensing, with seven tools compared on pricing and limits.

Debuly Editorial · Published

Developer platforms

How to rent a cloud GPU for AI training and inference

Rent a cloud GPU for AI work: size the job, choose a provider type, launch an instance and stop paying when idle. Seven providers compared with pricing and limits.

Debuly Editorial · Published

Related categories