API allows training ChatGPT on your own documents

Getty Images

On Tuesday, OpenAI announced the ability to fine-tune GPT-3.5 Turbo, the AI model that powers ChatGPT, through its API. This allows users to train the model with custom data, such as company documents or project documentation, and achieve performance similar to GPT-4 at a lower cost in specific scenarios.

The Power of Fine-Tuning

In the field of AI, fine-tuning involves taking a pretrained neural network like GPT-3.5 Turbo and training it further on a smaller dataset that is specific to a particular task. This process leverages the initial knowledge of the model and refines it for a specific application.

Essentially, fine-tuning enables GPT-3.5 Turbo to learn about custom content, making it ideal for building AI assistants tailored to specific products or services. This is particularly useful when the model lacks knowledge of the product or service in its training data, which was scraped from the web before September 2021.

“Since the release of GPT-3.5 Turbo, developers and businesses have asked for the ability to customize the model to create unique and differentiated experiences for their users,” writes OpenAI on its promotional blog. “With this launch, developers can now run supervised fine-tuning to make this model perform better for their use cases.”

While GPT-4 is known for its adaptability, it is slower and more expensive to run compared to GPT-3.5. OpenAI positions 3.5 fine-tuning as a cost-effective solution for achieving GPT-4-level performance in a specific knowledge domain. Early tests have shown that a fine-tuned version of GPT-3.5 Turbo can even outperform the base GPT-4 on certain narrow tasks.

Advertisement

Enlarge / An artist’s depiction of an encounter with a fine-tuned version of ChatGPT.

Benj Edwards / Stable Diffusion / OpenAI

OpenAI highlights several benefits of fine-tuned models. It offers improved steerability, allowing the model to better follow instructions. It also provides reliable output formatting, ensuring consistent text output in formats such as API calls or JSON. Additionally, fine-tuning allows for custom tone, enabling chatbots to have a unique flavor or personality.

Developers can reduce prompt size and save money on OpenAI API calls by fine-tuning instructions directly into the model itself. OpenAI claims that early testers have been able to reduce prompt size by up to 90%. Currently, the context length for fine-tuning is set at 4,000 tokens, with plans to extend it to the 16,000-token model in the near future.

Understanding the Costs

Using your own data to train GPT-3.5 Turbo comes with associated costs. OpenAI breaks down the expenses into training costs and usage costs. Training the model costs $0.008 per 1,000 tokens, while API access during usage costs $0.012 per 1,000 tokens for text input and $0.016 per 1,000 tokens for text output.

Advertisement

Comparatively, the base 4k GPT-3.5 Turbo model is priced at $0.0015 per 1,000 tokens for input and $0.002 per 1,000 tokens for output. Therefore, the fine-tuned model is approximately eight times more expensive to run. However, OpenAI suggests that the reduced need for prompting in the fine-tuned model can lead to savings in specific cases.

Despite the higher cost, fine-tuning GPT-3.5 Turbo with custom documents can be worthwhile for certain users. It is important to note that while customization is possible, ensuring the accuracy and reliability of GPT-3.5 Turbo outputs in a production environment is a separate challenge. The model has a tendency to confabulate information, so caution is advised.

In terms of data privacy, OpenAI assures users that data sent to and from the fine-tuning API is not used for training AI models. However, customer fine-tuning training data will be passed through GPT-4 for moderation purposes using OpenAI’s recently announced moderation API. This contributes to the cost of the fine-tuning service.

For those seeking even greater capabilities, OpenAI plans to introduce fine-tuning for GPT-4 in the near future. While GPT-4 offers improved reliability, fine-tuning that model or the rumored collaboration of 8 models working together will likely be significantly more expensive.

Editor Notes

OpenAI’s introduction of fine-tuning for GPT-3.5 Turbo opens up exciting possibilities for developers and businesses. The ability to customize the model to achieve better performance in specific use cases is a game-changer. However, it is crucial to understand the costs involved and the potential limitations of the model. As AI continues to advance, it is important to leverage its power responsibly while maintaining accuracy and reliability.

Explore the latest news and advancements in AI at the GPT News Room.

Source link

from GPT News Room https://ift.tt/WLYQ1mI

Leave a comment