Fine-Tune Small LMs at Lightning Speed

This project is a comprehensive guide to fine-tuning small language models (1B & 8B parameters) using two distinct approaches: fast cloud training with Unsloth on Google Colab, and local adaptation on Mac (MPS) & Windows/Linux (CUDA) using PEFT.

llm_finetuning

For the complete source code, notebooks for all platforms, and training scripts, check out the project on GitHub → GitHub repository

The project demonstrates how to fine-tune an 8B parameter model in minutes using Unsloth, a library that makes training small LMs incredibly fast and memory-efficient. While traditional fine-tuning of 8B models often requires expensive GPU clusters, Unsloth democratizes this process by enabling training on free Google Colab resources.

For a detailed walkthrough and the accompanying article, visit the Medium post → Medium Article

What you get from this project:

Why Unsloth changes the game:

The project includes comprehensive notebooks for each platform, all using the same dataset and achieving consistent results. Whether you prefer cloud training with Unsloth or local fine-tuning with PEFT and LoRA, this guide provides everything you need to adapt compact open models like TinyLlama-1.1B and Llama-3.1-8B-Instruct to your own domain.

Training typically completes in under 10 minutes on Google Colab's free T4 GPU—something that traditionally would require hours or expensive cloud instances. This makes advanced LLM customization accessible to everyone, not just those with access to expensive computational resources.

Front page