> 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-llms-guide/what-model-should-i-use.md).

# 我应该使用哪个模型进行微调？

## Llama、Qwen、Mistral、Phi，还是？

在准备微调时，你面临的首要决定之一是选择合适的模型。下面是一份逐步指南，帮助你做出选择：

{% stepper %}
{% step %}
**选择与你的使用场景相匹配的模型**

* 例如，对于基于图像的训练，请选择如下视觉模型： *Llama 3.2 Vision*。对于代码数据集，可选择如下专用模型： *Qwen Coder 2.5*.
* **许可和要求**：不同模型可能具有特定的许可条款和 [系统要求](/docs/zh/kuai-su-kai-shi/fine-tuning-for-beginners/unsloth-requirements.md#system-requirements)。请务必仔细查看这些内容，以避免兼容性问题。
  {% endstep %}

{% step %}
**评估你的存储、算力容量和数据集**

* 使用我们的 [VRAM 指南](/docs/zh/kuai-su-kai-shi/fine-tuning-for-beginners/unsloth-requirements.md#approximate-vram-requirements-based-on-model-parameters) 来确定你所考虑模型的 VRAM 需求。
* 你的数据集将反映你将使用的模型类型以及训练所需的时间
  {% endstep %}

{% step %}
**选择模型和参数**

* 我们建议使用最新模型，以获得最佳性能和能力。例如，截至 2025 年 1 月，领先的 70B 模型是 *Llama 3.3*.
* 你可以通过浏览我们的 [模型目录](/docs/zh/kuai-su-kai-shi/unsloth-model-catalog.md) 来找到最新且相关的选项。
  {% endstep %}

{% step %}
**在基础模型和指令模型之间进行选择**

更多细节如下：
{% endstep %}
{% endstepper %}

## 指令模型还是基础模型？

在准备微调时，你面临的首要决定之一是使用指令模型还是基础模型。

### 指令模型

指令模型经过内置指令的预训练，无需任何微调即可直接使用。这些模型，包括 GGUF 和其他常见可用模型，都针对直接使用进行了优化，开箱即可对提示作出有效响应。指令模型可与 ChatML 或 ShareGPT 等对话式聊天模板配合使用。

### **基础模型**

另一方面，基础模型是未经指令微调的原始预训练版本。这些模型专为通过微调进行定制而设计，使你能够将它们适配到独特需求。基础模型兼容如下指令风格模板： [Alpaca 或 Vicuna](/docs/zh/ji-chu-zhi-shi/chat-templates.md)，但它们通常默认不支持对话式聊天模板。

### 我应该选择指令模型还是基础模型？

这个决定通常取决于你的数据数量、质量和类型：

* **1,000 行以上的数据**：如果你拥有一个超过 1,000 行的大型数据集，通常最好微调基础模型。
* **300–1,000 行高质量数据**：对于中等规模、高质量的数据集，微调基础模型或指令模型都是可行的选择。
* **少于 300 行**：对于较小的数据集，指令模型通常是更好的选择。微调指令模型可以让它适配特定需求，同时保留其内置的指令能力。这可确保它在没有额外输入的情况下也能遵循一般指令，除非你打算显著改变其功能。
* 关于你的数据集应有多大， [请看这里](/docs/zh/kuai-su-kai-shi/fine-tuning-llms-guide/datasets-guide.md#how-big-should-my-dataset-be)

## 使用 Unsloth 微调模型

你可以通过将模型名称与 Hugging Face 上的模型名称匹配，来把模型名称改成你喜欢的任何模型，例如：'unsloth/llama-3.1-8b-unsloth-bnb-4bit'。

我们建议从 **指令模型**开始，因为它们允许使用对话式聊天模板（ChatML、ShareGPT 等）直接进行微调，并且相比 **基础模型** （其使用 Alpaca、Vicuna 等）需要更少的数据。了解更多关于 [指令模型和基础模型的差异，请见此处](#instruct-or-base-model).

* 以 **`unsloth-bnb-4bit`** 结尾的模型名称表示它们是 [**Unsloth 动态 4 位**](https://unsloth.ai/blog/dynamic-4bit) **量化版本**。这些模型比标准的 BitsAndBytes 4 位模型占用略多的 VRAM，但准确率显著更高。
* 如果模型名称仅以 **`bnb-4bit`**&#x7ED3;尾，而不包含“unsloth”，则表示它是标准的 BitsAndBytes 4 位量化。
* 带有 **无后缀** 的模型处于其原始的 **16 位或 8 位格式**。虽然它们是来自官方模型创建者的原始模型，但我们有时会加入重要修复——例如聊天模板或分词器修复。因此，在可用时，建议使用我们的版本。

### 实验是关键

{% hint style="info" %}
我们建议在可能的情况下同时尝试这两个模型。分别进行微调并评估输出，看看哪个更符合你的目标。
{% endhint %}


---

# 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-llms-guide/what-model-should-i-use.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.
