Class ReinforcementTuningHyperParameters

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

@InternalApi public abstract class ReinforcementTuningHyperParameters extends JsonSerializable
Hyperparameters for Reinforcement Tuning.
  • Constructor Details

    • ReinforcementTuningHyperParameters

      public ReinforcementTuningHyperParameters()
  • Method Details

    • epochCount

      public abstract Optional<Long> epochCount()
      Optional. Number of training epoches for the tuning job.
    • learningRateMultiplier

      public abstract Optional<Float> learningRateMultiplier()
      Learning rate multiplier for Reinforcement Learning.
    • adapterSize

      public abstract Optional<AdapterSize> adapterSize()
      Optional. Adapter size for Reinforcement Tuning.
    • samplesPerPrompt

      public abstract Optional<Integer> samplesPerPrompt()
      Optional. Number of different responses to generate per prompt during tuning.
    • batchSize

      public abstract Optional<Integer> batchSize()
      Optional. Batch size for the tuning job. How many prompts to process at a train step. If not set, the batch size will be determined automatically.
    • evaluateInterval

      public abstract Optional<Integer> evaluateInterval()
      Optional. How often at steps to evaluate the tuning job during training. If not set, evel will be run per epoch. `total_steps = epoch_count * samples_per_prompt / total_prompts_in_dataset`
    • checkpointInterval

      public abstract Optional<Integer> checkpointInterval()
      Optional. How often at steps to save checkpoints during training. If not set, one checkpoint per epoch will be set. ```total_steps = epoch_count * samples_per_prompt / total_prompts_in_dataset```
    • maxOutputTokens

      public abstract Optional<Integer> maxOutputTokens()
      Optional. The maximum number of tokens to generate per prompt. Default to 32768.
    • thinkingLevel

      public abstract Optional<ReinforcementTuningThinkingLevel> thinkingLevel()
      Indicates the maximum thinking depth during tuning. Starting from Gemini 3.5 models, the old thinking_budget will no longer be supported and will result in a user error if set. Instead, users should use the thinking_level parameter to control the maximum thinking depth.
    • thinkingBudget

      public abstract Optional<Integer> thinkingBudget()
      Optional. The thinking budget for the tuning job to optimize for (Gemini 2.5 only). * -1 means dynamic thinking * 0 means no thinking * > 0 means thinking budget in tokens If not set, default to -1 (dynamic thinking).
    • builder

      Instantiates a builder for ReinforcementTuningHyperParameters.
    • toBuilder

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

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