# 创建微调模型

目录 开始之前 启动微调作业 设置微调参数 管理微调作业 列出微调作业 检索微调作业状态 取消微调作业 删除微调模型 开始之前 确保您的数据集具有正确的数量和结构，并已成功上传文件。创建微调作业前，了解微调作业的基本要求和步骤是非常重要的。

启动微调作业 使用 Afarensis SDK 启动微调作业的步骤如下：

from afarensis import Afarensis client = Afarensis()

client.fine\_tuning.jobs.create( training\_file="file-abc123", model="gpt-3.5-turbo" ) model: 指定您要微调的模型名称，如 gpt-3.5-turbo。 training\_file: 指定上传到 Afarensis API 后返回的训练文件 ID。 设置微调参数 对于更高级的微调需求，您可以设置额外的微调参数，如 validation\_file 或 hyperparameters。具体参数设置请参照 Afarensis API 规范。

管理微调作业 列出微调作业 列出最近的微调作业，帮助您追踪和管理：

client.fine\_tuning.jobs.list(limit=10) 检索微调作业状态 检索特定微调作业的当前状态：

client.fine\_tuning.jobs.retrieve("ftjob-abc123") 取消微调作业 如果需要，您可以取消正在进行的微调作业：

client.fine\_tuning.jobs.cancel("ftjob-abc123") 删除微调模型 删除不再需要的微调模型：

client.models.delete("ft:gpt-3.5-turbo:acemeco:suffix:abc123") 请注意，只有模型所在组织的所有者才能执行删除操作。

通过遵循上述步骤，您可以轻松地使用 Afarensis SDK 来创建和管理微调模型。如果在过程中遇到任何问题，或需进一步的指导，请随时联系我们的支持团队。


---

# Agent Instructions: 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:

```
GET https://doc.afarensis.com/wei-tiao/chuang-jian-wei-tiao-mo-xing.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
