# Unsloth Docs

Unsloth lets you run and train AI models on your own local hardware.

Our docs will guide you through running & training your own model locally.

<a href="fine-tuning-for-beginners" class="button primary">Get started</a> <a href="https://github.com/unslothai/unsloth" class="button secondary">Our GitHub</a>

<table data-card-size="large" data-view="cards" data-full-width="false"><thead><tr><th></th><th></th><th data-hidden data-card-cover data-type="image">Cover image</th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td><h4>Google Gemma 4</h4></td><td>Run and train Google's new Gemma 4 models!</td><td><a href="https://3215535692-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxhOjnexMCB3dmuQFQ2Zq%2Fuploads%2FkEjWOJqBWCtIN9Cg6CdI%2FGemma%204%20landscape.png?alt=media&#x26;token=57d3f596-dae8-4eab-80e6-0847794ffc8d">Gemma 4 landscape.png</a></td><td><a href="../models/gemma-4">gemma-4</a></td></tr><tr><td><h4><strong>Introducing Unsloth Studio</strong></h4></td><td>A new open, no-code web UI to train and run LLMs.</td><td><a href="https://3215535692-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxhOjnexMCB3dmuQFQ2Zq%2Fuploads%2FstfdTMsoBMmsbQsgQ1Ma%2Flandscape%20clip%20gemma.gif?alt=media&#x26;token=eec5f2f7-b97a-4c1c-ad01-5a041c3e4013">landscape clip gemma.gif</a></td><td><a href="../new/studio">studio</a></td></tr></tbody></table>

<table data-view="cards" data-full-width="false"><thead><tr><th></th><th></th><th data-hidden data-card-cover data-type="image">Cover image</th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td><strong>Qwen3.5</strong></td><td>New Qwen3.5 Small &#x26; Medium LLMs are here!</td><td><a href="https://3215535692-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxhOjnexMCB3dmuQFQ2Zq%2Fuploads%2Fvw6yRxJDCeBl1CIsQkki%2Fqwen35.png?alt=media&#x26;token=28fe0357-351a-49e1-a176-bb21ecc8542a">qwen35.png</a></td><td><a href="../models/qwen3.5">qwen3.5</a></td></tr><tr><td><strong>NVIDIA Nemotron 3</strong></td><td>Run the new 4B and 120B models by NVIDIA.</td><td><a href="https://3215535692-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxhOjnexMCB3dmuQFQ2Zq%2Fuploads%2FllPS7l6rpEr68mytlxXU%2Fnemotron%203%20logo.png?alt=media&#x26;token=7bd05673-6b97-41c2-b657-530b7e6e4e3c">nemotron 3 logo.png</a></td><td><a href="../models/nemotron-3">nemotron-3</a></td></tr><tr><td><strong>Faster MoE is here!</strong></td><td>Train MoE LLMs 12x faster with less VRAM.</td><td><a href="https://3215535692-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxhOjnexMCB3dmuQFQ2Zq%2Fuploads%2Fh9BrTJR8CZghHOe1Yrgj%2Ffaster%20moe%201920.png?alt=media&#x26;token=404e70ea-6aa1-4af0-a01c-7490d8147c4e">faster moe 1920.png</a></td><td><a href="../basics/faster-moe">faster-moe</a></td></tr><tr><td><strong>Claude Code &#x26; Codex</strong></td><td>Learn to run local LLMs via Claude &#x26; OpenAI.</td><td><a href="https://3215535692-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxhOjnexMCB3dmuQFQ2Zq%2Fuploads%2FM3el6W6XCMc0iBEgdeov%2Fclaude%20code%20codex.png?alt=media&#x26;token=e45dbc05-9af6-40f7-bcf8-59b79ac44909">claude code codex.png</a></td><td><a href="../basics/claude-code">claude-code</a></td></tr><tr><td><strong>Qwen3-Coder-Next</strong></td><td>Run &#x26; fine-tune the new 80B coding model.</td><td><a href="https://3215535692-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxhOjnexMCB3dmuQFQ2Zq%2Fuploads%2F47HGDuvMBPAkh4vcaGMg%2Fqwen3-coder-next%20logo.png?alt=media&#x26;token=244ae539-fea4-40e8-9ee2-b6ec7fb44060">qwen3-coder-next logo.png</a></td><td><a href="../models/qwen3-coder-next">qwen3-coder-next</a></td></tr><tr><td><strong>GLM-4.7-Flash</strong></td><td>Run &#x26; fine-tune 30B model for agentic coding.</td><td><a href="https://3215535692-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxhOjnexMCB3dmuQFQ2Zq%2Fuploads%2F6PQZ23CoUdZs1EZCjtYn%2Fglm4.7flash.png?alt=media&#x26;token=d3dc776e-ef3e-4eb3-ad4e-bf45e7b5745a">glm4.7flash.png</a></td><td><a href="../models/glm-4.7-flash">glm-4.7-flash</a></td></tr></tbody></table>

