Fine-tune
Start fine-tuning jobs to train a model on your dataset.
The following APIs can be used to fine-tune any model on the Forefront platform. For more information on fine-tuning, see our guide.
Use the following cURL command to upload your dataset. The server will respond with the Dataset object. You will need to use the Dataset ID to start a fine-tuning job.
Example request
Example response
curl \
-F [email protected] http://beta-api.forefront.ai/api/upload/v1/{team_id}/datasets \
-H "Authorization: Bearer <api_key>"
{
"data":{
"id":"{dataset_id}",
"name":"dataset.jsonl",
"size":60626026,
"orgId":"{org_id}",
"createdBy":"6154b531eae00108bf4b4434",
"createdAt":"2022-08-04T19:18:18.084Z",
"numSamples":64679,
"validatedAt":"2022-08-04T19:18:22.944Z",
"issues":{
"errors":"0"
}
}
}
Next, you'll need to get the ID of the model that you want to fine-tune.
get
https://beta-api.forefront.ai
/api/v1/{team_id}/models/listPublic
Get models
Return a list of models and their associated IDs.
Parameters
Header
Authorization*
Bearer <YOUR_PLATFORM_KEY>
Platform keys can be found in Settings -> API Keys
Responses
200: OK
Models successfully returned.
Once you have your dataset and model ID, you can start a fine-tuning job.
get
https://beta-api.forefront.ai
/api/v1/{team_id}/fine-tune/create
Create fine-tuning job
Use your dataset and model ID to start a fine-tuning job.
Parameters
Header
Authorization*
String
Body
name*
String
A name for your fine-tuning job.
description
String
A description for your fine-tuning job.
prompts*
Array of objects
Test prompts for your model checkpoints to provide completions for. It accepts an array of objects with each object being a valid Completions body. Learn more about test prompts.
Responses
200: OK
Fine-tuning job successfully started
Last modified 1mo ago