Create fine-tune

POST {{baseUrl}}/fine-tunes

Creates a job that fine-tunes a specified model from a given dataset.

Models eligble for fine tuning are: ada, babbage, curie, or davinci

The dataset (training file) should be formatted like below (JSONL)

{"prompt": "<prompt>", "completion": "<ideal generated text>"}
{"prompt": "<prompt>", "completion": "<ideal generated text>"}
{"prompt": "<prompt>", "completion": "<ideal generated text>"}

For example:

{"prompt": "Why did the chicken cross the road?", "completion": "Why not?"}
{"prompt": "Why did the chicken use AI?", "completion": "To get to the other side"}

Note that after a job completes it may take several minutes for your model to become ready to handle requests.

Request Body

{"training_file"=>"file-vGxE9KywnSUkEL6dv9qZxKAF", "model"=>"davinci"}

RESPONSES

status: OK

{&quot;object&quot;:&quot;fine-tune&quot;,&quot;id&quot;:&quot;ft-MH3TkRzJrC62xWaudm1aHqC5&quot;,&quot;hyperparams&quot;:{&quot;n_epochs&quot;:4,&quot;batch_size&quot;:null,&quot;prompt_loss_weight&quot;:0.01,&quot;learning_rate_multiplier&quot;:null},&quot;organization_id&quot;:&quot;org-6dmqkbEsO2sA55h8sMAzZdMz&quot;,&quot;model&quot;:&quot;davinci&quot;,&quot;training_files&quot;:[{&quot;object&quot;:&quot;file&quot;,&quot;id&quot;:&quot;file-vGxE9KywnSUkEL6dv9qZxKAF&quot;,&quot;purpose&quot;:&quot;fine-tune&quot;,&quot;filename&quot;:&quot;my-custom-model.jsonl&quot;,&quot;bytes&quot;:159,&quot;created_at&quot;:1679529088,&quot;status&quot;:&quot;processed&quot;,&quot;status_details&quot;:null}],&quot;validation_files&quot;:[],&quot;result_files&quot;:[],&quot;created_at&quot;:1679529396,&quot;updated_at&quot;:1679529396,&quot;status&quot;:&quot;pending&quot;,&quot;fine_tuned_model&quot;:null,&quot;events&quot;:[{&quot;object&quot;:&quot;fine-tune-event&quot;,&quot;level&quot;:&quot;info&quot;,&quot;message&quot;:&quot;Created fine-tune: ft-MH3TkRzJrC62xWaudm1aHqC5&quot;,&quot;created_at&quot;:1679529396}]}