Class CreateTuningJobConfig.Builder
- Enclosing class:
- CreateTuningJobConfig
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract CreateTuningJobConfig.BuilderadapterSize(AdapterSize adapterSize) Setter for adapterSize.adapterSize(AdapterSize.Known knownType) Setter for adapterSize given a known enum.adapterSize(String adapterSize) Setter for adapterSize given a string.abstract CreateTuningJobConfig.BuilderbaseTeacherModel(String baseTeacherModel) Setter for baseTeacherModel.abstract CreateTuningJobConfig.BuilderSetter for batchSize.abstract CreateTuningJobConfig.BuilderSetter for beta.abstract CreateTuningJobConfigbuild()Clears the value of adapterSize field.Clears the value of baseTeacherModel field.Clears the value of batchSize field.Clears the value of beta field.Clears the value of customBaseModel field.Clears the value of description field.Clears the value of encryptionSpec field.Clears the value of epochCount field.Clears the value of evaluationConfig field.Clears the value of exportLastCheckpointOnly field.Clears the value of httpOptions field.Clears the value of labels field.Clears the value of learningRate field.Clears the value of learningRateMultiplier field.Clears the value of method field.Clears the value of outputUri field.Clears the value of preTunedModelCheckpointId field.Clears the value of sftLossWeightMultiplier field.Clears the value of tunedModelDisplayName field.Clears the value of tunedTeacherModelSource field.Clears the value of tuningMode field.Clears the value of validationDataset field.abstract CreateTuningJobConfig.BuildercustomBaseModel(String customBaseModel) Setter for customBaseModel.abstract CreateTuningJobConfig.Builderdescription(String description) Setter for description.abstract CreateTuningJobConfig.BuilderencryptionSpec(EncryptionSpec encryptionSpec) Setter for encryptionSpec.encryptionSpec(EncryptionSpec.Builder encryptionSpecBuilder) Setter for encryptionSpec builder.abstract CreateTuningJobConfig.BuilderepochCount(Integer epochCount) Setter for epochCount.abstract CreateTuningJobConfig.BuilderevaluationConfig(EvaluationConfig evaluationConfig) Setter for evaluationConfig.evaluationConfig(EvaluationConfig.Builder evaluationConfigBuilder) Setter for evaluationConfig builder.abstract CreateTuningJobConfig.BuilderexportLastCheckpointOnly(boolean exportLastCheckpointOnly) Setter for exportLastCheckpointOnly.abstract CreateTuningJobConfig.BuilderhttpOptions(HttpOptions httpOptions) Setter for httpOptions.httpOptions(HttpOptions.Builder httpOptionsBuilder) Setter for httpOptions builder.abstract CreateTuningJobConfig.BuilderSetter for labels.abstract CreateTuningJobConfig.BuilderlearningRate(Float learningRate) Setter for learningRate.abstract CreateTuningJobConfig.BuilderlearningRateMultiplier(Float learningRateMultiplier) Setter for learningRateMultiplier.abstract CreateTuningJobConfig.Buildermethod(TuningMethod method) Setter for method.method(TuningMethod.Known knownType) Setter for method given a known enum.Setter for method given a string.abstract CreateTuningJobConfig.BuilderSetter for outputUri.abstract CreateTuningJobConfig.BuilderpreTunedModelCheckpointId(String preTunedModelCheckpointId) Setter for preTunedModelCheckpointId.abstract CreateTuningJobConfig.BuildersftLossWeightMultiplier(Float sftLossWeightMultiplier) Setter for sftLossWeightMultiplier.abstract CreateTuningJobConfig.BuildertunedModelDisplayName(String tunedModelDisplayName) Setter for tunedModelDisplayName.abstract CreateTuningJobConfig.BuildertunedTeacherModelSource(String tunedTeacherModelSource) Setter for tunedTeacherModelSource.abstract CreateTuningJobConfig.BuildertuningMode(TuningMode tuningMode) Setter for tuningMode.tuningMode(TuningMode.Known knownType) Setter for tuningMode given a known enum.tuningMode(String tuningMode) Setter for tuningMode given a string.abstract CreateTuningJobConfig.BuildervalidationDataset(TuningValidationDataset validationDataset) Setter for validationDataset.validationDataset(TuningValidationDataset.Builder validationDatasetBuilder) Setter for validationDataset builder.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
httpOptions
Setter for httpOptions.httpOptions: Used to override HTTP request options.
-
httpOptions
@CanIgnoreReturnValue public CreateTuningJobConfig.Builder httpOptions(HttpOptions.Builder httpOptionsBuilder) Setter for httpOptions builder.httpOptions: Used to override HTTP request options.
-
clearHttpOptions
Clears the value of httpOptions field. -
method
Setter for method.method: The method to use for tuning (SUPERVISED_FINE_TUNING or PREFERENCE_TUNING or DISTILLATION). If not set, the default method (SFT) will be used.
-
clearMethod
Clears the value of method field. -
method
Setter for method given a known enum.method: The method to use for tuning (SUPERVISED_FINE_TUNING or PREFERENCE_TUNING or DISTILLATION). If not set, the default method (SFT) will be used.
-
method
Setter for method given a string.method: The method to use for tuning (SUPERVISED_FINE_TUNING or PREFERENCE_TUNING or DISTILLATION). If not set, the default method (SFT) will be used.
-
validationDataset
public abstract CreateTuningJobConfig.Builder validationDataset(TuningValidationDataset validationDataset) Setter for validationDataset.validationDataset: Validation dataset for tuning. The dataset must be formatted as a JSONL file.
-
validationDataset
@CanIgnoreReturnValue public CreateTuningJobConfig.Builder validationDataset(TuningValidationDataset.Builder validationDatasetBuilder) Setter for validationDataset builder.validationDataset: Validation dataset for tuning. The dataset must be formatted as a JSONL file.
-
clearValidationDataset
Clears the value of validationDataset field. -
tunedModelDisplayName
Setter for tunedModelDisplayName.tunedModelDisplayName: The display name of the tuned Model. The name can be up to 128 characters long and can consist of any UTF-8 characters.
-
clearTunedModelDisplayName
Clears the value of tunedModelDisplayName field. -
description
Setter for description.description: The description of the TuningJob
-
clearDescription
Clears the value of description field. -
epochCount
Setter for epochCount.epochCount: Number of complete passes the model makes over the entire training dataset during training.
-
clearEpochCount
Clears the value of epochCount field. -
learningRateMultiplier
Setter for learningRateMultiplier.learningRateMultiplier: Multiplier for adjusting the default learning rate. 1P models only. Mutually exclusive with learning_rate.
-
clearLearningRateMultiplier
Clears the value of learningRateMultiplier field. -
exportLastCheckpointOnly
public abstract CreateTuningJobConfig.Builder exportLastCheckpointOnly(boolean exportLastCheckpointOnly) Setter for exportLastCheckpointOnly.exportLastCheckpointOnly: If set to true, disable intermediate checkpoints and only the last checkpoint will be exported. Otherwise, enable intermediate checkpoints.
-
clearExportLastCheckpointOnly
Clears the value of exportLastCheckpointOnly field. -
preTunedModelCheckpointId
public abstract CreateTuningJobConfig.Builder preTunedModelCheckpointId(String preTunedModelCheckpointId) Setter for preTunedModelCheckpointId.preTunedModelCheckpointId: The optional checkpoint id of the pre-tuned model to use for tuning, if applicable.
-
clearPreTunedModelCheckpointId
Clears the value of preTunedModelCheckpointId field. -
adapterSize
Setter for adapterSize.adapterSize: Adapter size for tuning.
-
clearAdapterSize
Clears the value of adapterSize field. -
adapterSize
Setter for adapterSize given a known enum.adapterSize: Adapter size for tuning.
-
adapterSize
Setter for adapterSize given a string.adapterSize: Adapter size for tuning.
-
tuningMode
Setter for tuningMode.tuningMode: Tuning mode for SFT tuning.
-
clearTuningMode
Clears the value of tuningMode field. -
tuningMode
Setter for tuningMode given a known enum.tuningMode: Tuning mode for SFT tuning.
-
tuningMode
Setter for tuningMode given a string.tuningMode: Tuning mode for SFT tuning.
-
customBaseModel
Setter for customBaseModel.customBaseModel: Custom base model for tuning. This is only supported for OSS models in Vertex.
-
clearCustomBaseModel
Clears the value of customBaseModel field. -
batchSize
Setter for batchSize.batchSize: The batch size hyperparameter for tuning. This is only supported for OSS models in Vertex.
-
clearBatchSize
Clears the value of batchSize field. -
learningRate
Setter for learningRate.learningRate: The learning rate for tuning. OSS models only. Mutually exclusive with learning_rate_multiplier.
-
clearLearningRate
Clears the value of learningRate field. -
evaluationConfig
Setter for evaluationConfig.evaluationConfig: Evaluation config for the tuning job.
-
evaluationConfig
@CanIgnoreReturnValue public CreateTuningJobConfig.Builder evaluationConfig(EvaluationConfig.Builder evaluationConfigBuilder) Setter for evaluationConfig builder.evaluationConfig: Evaluation config for the tuning job.
-
clearEvaluationConfig
Clears the value of evaluationConfig field. -
labels
Setter for labels.labels: 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.
-
clearLabels
Clears the value of labels field. -
beta
Setter for beta.beta: Weight for KL Divergence regularization, Preference Optimization tuning only.
-
clearBeta
Clears the value of beta field. -
baseTeacherModel
Setter for baseTeacherModel.baseTeacherModel: The base teacher model that is being distilled. Distillation only.
-
clearBaseTeacherModel
Clears the value of baseTeacherModel field. -
tunedTeacherModelSource
public abstract CreateTuningJobConfig.Builder tunedTeacherModelSource(String tunedTeacherModelSource) Setter for tunedTeacherModelSource.tunedTeacherModelSource: The resource name of the Tuned teacher model. Distillation only.
-
clearTunedTeacherModelSource
Clears the value of tunedTeacherModelSource field. -
sftLossWeightMultiplier
public abstract CreateTuningJobConfig.Builder sftLossWeightMultiplier(Float sftLossWeightMultiplier) Setter for sftLossWeightMultiplier.sftLossWeightMultiplier: Multiplier for adjusting the weight of the SFT loss. Distillation only.
-
clearSftLossWeightMultiplier
Clears the value of sftLossWeightMultiplier field. -
outputUri
Setter for outputUri.outputUri: The Google Cloud Storage location where the tuning job outputs are written.
-
clearOutputUri
Clears the value of outputUri field. -
encryptionSpec
Setter for 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.
-
encryptionSpec
@CanIgnoreReturnValue public CreateTuningJobConfig.Builder encryptionSpec(EncryptionSpec.Builder encryptionSpecBuilder) Setter for encryptionSpec builder.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.
-
clearEncryptionSpec
Clears the value of encryptionSpec field. -
build
-