{% columns %}
{% column width="50%" %}
{% content-ref url="fine-tuning-llms-guide" %}
[fine-tuning-llms-guide](https://unsloth.ai/docs/get-started/fine-tuning-llms-guide)
{% endcontent-ref %}

{% content-ref url="unsloth-notebooks" %}
[unsloth-notebooks](https://unsloth.ai/docs/get-started/unsloth-notebooks)
{% endcontent-ref %}
{% endcolumn %}

{% column width="50%" %}
{% content-ref url="unsloth-model-catalog" %}
[unsloth-model-catalog](https://unsloth.ai/docs/get-started/unsloth-model-catalog)
{% endcontent-ref %}

{% content-ref url="../models/tutorials" %}
[tutorials](https://unsloth.ai/docs/models/tutorials)
{% endcontent-ref %}
{% endcolumn %}
{% endcolumns %}

### 🦥 Why Unsloth?

* We directly collab with teams behind [gpt-oss](https://docs.unsloth.ai/new/gpt-oss-how-to-run-and-fine-tune#unsloth-fixes-for-gpt-oss), [Qwen3](https://www.reddit.com/r/LocalLLaMA/comments/1kaodxu/qwen3_unsloth_dynamic_ggufs_128k_context_bug_fixes/), [Llama 4](https://github.com/ggml-org/llama.cpp/pull/12889), [Mistral](https://unsloth.ai/docs/models/tutorials/devstral-how-to-run-and-fine-tune), [Gemma 1-3](https://news.ycombinator.com/item?id=39671146) and [Phi-4](https://unsloth.ai/blog/phi4), where we’ve **fixed critical bugs** that greatly improved model accuracy. Andrej Karpathy for example has [praised our work](https://x.com/karpathy/status/1765473722985771335).
* Unsloth streamlines local training, inference, data, and deployment
* Unsloth supports inference and training for 500+ models: [vision](https://unsloth.ai/docs/basics/vision-fine-tuning), [TTS](https://unsloth.ai/docs/basics/text-to-speech-tts-fine-tuning), [embedding](https://unsloth.ai/docs/basics/embedding-finetuning), [RL](https://unsloth.ai/docs/get-started/reinforcement-learning-rl-guide)

### ⭐ Features

Unsloth lets you run and train models for text, [audio](https://unsloth.ai/docs/basics/text-to-speech-tts-fine-tuning), [embedding](https://unsloth.ai/docs/new/embedding-finetuning), [vision](https://unsloth.ai/docs/basics/vision-fine-tuning) and more. Unsloth provides many key features for both inference and training:

#### Inference

* Search + download + run any model like GGUFs, LoRA adapters, safetensors.
* [Self-healing tool calling](https://unsloth.ai/docs/new/studio/chat#auto-healing-tool-calling) / web search and call OpenAI-compatible APIs.
* [Auto inference parameter](https://unsloth.ai/docs/new/studio/chat#auto-parameter-tuning) tuning and edit chat templates.
* [Export or save](https://unsloth.ai/docs/new/studio/export) your model to GGUF, 16-bit safetensor etc.
* [Compare outputs](https://unsloth.ai/docs/new/studio/chat#model-arena) with two different model side by side.

#### Training

* Train and [RL](https://unsloth.ai/docs/get-started/reinforcement-learning-rl-guide) 500+ models \~2x faster with \~70% less VRAM (no accuracy loss)
* Supports full fine-tuning, pre-training, 4-bit, 16-bit and FP8 training.
* [Auto-create datasets](https://unsloth.ai/docs/new/studio/data-recipe) from PDF, CSV, DOCX files. Edit data in a visual node workflow.
* Observability: Monitor training live, track loss, GPU usage, customize graphs
* Most efficient [**reinforcement learning**](https://unsloth.ai/docs/get-started/reinforcement-learning-rl-guide) library, using 80% less VRAM for GRPO, [FP8](https://unsloth.ai/docs/get-started/reinforcement-learning-rl-guide/fp8-reinforcement-learning) etc.
* [Multi-GPU](https://unsloth.ai/docs/basics/multi-gpu-training-with-unsloth) works but a much better version is coming!

### Quickstart

Unsloth supports MacOS, Linux, [Windows](https://unsloth.ai/docs/get-started/install/windows-installation), [NVIDIA](https://unsloth.ai/docs/get-started/install/pip-install), Intel and CPU setups. See: [unsloth-requirements](https://unsloth.ai/docs/get-started/fine-tuning-for-beginners/unsloth-requirements "mention"). Use the same command to update:

#### **MacOS, Linux, WSL:**

```bash
curl -fsSL https://unsloth.ai/install.sh | sh
```

#### **Windows PowerShell:**

```bash
irm https://unsloth.ai/install.ps1 | iex
```

#### Docker

Use our official **Docker image**: [`unsloth/unsloth`](https://hub.docker.com/r/unsloth/unsloth) which currently works for Windows, WSL and Linux. MacOS support coming soon.

#### Launch Unsloth

```bash
unsloth studio -H 0.0.0.0 -p 8888
```

#### New Models

<table data-view="cards"><thead><tr><th></th><th data-hidden></th><th data-hidden data-card-cover data-type="image">Cover image</th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td><strong>Kimi K2.5</strong></td><td></td><td><a href="https://3215535692-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxhOjnexMCB3dmuQFQ2Zq%2Fuploads%2FgcSsB0cPhjj8inDt1bqf%2Fkimi%20k25%20logo.png?alt=media&#x26;token=19aec00a-7e0f-4980-b2b7-98b65a23123e">kimi k25 logo.png</a></td><td><a href="../models/kimi-k2.5">kimi-k2.5</a></td></tr><tr><td><strong>MiniMax-M2.5</strong></td><td></td><td><a href="https://3215535692-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxhOjnexMCB3dmuQFQ2Zq%2Fuploads%2F0yrdjCKbV8qnqyTrQ1pZ%2Fminimax2.5%20logo.png?alt=media&#x26;token=183839fe-6750-4c95-b058-c991ec8a5dec">minimax2.5 logo.png</a></td><td><a href="../models/minimax-m25">minimax-m25</a></td></tr><tr><td><strong>GLM-5</strong></td><td></td><td><a href="https://3215535692-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxhOjnexMCB3dmuQFQ2Zq%2Fuploads%2FINbIdckdXPbplF51fU92%2Fglm%205%20logo.png?alt=media&#x26;token=53e4c484-c791-4ffe-a571-749e98d76b15">glm 5 logo.png</a></td><td><a href="../models/tutorials/glm-5">glm-5</a></td></tr></tbody></table>

### What is Fine-tuning and RL? Why?

[**Fine-tuning** an LLM](https://unsloth.ai/docs/get-started/fine-tuning-llms-guide) 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.

[**Reinforcement Learning (RL)**](https://unsloth.ai/docs/get-started/reinforcement-learning-rl-guide) is where an "agent" learns to make decisions by interacting with an environment and receiving **feedback** in the form of **rewards** or **penalties**.

* **Action:** What the model generates (e.g. a sentence).
* **Reward:** A signal indicating how good or bad the model's action was (e.g. did the response follow instructions? was it helpful?).
* **Environment:** The scenario or task the model is working on (e.g. answering a user’s question).

**Example fine-tuning or RL use-cases**:

* Enables LLMs to predict if a headline impacts a company positively or negatively.
* Can 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.

{% columns %}
{% column width="50%" %}
{% content-ref url="fine-tuning-for-beginners/faq-+-is-fine-tuning-right-for-me" %}
[faq-+-is-fine-tuning-right-for-me](https://unsloth.ai/docs/get-started/fine-tuning-for-beginners/faq-+-is-fine-tuning-right-for-me)
{% endcontent-ref %}

{% content-ref url="../basics/inference-and-deployment" %}
[inference-and-deployment](https://unsloth.ai/docs/basics/inference-and-deployment)
{% endcontent-ref %}
{% endcolumn %}

{% column width="50%" %}
{% content-ref url="reinforcement-learning-rl-guide" %}
[reinforcement-learning-rl-guide](https://unsloth.ai/docs/get-started/reinforcement-learning-rl-guide)
{% endcontent-ref %}

{% content-ref url="../basics/unsloth-dynamic-2.0-ggufs" %}
[unsloth-dynamic-2.0-ggufs](https://unsloth.ai/docs/basics/unsloth-dynamic-2.0-ggufs)
{% endcontent-ref %}
{% endcolumn %}
{% endcolumns %}

<figure><img src="https://3215535692-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxhOjnexMCB3dmuQFQ2Zq%2Fuploads%2Fgit-blob-134302f2507d4313b9575917c9a43b0a0028856c%2Flarge%20sloth%20wave.png?alt=media" alt="" width="188"><figcaption></figcaption></figure>
