

fine-tune a model in another programming language.use all the other Completions parameters like temperature, frequency_penalty, presence_penalty, etc., on your requests to fine-tuned models.try fine-tuning a different model other than davinci.add more data to improve completions and make the model production-ready.That's how to customize one of OpenAI's existing models to fit your own specific use case and data! What's Next for Fine-tuning OpenAI models? Then, rerun node finetune.js and you should see your new custom model deployed in action making a new completion according to the prompt you passed in!Īlternatively, you can test out your fine-tuned model in the OpenAI Playground.Ĭomplete code can be found here on GitHub. Replace YOUR-FINETUNED-MODEL-NAME with the model name from the previous step.

To get started, create a new Node.js project in an empty directory: You can get an OpenAI API Key here by clicking on + Create new secret key. Node.js installed - download Node.js hereĪfter making an OpenAI account, you'll need an API Key.OpenAI Account - create an OpenAI Account here.Once a model is fine-tuned, you won't need to provide samples via prompt anymore, helping you save on costs and enabling lower-latency requests.Īssuming the original task the model was trained for is similar to the new task, fine-tuning a model that has already been designed and trained allows developers to take advantage of what the model has already learned without having to develop it from scratch. Why Fine-tune?įine-tuning helps you achieve better results on a wide number of tasks. A model developed for a task is reused as the starting point for a model on a second task–for example, a model trained to specifically recognize pizza could be edited to recognize calzones.įine-tuning is similar to transfer learning in that it lets you modify and customize an existing ML model. Transfer learning is a machine learning method where you use knowledge that was gained from solving one problem and apply it to a new but related problem. OpenAI's models have been trained on a large amount of text from the web, but their training data is still finite and not as current as they could be: they still miss information on specific topics.
