🦥Unsloth Docs
Train your own model with Unsloth, an open-source framework for LLM fine-tuning and reinforcement learning.
At Unsloth, our mission is to make AI as accurate and accessible as possible. Train, run, evaluate and save Llama, DeepSeek, TTS, Qwen, Gemma LLMs 2x faster with 70% less VRAM.
Our docs will guide you through training your own custom model locally.
🦥 Why Unsloth?
Unsloth makes it super easy for you to train models like Llama 3 locally or on platforms such as Google Colab and Kaggle. We streamline the entire training workflow, including model loading, quantizing, training, evaluating, running, saving, exporting, and integrations with inference engines like Ollama, llama.cpp, and vLLM.
The key reason to use Unsloth is because of our deep involvement in fixing critical bugs across major models. We’ve collaborated directly with teams behind Mistral (Devstral), Qwen3, Meta (Llama 4), Google (Gemma 1–3), and Microsoft (Phi-3/4), often contributing essential fixes that improved accuracy, stability, and prompt handling.
Unsloth is highly customizable as we allow you to alter things like chat templates or dataset formatting. We also support and have pre-built notebooks for vision, text-to-speech (TTS), BERT, reinforcement learning (RL) and more! We also support all training methods and all transformer-based models.
Quickstart
Install locally with pip (recommended) for Linux devices:
pip install unsloth
For Windows install instructions, see here.
What is finetuning and why?
Fine-tuning an LLM customizes its behavior, enhances domain knowledge, and optimizes performance for specific tasks.
By fine-tuning a pre-trained model (e.g. Llama-3.1-8B) on a dataset, you can:
Update Knowledge: Introduce new domain-specific information.
Customize Behavior: Adjust the model’s tone, personality, or response style.
Optimize for Tasks: Improve accuracy and relevance for specific use cases.
Example usecases:
Train LLM to predict if a headline impacts a company positively or negatively.
Use historical customer interactions for more accurate and custom responses.
Fine-tune LLM on legal texts for contract analysis, case law research, and compliance.
You can think of a fine-tuned model as a specialized agent designed to do specific tasks more effectively and efficiently. Fine-tuning can replicate all of RAG's capabilities, but not vice versa.
🤔FAQ + Is Fine-tuning Right For Me?How to use Unsloth?
Unsloth can be installed locally via Linux, Windows, Kaggle, or another GPU service like Google Colab. Most use Unsloth through the interface Google Colab which provides a free GPU to train with.
📥Installing + Updating🛠️Unsloth Requirements
Last updated
Was this helpful?