unsloth

Fine-tune LLMs with LoRA and QLoRA using Unsloth's optimized training framework.

Updated Aug 22, 2026
One-click install
npx skills add https://github.com/vivekgoquest/hermes-agent-stable --skill unsloth-vivekgoquest
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: unsloth
Source: https://github.com/vivekgoquest/hermes-agent-stable/tree/main/optional-skills/mlops/training/unsloth
Command: npx skills add https://github.com/vivekgoquest/hermes-agent-stable --skill unsloth-vivekgoquest

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires unsloth, torch, transformers, trl, datasets, peft, and includes references (resource) components.

What problem does it solve? Training large language models typically requires expensive GPU clusters and complex configuration. This Skill provides guidance for fine-tuning LLMs 2-5x faster with up to 70% less VRAM using Unsloth, making LoRA and QLoRA fine-tuning accessible on consumer hardware, Colab, or Kaggle. ## Core Features & Use Cases - Memory-Efficient Fine-Tuning: Train models from 3B to 405B parameters using QLoRA (4-bit) or LoRA (16-bit) with detailed VRAM requirement tables. - Reinforcement Learning: Implement GRPO, GSPO, DPO, ORPO, and KTO training for reasoning models with 80% less VRAM. - Multi-Modal Support: Fine-tune vision models, text-to-speech models, and BERT alongside standard LLMs like Llama, Qwen, Gemma, and Mistral. - Use Case: Fine-tune Llama 3.1 (8B) on a custom dataset using a free Colab notebook, then export to GGUF format for local inference with Ollama or llama.cpp. ## Quick Start Ask the agent to help you fine-tune a Llama model on your dataset using Unsloth with QLoRA on a single GPU.

Frequently Asked Questions about unsloth

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I fine-tune an LLM with Unsloth?▼

Install Unsloth with pip install unsloth, load a model using FastLanguageModel.from_pretrained with load_in_4bit enabled, prepare your dataset, and train with the TRL SFTTrainer. Free Colab notebooks are available for Llama, Qwen, Gemma, and other models.

How much VRAM do I need for QLoRA fine-tuning?▼

QLoRA 4-bit fine-tuning requires about 5 GB VRAM for 7B models, 8.5 GB for 14B models, and 41 GB for 70B models. LoRA 16-bit training needs significantly more, such as 19 GB for 7B models.

What is the difference between LoRA and QLoRA?▼

LoRA fine-tunes small adapter matrices in 16-bit precision while freezing the base model. QLoRA combines LoRA with 4-bit quantization of model weights, dramatically lowering memory usage with negligible accuracy loss using Unsloth's dynamic quants.

Does Unsloth work on AMD GPUs or Windows?▼

Unsloth supports AMD and Intel GPUs in addition to NVIDIA GPUs with CUDA capability 7.0 or higher. It runs on Linux and Windows, with Windows installation available natively or through WSL.

How do I run my fine-tuned model locally after training?▼

Export the fine-tuned model to GGUF format for use with Ollama, llama.cpp, or Open WebUI, or save to 16-bit for vLLM and SGLang deployment. Unsloth also provides built-in faster inference for trained models.

Why does my Unsloth training run out of memory?▼

Out-of-memory errors usually occur when batch size is set too high. Reduce batch size to 1, 2, or 3, enable 4-bit quantization, or shorten the context length to fit within your GPU's VRAM.