LLaMA Factory: fine-tuning with a custom dataset
Learn LLaMA Factory's graphical fine-tuning workflow on Google Colab, using an Alpaca-format emoji dataset and a one-epoch training run.
Player not loading? Watch on YouTube
The original video is in Italian. This tutorial walks through fine-tuning a language model with LLaMA Factory's graphical interface. The presenter runs the example on Google Colab and explains that a local installation would use a localhost address. Setup still involves cloning the repository, installing dependencies and running a launch command before using the interface.
The demonstration focuses on supervised fine-tuning. It covers model selection, optional quantization and chat templates, then spends time on dataset preparation. The presenter describes Alpaca and ShareGPT formats and JSON, JSONL and CSV files. A custom dataset needs an entry in the dataset info configuration file before the interface can list it.
For the worked example, the presenter uses Emojinet, a dataset pairing user prompts with emoji-only replies. Claude converts the existing CSV into Alpaca-format JSON: the question becomes the instruction, the response becomes the output and the input stays empty. After adding the file and restarting the interface, the presenter previews the data and starts a one-epoch training run.
The final section loads the saved checkpoint in the Chat tab and shows emoji replies to several prompts. The presenter also discusses evaluation with a separate test dataset, retraining with different parameters and export options for CPU or GPU. The examples illustrate the workflow; they do not establish performance beyond the prompts shown.