Discover Issues, Share Solutions.

ChatGPT Fine-Tuning

ChatGPT GPT-3.5 Turbo Model Fine-Tuning - Chinese Version

OpenAI officially announced GPT-3.5 Turbo fine-tuning and API updates some time ago. Today, I tried out the training process briefly. By following the steps on the official website, you can successfully complete the training in four steps. The training process takes about 10 minutes, though the duration depends on the amount of training data you have. The first step is to prepare the fine-tuning data by saving it as a text file with a .json extension (such as turbo35.json). Each line must be a complete JSON object, and the file needs to contain at least 10 lines of training data. {"messages": [{ "role": "system", "content": "你是一个故事大王,能讲很多小故事" }, { "role": "user", "content": "给我讲一个故事" }, { "role": "assistant", "content": "一天,一个学生去学校上课" }]} {"messages": [{ "role": "user", "content": "给我讲一个关于小狗的故事" }, { "role": "assistant", "content": "一天,一只小狗溜进了动物园" }]} {"messages": [{ "role": "user", "content": "给我讲一个关于小猫的故事" }, { "role": "assistant", "content": "一天,一只小猫溜进了厨房" }]} {"messages": [{ "role": "user", "content": "给我讲一个关于小猪的故事" }, { "role": "assistant", "content": "一天,一只小猪睡了一整天" }]} {"messages": [{ "role": "user", "content": "给我讲一个关于小鸡的故事" }, { "role": "assistant", "content": "一天,一只小鸡飞了起来" }]} {"messages": [{ "role": "user", "content": "给我讲一个关于小鸭的故事" }, { "role": "assistant", "content": "一天,一只小鸭有过了一条河" }]} {"messages": [{ "role": "user", "content": "给我讲一个关于小鸟的故事" }, { "role": "assistant", "content": "一天,一只小鸟站在一颗大树上" }]} {"messages": [{ "role": "user", "content": "给我讲一个关于小虫的故事" }, { "role": "assistant", "content": "一天,一只小虫吃了一大片树叶" }]} {"messages": [{ "role": "user", "content": "给我讲一个关于小女孩的故事" }, { "role": "assistant", "content": "一天,一个小女孩跳了一支舞" }]} {"messages": [{ "role": "user", "content": "给我讲一个关于小男孩的故事" }, { "role": "assistant", "content": "一天,一小男孩踢了一场球" }]} The second step is to call the v1/files endpoint to upload the fine-tuning data file prepared in the first step (@turbo35.json, which can be a relative or absolute path). curl https://www.openai-api.top/v1/files -H "Authorization: Bearer 这里填入你自己的ChatGPT API Key" -F "purpose=fine-tune" -F "[email protected]" After calling the endpoint, you will receive a response with data in a format similar to the following: