GPT-3.5 Turbo Fine-Tuning

GPT-3.5 Turbo Fine-Tuning

OpenAI has upgraded GPT-3.5 Turbo with the capability for fine-tuning. Similar features for GPT-4 will be introduced in the coming autumn. This enhancement provides developers the advantage of tailoring models more aptly suited for their specific requirements.

Preliminary evaluations indicate that a fine-tuned GPT-3.5 Turbo can rival the foundational capabilities of GPT-4 in certain specific tasks. As is standard with their APIs, data transferred to and from the fine-tuning API remains the property of the client and is not used by OpenAI or any other entity for the training of different models.

Applications of GPT-3.5 Turbo Fine-tuning

Starting from GPT-3.5 Turbo release there has been a demand from developers and corporations to personalize the model to offer distinct and enhanced experiences to their clientele. Thanks to this development, developers now have the capacity to employ supervised fine-tuning to enhance the model’s proficiency in relation to their needs.

Throughout the private beta phase, those who used the fine-tuning service observed notable enhancements in model functionality in prevalent applications such as:

  • Enhanced Directability: Through fine-tuning, corporations can optimize the model’s obedience to directions, like generating succinct outputs or consistently replying in a specified language. For example, developers might fine-tune the model to consistently produce responses in German when instructed to do so.
  • Consistent Output Structuring: Fine-tuning augments the model’s proficiency in rendering responses with uniform formatting, an essential characteristic for tasks that require a particular response structure like code auto-completion or structuring API requests. Developers can harness fine-tuning to more dependably transform user directives into impeccable JSON segments for integration into their platforms.
  • Tailored Output Tone: Fine-tuning is an effective means to refine the model’s output’s qualitative attributes, such as its tone. This ensures it aligns more with a company’s branding. Enterprises with a distinct brand voice can utilize fine-tuning to ensure the model’s outputs resonate with their established tone.

Apart from heightened efficiency, fine-tuning also empowers enterprises to condense their prompts while maintaining comparable effectiveness. Fine-tuned GPT-3.5 Turbo can process up to 4k tokens. This is twice the capacity of their earlier fine-tuned models. Initial testers managed to diminish prompt lengths by as much as 90% by integrating the fine-tuning commands directly into the model, making each API request faster and more cost-effective.

Fine-tuning steps

It’s recommended to amalgamate fine-tuning with other methods like prompt engineering, data retrieval, and function invocation. You can find more insights in fine-tuning manual. Come autumn, they’ll be introducing support for function call fine-tuning and gpt-3.5-turbo-16k.

  1. Step 1: Prepare your data
  2. Step 2: Upload files
  3. Step 3: Create a fine-tuning job

Safety Precautions

Ensuring that the fine-tuning deployment is secure remains our paramount concern. In OpenAI’s commitment to maintaining the intrinsic safety features of the default model during fine-tuning, the data used for fine-tuning is processed by Moderation API. We also use a GPT-4 backed moderation system to identify and filter out any unsafe training data that might contravene our established safety protocols.

Pricing Breakdown

The cost structure for fine-tuning is consists of two primary components:

  1. the initial training cost
  2. usage cost

Pricing listed below:

  • Training Cost: $0.008 per 1K Tokens
  • Usage Input Fee: $0.012 per 1K Tokens
  • Usage Output Fee: $0.016 per 1K Tokens

To put it into perspective, should one engage in a gpt-3.5 turbo fine-tuning project with a training dataset comprising 100,000 tokens and spanning 3 epochs, the anticipated expense would total $2.40.

Regarding the pricing structure for both base GPT-3 models and their fine-tuned counterparts:

ModelBase modelsFine-tuned models
Input tokensOutput tokensTrainingInput tokensOutput tokens
babbage-002$0.0004 / 1K tokens$0.0004 / 1K tokens$0.0004 / 1K tokens$0.0016 / 1K tokens$0.0016 / 1K tokens
davinci-002$0.002 / 1K tokens$0.002 / 1K tokens$0.006 / 1K tokens$0.012 / 1K tokens$0.012 / 1K tokens

Recent Updates on GPT-3 Models

In the preceding month of July, we disclosed our intention to discontinue the original GPT-3 base models, namely ada, babbage, curie, and davinci, effective from January 4th, 2024. In their stead, OpenAI rolling out the babbage-002 and davinci-002 models. Interested clients can tap into these models by accessing the Completions API.

Further enhancements to the fine-tuning process one’s can avail through OpenAI’s freshly introduced API endpoint, designated as /v1/fine_tuning/jobs. This renovated endpoint boasts features like pagination, paving the way for increased adaptability and scalability, keeping in mind the projected advancements of the fine-tuning API.

Transitioning from the erstwhile /v1/fine-tunes to this newly minted endpoint is a seamless process, with a comprehensive guide provided in our updated fine-tuning manual.

Also, the former /v1/fine-tunes endpoint will be deeprecated on January 4th, 2024.

Read more related topics: