Skip to content

Fast SFT with Unsloth

Unsloth is a practical way to train adapters quickly, especially with LoRA/QLoRA. Use it for serious prototypes, but document everything as if it were production.

  • Set up a small SFT script with your own dataset.
  • Save the adapter, configuration, and metrics.
  • Test the adapted model against unseen examples.

Recommended structure

Terminal
fine-tune-soporte/
  data/
    train.jsonl
    validation.jsonl
    test.jsonl
  train_unsloth.py
  configs/
    soporte-lora.yaml
  outputs/
    adapter/
    logs/
  evals/
    eval_cases.jsonl

Conceptual script

Terminal
from datasets import load_dataset
from trl import SFTTrainer, SFTConfig

dataset = load_dataset("json", data_files={
    "train": "data/train.jsonl",
    "validation": "data/validation.jsonl",
})

config = SFTConfig(
    output_dir="outputs/soporte-lora",
    max_length=2048,
    learning_rate=2e-4,
    num_train_epochs=1,
    logging_steps=10,
    eval_strategy="steps",
    eval_steps=50,
)

trainer = SFTTrainer(
    model="Qwen/Qwen3-4B",
    args=config,
    train_dataset=dataset["train"],
    eval_dataset=dataset["validation"],
)

trainer.train()
trainer.save_model("outputs/adapter")
Complete Aulafy mapSee how this lesson fits without leaving your path.

Complete Aulafy map

How all courses connect

This is not a checklist. Start with the foundation, choose an outcome, and go deeper only when your project needs more control.

  1. 1Understand
  2. 2Apply or build
  3. 3Operate with confidence
01

Choose an application

Turn the foundation into a visible outcome: a website, a business improvement, media, or an interactive experience.

Continue into the technical branch when you need to maintain code, data, or infrastructure.

02

Build with code

Prepare your environment, work with coding agents, and run models while keeping control of your projects.

This branch prepares you to design and operate reliable AI systems.

03

Take systems to production

Combine retrieval, agents, evaluation, security, deployment, and model adaptation when the problem requires it.

You do not need every course: choose the component your system needs and return as it grows.

View full catalogue