Class CreateTuningJobConfig

java.lang.Object
com.google.genai.JsonSerializable
com.google.genai.types.CreateTuningJobConfig

public abstract class CreateTuningJobConfig extends JsonSerializable
Supervised fine-tuning job creation request - optional fields.
  • Constructor Details

    • CreateTuningJobConfig

      public CreateTuningJobConfig()
  • Method Details

    • httpOptions

      public abstract Optional<HttpOptions> httpOptions()
      Used to override HTTP request options.
    • validationDataset

      public abstract Optional<TuningValidationDataset> validationDataset()
      Cloud Storage path to file containing training dataset for tuning. The dataset must be formatted as a JSONL file.
    • tunedModelDisplayName

      public abstract Optional<String> 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.
    • description

      public abstract Optional<String> description()
      The description of the TuningJob
    • epochCount

      public abstract Optional<Integer> epochCount()
      Number of complete passes the model makes over the entire training dataset during training.
    • learningRateMultiplier

      public abstract Optional<Float> learningRateMultiplier()
      Multiplier for adjusting the default learning rate.
    • exportLastCheckpointOnly

      public abstract Optional<Boolean> exportLastCheckpointOnly()
      If set to true, disable intermediate checkpoints for SFT and only the last checkpoint will be exported. Otherwise, enable intermediate checkpoints for SFT.
    • preTunedModelCheckpointId

      public abstract Optional<String> preTunedModelCheckpointId()
      The optional checkpoint id of the pre-tuned model to use for tuning, if applicable.
    • adapterSize

      public abstract Optional<AdapterSize> adapterSize()
      Adapter size for tuning.
    • batchSize

      public abstract Optional<Integer> batchSize()
      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.
    • learningRate

      public abstract Optional<Float> learningRate()
      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.
    • labels

      public abstract Optional<Map<String,String>> 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.
    • builder

      public static CreateTuningJobConfig.Builder builder()
      Instantiates a builder for CreateTuningJobConfig.
    • toBuilder

      public abstract CreateTuningJobConfig.Builder toBuilder()
      Creates a builder with the same values as this instance.
    • fromJson

      public static CreateTuningJobConfig fromJson(String jsonString)
      Deserializes a JSON string to a CreateTuningJobConfig object.