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