Fine-Tuning Lab 01 — Fine-Tune Your First LLM with Unsloth

Fine-Tuning Lab 01 — Fine-Tune Your First LLM with Unsloth

Learning Path: Fine-Tuning Lab
Level: Beginner
Duration: 38 minutes
Tools: Unsloth Desktop · Qwen2.5 · Python · Hugging Face

Introduction

If you’ve been wanting to fine-tune your first language model but don’t know where to start, this tutorial walks you through the entire process.

When I started learning fine-tuning, many of the tutorials I found seemed to assume I already understood training configurations, datasets, model architectures, and GPU environments.

I wanted something different: a small, practical experiment where I could understand what was happening at every stage.

So I built one.

In this tutorial, we’ll take a small Qwen language model, fine-tune it using Unsloth Desktop, evaluate it against the original model, export it as GGUF, and call it from a Python application.

I’ll also show you a configuration mistake I made, how I corrected it, and what the evaluation results actually demonstrated.

Watch the Tutorial

What You’ll Learn

By the end of this tutorial, you’ll understand how to:

  1. Define a measurable task before training a model.

  2. Prepare a fine-tuning dataset using structured examples and appropriate data splits.

  3. Establish a baseline to understand how the original model performs.

  4. Understand LoRA and QLoRA, and why we don’t always need to update every model parameter.

  5. Configure and run fine-tuning in Unsloth Desktop.

  6. Interpret training charts and identify configuration problems.

  7. Evaluate the fine-tuned model against the base model using the same evaluation procedure.

  8. Export the trained model to GGUF and run it locally.

  9. Connect the model to Python through an OpenAI-compatible API.

What We’re Building

Our experiment focuses on a finance-operations triage task.

The system receives a short financial incident description and produces a structured JSON response containing three fields:

  • category — What type of incident occurred?

  • severity — How urgent is the issue?

  • next_action — What should happen next?

For example, an incident might describe a successful payment that is missing from the financial ledger.

The goal is to teach the model to classify the incident and return a response that follows the defined format and task policy.

This gives us something measurable instead of simply asking whether the model’s answers look better.

The Fine-Tuning Workflow

The experiment follows this process:

Define the task → Prepare the data → Evaluate the base model → Fine-tune → Evaluate again → Inspect failures → Export → Integrate with Python

The important lesson is that training is only one part of the process.

A completed training run doesn’t automatically mean you’ve created a better model.

We need evidence.

What Happened in the Experiment?

During the tutorial, I initially configured the training run for three optimizer steps when I intended three epochs.

Those are not the same thing.

After identifying and correcting that mistake, I completed the training run and evaluated the result.

The recorded comparison produced:

Evaluation Base model Fine-tuned model
Composite score 74 75
Correct categories 11 12

The fine-tuned model performed slightly better on this evaluation, but the difference was modest.

The composite score combines different checks; it is not classification accuracy. One evaluation also does not establish a reliable improvement across new cases.

The takeaway: Don’t judge a fine-tuning experiment simply by whether training completed or the loss curve declined. Evaluate the actual behavior you were trying to improve.

Resources & Project Files

I’ve made the following resources available so you can inspect the work and try the process yourself.

Video and written walkthrough

Source code and model artifacts

Further reading

Important: The public GitHub repository, Hugging Face dataset, and model document the earlier v0.1 experiment introduced in the tutorial. The video includes a separate training run and evaluation. These are educational experiments, not production-qualified financial models.

Try It Yourself

Here’s your first challenge as a member of Domain Intelligence Builders.

  1. Choose a small task where you can define the expected output.

  2. Select a suitable small language model.

  3. Prepare examples that demonstrate the behavior you want.

  4. Evaluate the original model before fine-tuning.

  5. Fine-tune the model and record the training configuration.

  6. Compare both models using the same evaluation cases and scoring criteria.

  7. Inspect what improved, what became worse, and what remained unchanged.

You don’t have to start with financial operations. You can choose a domain you’re familiar with.

The goal is to understand the process and produce evidence you can inspect.

Questions & Community Discussion

I’d love to know:

Have you fine-tuned a model before, or is this going to be your first attempt?

If you’ve already experimented with fine-tuning, share the model you used, what you tried to teach it, and whether your evaluation demonstrated an improvement.

If you’re just getting started, tell us what kind of model you’d like to build.

Post your questions below. And if you complete the experiment, share your implementation in Share Your Builds.

Let’s learn by building, measuring, and sharing what we discover.

— Ugo Chukwu
IntelligenceOS · Domain Intelligence Builders