Interface CreateTuningJobConfig

Fine-tuning job creation request - optional fields.

interface CreateTuningJobConfig {
    abortSignal?: AbortSignal;
    adapterSize?: AdapterSize;
    batchSize?: number;
    beta?: number;
    description?: string;
    epochCount?: number;
    exportLastCheckpointOnly?: boolean;
    httpOptions?: HttpOptions;
    labels?: Record<string, string>;
    learningRate?: number;
    learningRateMultiplier?: number;
    method?: TuningMethod;
    preTunedModelCheckpointId?: string;
    tunedModelDisplayName?: string;
    validationDataset?: TuningValidationDataset;
}

Properties

abortSignal?: AbortSignal

Abort signal which can be used to cancel the request.

NOTE: AbortSignal is a client-only operation. Using it to cancel an operation will not cancel the request in the service. You will still be charged usage for any applicable operations.

adapterSize?: AdapterSize

Adapter size for tuning.

batchSize?: number

The batch size hyperparameter for tuning. If not set, a default of 4 or 16 will be used based on the number of training examples.

beta?: number

Weight for KL Divergence regularization, Preference Optimization tuning only.

description?: string

The description of the TuningJob

epochCount?: number

Number of complete passes the model makes over the entire training dataset during training.

exportLastCheckpointOnly?: boolean

If set to true, disable intermediate checkpoints and only the last checkpoint will be exported. Otherwise, enable intermediate checkpoints.

httpOptions?: HttpOptions

Used to override HTTP request options.

labels?: Record<string, string>

Optional. The labels with user-defined metadata to organize TuningJob and generated resources such as Model and Endpoint. Label keys and values can be no longer than 64 characters (Unicode codepoints), can only contain lowercase letters, numeric characters, underscores and dashes. International characters are allowed. See https://goo.gl/xmQnxf for more information and examples of labels.

learningRate?: number

The learning rate hyperparameter for tuning. If not set, a default of 0.001 or 0.0002 will be calculated based on the number of training examples.

learningRateMultiplier?: number

Multiplier for adjusting the default learning rate.

method?: TuningMethod

The method to use for tuning (SUPERVISED_FINE_TUNING or PREFERENCE_TUNING). If not set, the default method (SFT) will be used.

preTunedModelCheckpointId?: string

The optional checkpoint id of the pre-tuned model to use for tuning, if applicable.

tunedModelDisplayName?: string

The display name of the tuned Model. The name can be up to 128 characters long and can consist of any UTF-8 characters.

validationDataset?: TuningValidationDataset

Validation dataset for tuning. The dataset must be formatted as a JSONL file.