Skip to main content
POST
cURL

Authorizations

Authorization
string
header
required

Authorization: Bearer <your API key> -- the same key as inference. A key reaches the account it belongs to and no other.

Path Parameters

account
string
required

Your account id -- the one in the console's address bar (my-account for this key). It must be the account the key belongs to.

Maximum string length: 64

Body

application/json
baseModel
string
required

The model to fine-tune, as a full resource name (accounts/maas/models/your-base-model). Only base models offered for training are accepted -- the console's Training page lists them.

The model to fine-tune, as a full resource name (accounts/maas/models/your-base-model). Only base models offered for training are accepted -- the console's Training page lists them.

The model to fine-tune, as a full resource name (accounts/maas/models/your-base-model). Only base models offered for training are accepted -- the console's Training page lists them.

The model to fine-tune, as a full resource name (accounts/maas/models/your-base-model). Only base models offered for training are accepted -- the console's Training page lists them.

Maximum string length: 256
inputDatasetVersion
string
required

The training data: a dataset (accounts/{account}/datasets/{dataset}) to use its latest version, or one version (…/versions/{n}) to pin it. The dataset must be READY.

The preference data: a dataset to use its latest version, or one version to pin it. Each row needs a prompt and two answers -- see the dataset format guide. The dataset must be READY.

The training data: a dataset (accounts/{account}/datasets/{dataset}) to use its latest version, or one version (…/versions/{n}) to pin it. The dataset must be READY.

The training data: a dataset (accounts/{account}/datasets/{dataset}) to use its latest version, or one version (…/versions/{n}) to pin it. The dataset must be READY.

Maximum string length: 256
config
object
required

How to train. outputModelId is required: the id of the model the job will create, which must not already exist in your account. The rest are optional -- loraRank, learningRate (a string, e.g. "1e-4"), epochs (1-100), batchSize, maxContextLength (longer examples are skipped and counted, never truncated), earlyStop, evalAutoCarveoutBasisPoints (0-9999, in hundredths of a percent), lrSchedule (constant, cosine or linear_decay), warmupSteps, and dpoBeta (preference jobs only; a string, default "0.1"). Fixed once the job is created.

How to train. outputModelId is required: the id of the model the job will create, which must not already exist in your account. The rest are optional -- loraRank, learningRate (a string, e.g. "1e-4"), epochs (1-100), batchSize, maxContextLength (longer examples are skipped and counted, never truncated), earlyStop, evalAutoCarveoutBasisPoints (0-9999, in hundredths of a percent), lrSchedule (constant, cosine or linear_decay), warmupSteps, and dpoBeta (preference jobs only; a string, default "0.1"). Fixed once the job is created.

How to train. outputModelId is required: the id of the model the job will create, which must not already exist in your account. The rest are optional -- loraRank, learningRate (a string, e.g. "1e-4"), epochs (1-100), batchSize, maxContextLength (longer examples are skipped and counted, never truncated), earlyStop, evalAutoCarveoutBasisPoints (0-9999, in hundredths of a percent), lrSchedule (constant, cosine or linear_decay), warmupSteps, and dpoBeta (preference jobs only; a string, default "0.1"). Fixed once the job is created.

How to train. outputModelId is required: the id of the model the job will create, which must not already exist in your account. The rest are optional -- loraRank, learningRate (a string, e.g. "1e-4"), epochs (1-100), batchSize, maxContextLength (longer examples are skipped and counted, never truncated), earlyStop, evalAutoCarveoutBasisPoints (0-9999, in hundredths of a percent), lrSchedule (constant, cosine or linear_decay), warmupSteps, and dpoBeta (preference jobs only; a string, default "0.1"). Fixed once the job is created.

evaluationDatasetVersion
string

Accepted so that the body of a create can be sent unchanged, but not used: the estimate covers the training data only.

Optional held-out data to measure evaluation loss on, in the same form as inputDatasetVersion. Leave it empty and set config.evalAutoCarveoutBasisPoints to hold out a share of the training data instead, or leave both empty for no evaluation.

Accepted so that the body of a create can be sent unchanged, but not used: the estimate covers the training data only.

Optional held-out data to measure evaluation loss on, in the same form as inputDatasetVersion. Leave it empty and set config.evalAutoCarveoutBasisPoints to hold out a share of the training data instead, or leave both empty for no evaluation.

Maximum string length: 256

Response

OK.

estimate
object
egress
object