Mindket
AdvancedFree

Fine-tuning: train an open model on your own data

A black banner titled "Fine-tuning" over the line "Train an open model on your own data with LoRA".

This free fine-tuning course shows how to tell when fine-tuning is worth it, build a training dataset, train a LoRA adapter with Hugging Face TRL and PEFT, and run the result in Ollama. It has four hands-on lessons built from the calls in the official docs. You need basic Python, a terminal and, for the training lesson, a GPU.

What you'll be able to do

  • Decide whether a failure needs more context or a change in behavior, with a test you can run on your own prompts.
  • Build a JSONL training set in the chat format, check it with a script and hold back a test file.
  • Train a LoRA adapter with TRL and PEFT, and switch to QLoRA when the model does not fit in memory.
  • Score the adapter against the base model on held-out rows before you convert anything.
  • Merge the adapter, convert it to GGUF and run it in Ollama.
All courses

Who it's for

For developers who are comfortable with Python and a terminal and want to adapt an open model to their own data. Lessons 1 and 2 need no GPU, and lesson 3 does. If your goal is answers from your own documents, the RAG course fits better than fine-tuning.

Lessons

  1. 1When to fine-tune an LLM: prompting, RAG or training?Fine-tuning changes how a model behaves, not what it knows. Sort your failures into context or behavior problems, then pick prompting, RAG or fine-tuning.7 min
  2. 2Fine-tuning dataset: build, check and split your training dataBuild a fine-tuning dataset: the JSONL chat format, how many examples to start with, a script that checks the file and a held-out test set.6 min
  3. 3LoRA fine-tuning: train an adapter with TRL and PEFTFine-tune an open model with LoRA: a TRL and PEFT training script, what each setting does, QLoRA for a model that does not fit, and Unsloth.6 min
  4. 4Run a fine-tuned model: score it, merge it and import it into OllamaRun your fine-tuned model: score the LoRA adapter against the base model, merge it, then import it into Ollama as a folder or a quantized GGUF file.6 min

Frequently asked questions

Is this fine-tuning course free?

Yes. All four lessons are free to read, and each one lists its sources at the end. Training needs a GPU, and that hardware is yours to provide.

Do I need a GPU to follow it?

Only for lesson 3, which trains the adapter. It uses Qwen3-0.6B, the small model TRL's own quick start loads. Lessons 1 and 2 are reading and file work.

Is fine-tuning better than RAG?

They fix different problems. Lesson 1 sorts your failures: missing knowledge points to retrieval, and inconsistent format or tone points to fine-tuning. OpenAI's accuracy guide calls the two additive, not exclusive.

Which libraries does the course use?

Hugging Face TRL for training and PEFT for LoRA, with bitsandbytes for QLoRA and Unsloth as an optional faster loader. Lesson 4 merges with PEFT, converts with llama.cpp and runs the model in Ollama.

What should I learn after this course?

The MCP course is next. It builds an MCP server in Python or TypeScript, which is how an assistant reaches files, databases and tools.

Share this course

See what others build on open models

Mindket lists open-source projects as kits, each with setup notes. Browse a few before you start your own.

Browse kits

All courses · All articles