> 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/xin/studio/export.md).

# 使用 Unsloth Studio 导出模型

了解如何将你的 safetensor 或 LoRA 模型文件导出为 GGUF 或其他格式。

使用 [Unsloth Studio](/docs/zh/xin/studio.md) 可将模型导出、保存或转换为 GGUF、Safetensors 或 LoRA，用于在 Unsloth、llama.cpp、Ollama、vLLM 等环境中部署、共享或进行本地推理。导出已训练的检查点或转换任何现有模型。

<div data-with-frame="true"><figure><img src="https://2657992854-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxhOjnexMCB3dmuQFQ2Zq%2Fuploads%2FrrFY8YczW3dDpfYi1k9f%2FScreenshot%202026-03-15%20at%209.28.19%E2%80%AFPM.png?alt=media&amp;token=d2729e16-799f-48f0-8b07-0248b93fa599" alt="" width="563"><figcaption></figcaption></figure></div>

{% stepper %}
{% step %}

### 选择训练运行

首先选择要从中导出的训练运行。每次运行代表一个完整的训练会话，并可能包含多个检查点。

选择运行后，选择要导出的检查点。检查点是在训练过程中创建的模型已保存版本。

<div data-with-frame="true"><figure><img src="https://2657992854-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxhOjnexMCB3dmuQFQ2Zq%2Fuploads%2FzB12XFNP3UjoAT1l9vz3%2Fimage.png?alt=media&amp;token=021b8864-b2c5-4a92-927e-e23350610036" alt="" width="563"><figcaption></figcaption></figure></div>
{% endstep %}

{% step %}

### 选择检查点

较后期的检查点通常代表最终训练模型，但你可以根据需要导出任意检查点。

<div data-with-frame="true"><figure><img src="https://2657992854-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxhOjnexMCB3dmuQFQ2Zq%2Fuploads%2F8VfRPUcY3w6zYfNmAIDn%2Fimage.png?alt=media&amp;token=42565a7d-e62f-4cf0-bd33-90422f1b2194" alt="" width="560"><figcaption></figcaption></figure></div>
{% endstep %}

{% step %}

### 导出方法

根据你的工作流程，你可以导出合并模型、LoRA 适配器权重或用于本地推理的 GGUF 模型。

<div data-with-frame="true"><figure><img src="https://2657992854-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxhOjnexMCB3dmuQFQ2Zq%2Fuploads%2Fh4sPts9rJhHiGqf0UxIs%2Fimage.png?alt=media&amp;token=4f1d6a76-bd40-4471-ab8d-0b2fe33d0410" alt=""><figcaption></figcaption></figure></div>

每种导出方法都会生成不同版本的模型，具体取决于你计划如何运行或共享它。下表说明了每个选项导出的内容。

| 导出类型             | 描述                                                                     |
| ---------------- | ---------------------------------------------------------------------- |
| 合并模型             | **16 位模型** 将 LoRA 适配器合并到基础权重中。                                         |
| 仅 LoRA           | 导出 **仅适配器权重**。需要原始基础模型。                                                |
| GGUF / llama.cpp | 将模型转换为 **GGUF 格式** 用于 Unsloth / llama.cpp **/** Ollama / LM Studio 推理。 |
| {% endstep %}    |                                                                        |

{% step %}

### 导出 / 保存到本地

导出模型时，你可以选择结果文件的保存位置。模型可以直接下载到你的机器，或推送到 Hugging Face Hub 以进行托管和共享。

将导出的模型文件直接保存到你的机器上。此选项适用于在本地运行模型、手动分发文件或与本地推理工具集成。

<div data-with-frame="true"><figure><img src="https://2657992854-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxhOjnexMCB3dmuQFQ2Zq%2Fuploads%2FfsBaE8V2o69jSyCVGIz4%2Fimage.png?alt=media&amp;token=4ef3fa06-d25b-424a-91e3-42debd3b6908" alt="" width="325"><figcaption></figcaption></figure></div>
{% endstep %}

{% step %}

### 推送到 Hub

将导出的模型上传到 Hugging Face Hub。这使你可以从中心仓库托管、共享和部署模型。

发布模型需要 Hugging Face 写入令牌。

<div data-with-frame="true"><figure><img src="https://2657992854-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxhOjnexMCB3dmuQFQ2Zq%2Fuploads%2FrvVnuVUYQWv2nkrgFxpK%2Fimage.png?alt=media&amp;token=5e0b91fe-5225-4bff-9fa9-ec1fb3867b1a" alt="" width="325"><figcaption></figcaption></figure></div>

{% hint style="success" %}
如果你已经通过 Hugging Face CLI 完成身份验证，则写入令牌可以留空。
{% endhint %}
{% endstep %}
{% endstepper %}


---

# 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/xin/studio/export.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.
