> For the complete documentation index, see [llms.txt](https://unsloth.ai/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://unsloth.ai/docs/zh/kuai-su-kai-shi/fine-tuning-for-beginners/unsloth-requirements.md).

# Unsloth 要求

以下是 Unsloth 的要求，包括系统和 GPU VRAM 要求。

Unsloth 可通过三种方式使用：我们的 [Unsloth Desktop](/docs/zh/desktop.md) 应用，我们的 [Unsloth Studio](/docs/zh/xin/studio/install.md) Web UI，或通过 [Unsloth Core](#unsloth-core-requirements)，原始的基于代码版本。每种方式有不同的要求。

## **Unsloth 要求**

* **Mac：** 训练、MLX 和 GGUF 推理均完全支持。
* **CPU：Unsloth 在没有 GPU 的情况下仍然可以运行**，用于聊天 + 数据配方。
* **训练：** 适用于 **NVIDIA**, **AMD**, **Intel** GPU 和 **Mac** 设备

### <i class="fa-windows">:windows:</i> Window**s**

Unsloth Studio 可直接在 Windows 上运行，无需 WSL。要训练模型，请确保你的系统满足以下要求：

**要求**

* Windows 10 或 Windows 11（64 位）
* 已安装驱动程序的 NVIDIA GPU
* **App Installer** （包括 `winget`): [这里](https://learn.microsoft.com/en-us/windows/msix/app-installer/install-update-app-installer)
* **Git**: `winget install --id Git.Git -e --source winget`
* **Python**：3.11 版起至 3.14 版之前
* 在 Python 环境中工作，例如 **uv**, **venv**，或者 **conda/mamba**

### <i class="fa-apple">:apple:</i> MacOS

Unsloth Studio 可在 MacOS 设备上运行，并完全支持训练、MLX 和 GGUF 推理。

* macOS 12 Monterey 或更新版本（Intel 或 Apple Silicon）
* 安装 Homebrew： [这里](https://brew.sh/)
* Git： `brew install git`&#x20;
* cmake： `brew install cmake`&#x20;
* openssl： `brew install openssl`
* Python：版本 3.11 至 3.14 之前
* 在 Python 环境中工作，例如 **uv**, **venv**，或者 **conda/mamba**

### <i class="fa-linux">:linux:</i> Linux 和 WSL

* Ubuntu 20.04+ 或类似发行版（64 位）
* 已安装驱动程序的 NVIDIA GPU
* CUDA 工具包（推荐 12.4+，Blackwell 需 12.8+）
* Git： `sudo apt install git`
* Python：版本 3.11 至 3.14 之前
* 在 Python 环境中工作，例如 **uv**, **venv**，或者 **conda/mamba**

### <i class="fa-microchip">:microchip:</i> 仅 CPU

Unsloth Studio 支持 CPU 设备用于 [聊天版](#run-models-locally) 用于 GGUF 模型和 [数据配方](/docs/zh/xin/studio/data-recipe.md) ([导出](/docs/zh/xin/studio/export.md) 即将推出）

* 与上面提到的 Linux 相同（除 NVIDIA GPU 驱动外）以及 MacOS。

### **训练**

Unsloth Studio 训练目前可在 NVIDIA、 [AMD](/docs/zh/kuai-su-kai-shi/install/amd.md)、MLX、Intel 设备上运行。你仍然可以使用 [原始的 Unsloth Core](#unsloth-requirements) 在 AMD 和 Intel 设备上进行训练。 **Python 3.11–3.13** 是必需的。

| 要求           | Linux / WSL                   | Windows                        |
| ------------ | ----------------------------- | ------------------------------ |
| **Git**      | 通常已预装                         | 由安装脚本安装（`winget`)              |
| **CMake**    | 已预装或 `sudo apt install cmake` | 由安装脚本安装（`winget`)              |
| **C++ 编译器**  | `build-essential`             | Visual Studio Build Tools 2022 |
| **CUDA 工具包** | 可选； `nvcc` 自动检测               | 由安装脚本安装（与驱动匹配）                 |

## Unsloth Core 要求

* **操作系统**：可在 Linux 和 [Windows](https://docs.unsloth.ai/get-started/install-and-update/windows-installation)
* 支持自 2018+ 起的 NVIDIA GPU，包括 [Blackwell RTX 50](/docs/zh/bo-ke/fine-tuning-llms-with-blackwell-rtx-50-series-and-unsloth.md) 和 [DGX Spark](/docs/zh/bo-ke/fine-tuning-llms-with-nvidia-dgx-spark-and-unsloth.md)
* 最低 CUDA 能力 7.0（V100、T4、Titan V、RTX 20 和 50、A100、H100、L40 等） [检查你的 GPU！](https://developer.nvidia.com/cuda-gpus) GTX 1070、1080 可以使用，但速度较慢。
* 官方 [Unsloth Docker 镜像](https://hub.docker.com/r/unsloth/unsloth) `unsloth/unsloth` 可在 Docker Hub 上获取
  * [Docker](/docs/zh/kuai-su-kai-shi/install/docker.md)
* Unsloth 可在 [AMD](/docs/zh/kuai-su-kai-shi/install/amd.md) 和 [Intel](/docs/zh/kuai-su-kai-shi/install/intel.md) GPU 上运行（请参阅我们的 [具体指南](/docs/zh/kuai-su-kai-shi/install.md)）。Apple/Silicon/MLX 正在开发中
* 你的设备应具备 `xformers`, `torch`, `BitsandBytes` 和 `triton` 支持。
* 如果你有不同版本的 torch、transformers 等， `pip install unsloth` 将自动安装这些库的所有最新版本，因此你无需担心版本兼容性。

{% hint style="info" %}
支持 Python 3.13！
{% endhint %}

### 微调 VRAM 要求：

使用 Unsloth 进行 LLM 微调需要多少 GPU 内存？

{% hint style="info" %}
当你出现 OOM 或内存不足时，一个常见问题是你把 batch size 设得太高。将其设为 1、2 或 3 以使用更少的 VRAM。

**有关上下文长度基准，请参阅** [**这里**](/docs/zh/ji-chu-zhi-shi/unsloth-benchmarks.md#context-length-benchmarks)**.**
{% endhint %}

请查看此表，其中按模型参数和微调方法列出了 VRAM 要求。QLoRA 使用 4 位，LoRA 使用 16 位。请注意，某些模型可能需要更多 VRAM，因此这些数值是绝对最低值：

| 模型参数 | QLoRA（4 位）VRAM | LoRA（16 位）VRAM |
| ---- | -------------- | -------------- |
| 3B   | 3.5 GB         | 8 GB           |
| 7B   | 5 GB           | 19 GB          |
| 8B   | 6 GB           | 22 GB          |
| 9B   | 6.5 GB         | 24 GB          |
| 11B  | 7.5 GB         | 29 GB          |
| 14B  | 8.5 GB         | 33 GB          |
| 27B  | 22GB           | 64GB           |
| 32B  | 26 GB          | 76 GB          |
| 40B  | 30GB           | 96GB           |
| 70B  | 41 GB          | 164 GB         |
| 81B  | 48GB           | 192GB          |
| 90B  | 53GB           | 212GB          |
| 405B | 237 GB         | 950 GB         |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://unsloth.ai/docs/zh/kuai-su-kai-shi/fine-tuning-for-beginners/unsloth-requirements.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
