# Unsloth Fine-tuning LLMs Guide

> Practical guide to fine-tuning LLMs with LoRA, QLoRA, and RL.

An official documentation guide by Unsloth that covers the entire pipeline of fine-tuning large language models. It walks through selecting base models, choosing between LoRA and QLoRA, curating datasets, tuning training hyperparameters, and deploying the resulting models. It is tailored to help developers train models efficiently on consumer hardware with minimal VRAM.

Website: https://unsloth.ai/docs/get-started/fine-tuning-llms-guide

## What it is for

- Fine-tune instruct models like Llama 3 on custom datasets using QLoRA
- Select appropriate training hyperparameters like learning rate, rank, and sequence length
- Prepare and format question-answer datasets for domain-specific fine-tuning
- Diagnose training metrics to identify underfitting or overfitting
- Export trained models for local deployment with tools like Ollama or vLLM

## Features

- Step-by-step walkthrough covering model choice, dataset preparation, and parameter selection
- Memory-efficient guidance for 4-bit and 16-bit LoRA and QLoRA workflows
- Hyperparameter tuning advice including batch sizes, learning rates, and target modules
- Explanation of advanced training techniques including GRPO, DPO, and continued pretraining
- Ready-to-use Colab and Kaggle notebooks for immediate hands-on practice
- Instructions for local setup via Docker or pip on Windows and Linux

## Pricing

Free online documentation and open-source notebooks

## Details

- Type: Article or course
- Category: [AI](https://xiry.app/topics/ai.md)
- Open source: yes
- Platforms: Web
- For: Developers, AI researchers, and hobbyists looking to fine-tune open-source LLMs efficiently.
- Alternative to: Hugging Face TRL Documentation, Axolotl Documentation
- Tags: unsloth, finetuning, llm, qlora, lora, machine learning, documentation

## Why it was saved

- [@UnslothAI, 10 March 2025](https://x.com/UnslothAI/status/1899132219064766652): Covers the full workflow: understanding fine-tuning and example usecases (headline sentiment, legal contract analysis), choosing the right model and method (QLoRA vs LoRA, max\_seq\_length, load\_in\_4bit for 16GB GPUs), model parameters (r, target\_modules, lora\_alpha, learning rate ranges 1e-4 to 5e-5, counteracting overfitting), plus RL/GRPO/DPO/CPT, data prep, evaluation, and deployment via vLLM, Ollama, Open WebUI.

## Related

- [Ultimate Guide to Fine-Tuning LLMs](https://xiry.app/resources/ultimate-guide-to-fine-tuning-llms): A 114-page technical report covering the full LLM fine-tuning lifecycle. (Article or course, Free)
- [ChatGPT](https://xiry.app/resources/chatgpt): Conversational AI assistant for writing, research, reasoning, and coding (Web app, Freemium)
- [Pinokio](https://xiry.app/resources/pinokio): Browser that installs and runs open-source AI apps with one click (Desktop app, Free)
- [Prompt Engineering (Google Whitepaper)](https://xiry.app/resources/prompt-engineering-google-whitepaper-2086): A comprehensive guide to prompt engineering techniques and LLM parameters by Google. (Article or course, Free)
- [Claude](https://xiry.app/resources/claude): Anthropic's conversational AI assistant for analysis, writing, and coding (Web app, Freemium)
- [Hermes 3](https://xiry.app/resources/hermes-3): Open-weights fine-tune of Llama 3.1 built for agentic function calling. (AI model, Open source)

Updated 10 October 2026. Page: https://xiry.app/resources/unsloth-fine-tuning-llms-guide

Make your own library: Xiry takes your saved reels, tweets, Reddit bookmarks and Watch Later videos, makes them searchable and pulls the useful stuff out, like this library. It's invite-only for now; join the waitlist at https://xiry.app/#waitlist.
