Interface CreateTuningJobConfig

Fine-tuning job creation request - optional fields.

interface CreateTuningJobConfig {
    abortSignal?: AbortSignal;
    adapterSize?: AdapterSize;
    baseTeacherModel?: string;
    batchSize?: number;
    beta?: number;
    customBaseModel?: string;
    description?: string;
    encryptionSpec?: EncryptionSpec;
    epochCount?: number;
    exportLastCheckpointOnly?: boolean;
    httpOptions?: HttpOptions;
    labels?: Record<string, string>;
    learningRate?: number;
    learningRateMultiplier?: number;
    method?: TuningMethod;
    outputUri?: string;
    preTunedModelCheckpointId?: string;
    sftLossWeightMultiplier?: number;
    tunedModelDisplayName?: string;
    tunedTeacherModelSource?: string;
    tuningMode?: TuningMode;
    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.

baseTeacherModel?: string

The base teacher model that is being distilled. Distillation only.

batchSize?: number

The batch size hyperparameter for tuning. This is only supported for OSS models in Vertex.

beta?: number

Weight for KL Divergence regularization, Preference Optimization tuning only.

customBaseModel?: string

Custom base model for tuning. This is only supported for OSS models in Vertex.

description?: string

The description of the TuningJob

encryptionSpec?: EncryptionSpec

The encryption spec of the tuning job. Customer-managed encryption key options for a TuningJob. If this is set, then all resources created by the TuningJob will be encrypted with provided encryption key.

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 for tuning. OSS models only. Mutually exclusive with learning_rate_multiplier.

learningRateMultiplier?: number

Multiplier for adjusting the default learning rate. 1P models only. Mutually exclusive with learning_rate.

method?: TuningMethod

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

outputUri?: string

The Google Cloud Storage location where the tuning job outputs are written.

preTunedModelCheckpointId?: string

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

sftLossWeightMultiplier?: number

Multiplier for adjusting the weight of the SFT loss. Distillation only.

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.

tunedTeacherModelSource?: string

The resource name of the Tuned teacher model. Distillation only.

tuningMode?: TuningMode

Tuning mode for SFT tuning.

validationDataset?: TuningValidationDataset

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