> 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/kai-shi-shi-yong/fine-tuning-for-beginners/unsloth-requirements.md).

# Unsloth 要求

Unsloth 可以通过两种方式使用：通过 [Unsloth Studio](/docs/zh/xin/studio/install.md)，网页界面，或通过 [Unsloth Core](#unsloth-core-requirements)，原始的基于代码版本。每种方式都有不同的要求。

## **Unsloth Studio 要求**

* **Mac：** 训练、MLX 和 GGUF 推理均全部支持。
* **CPU：Unsloth 即使没有 GPU 也仍然可用**，用于聊天 + 数据配方。
* **训练：** 适用于 **NVIDIA**：RTX 30、40、50、Blackwell、DGX Spark/Station 等 + **Intel** GPU

### <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 GPU 上运行，AMD、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/kai-shi-shi-yong/install/docker.md)
* Unsloth 可运行于 [AMD](/docs/zh/kai-shi-shi-yong/install/amd.md) 和 [Intel](/docs/zh/kai-shi-shi-yong/install/intel.md) GPU（请遵循我们的 [特定指南](/docs/zh/kai-shi-shi-yong/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/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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
