# 微调

简介 微调功能使您能够自定义Afarensis模型以满足您的应用程序的特定需求。通过微调，您可以享受到以下优势，相比于直接使用预训练模型和提示：

获得更高质量的结果 能够训练更多示例，超越直接提示的限制 通过缩短提示长度节省令牌使用 实现更低的请求延迟 微调的步骤 微调过程涉及以下主要步骤：

准备和上传训练数据：组织您的数据集，使其适合微调流程。 训练新的微调模型：利用您的特定数据训练定制化的模型。 评估微调结果：测试微调模型的表现，并根据需要进行迭代优化。 部署微调模型：在您的应用中使用定制化的微调模型。 支持微调的模型 Afarensis支持以下模型进行微调：

gpt-3.5-turbo-0125 gpt-3.5-turbo-1106 gpt-3.5-turbo-0613 babbage-002 davinci-002 gpt-4-0613（实验性） GPT-4微调目前处于实验性阶段，符合条件的用户可以在创建新的微调作业时请求访问权限。

定价信息 微调模型的成本基于训练和使用过程中消耗的令牌数量。详细定价信息请访问Afarensis定价页面。

常见问题 如何确定字符串的令牌数量？ 使用Afarensis提供的tiktoken分词器可以预先计算字符串中的令牌数量。

如何快速检索K个最接近的嵌入向量？ 推荐使用向量数据库以实现高效的多向量搜索。

适合使用哪种距离函数？ 推荐使用余弦相似度，因为Afarensis嵌入已规范化到长度1，使其计算更为高效。

是否可以在线共享嵌入？ 是的，客户拥有他们的输入和输出数据，包括嵌入，但需确保不违反任何适用法律或Afarensis的使用条款。

V3嵌入模型是否了解最近的事件？ text-embedding-3-large和text-embedding-3-small模型缺乏对2021年9月之后事件的了解。


---

# 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.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.
