Class: Google::Apis::AiplatformV1beta1::GoogleCloudAiplatformV1beta1ReinforcementTuningHyperParameters

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/aiplatform_v1beta1/classes.rb,
lib/google/apis/aiplatform_v1beta1/representations.rb,
lib/google/apis/aiplatform_v1beta1/representations.rb

Overview

Hyperparameters for Reinforcement Tuning.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudAiplatformV1beta1ReinforcementTuningHyperParameters

Returns a new instance of GoogleCloudAiplatformV1beta1ReinforcementTuningHyperParameters.



47844
47845
47846
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 47844

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#adapter_sizeString

Optional. Adapter size for Reinforcement Tuning. Corresponds to the JSON property adapterSize

Returns:

  • (String)


47780
47781
47782
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 47780

def adapter_size
  @adapter_size
end

#batch_sizeFixnum

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. Corresponds to the JSON property batchSize

Returns:

  • (Fixnum)


47786
47787
47788
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 47786

def batch_size
  @batch_size
end

#checkpoint_intervalFixnum

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 Corresponds to the JSON property checkpointInterval

Returns:

  • (Fixnum)


47793
47794
47795
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 47793

def checkpoint_interval
  @checkpoint_interval
end

#epoch_countFixnum

Optional. Number of training epoches for the tuning job. Corresponds to the JSON property epochCount

Returns:

  • (Fixnum)


47798
47799
47800
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 47798

def epoch_count
  @epoch_count
end

#evaluate_intervalFixnum

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 Corresponds to the JSON property evaluateInterval

Returns:

  • (Fixnum)


47805
47806
47807
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 47805

def evaluate_interval
  @evaluate_interval
end

#learning_rate_multiplierFloat

Optional. Learning rate multiplier for Reinforcement Tuning. Corresponds to the JSON property learningRateMultiplier

Returns:

  • (Float)


47810
47811
47812
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 47810

def learning_rate_multiplier
  @learning_rate_multiplier
end

#max_output_tokensFixnum

Optional. The maximum number of tokens to generate per prompt. Default to 32768. Corresponds to the JSON property maxOutputTokens

Returns:

  • (Fixnum)


47816
47817
47818
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 47816

def max_output_tokens
  @max_output_tokens
end

#samples_per_promptFixnum

Optional. Number of different responses to generate per prompt during tuning. Corresponds to the JSON property samplesPerPrompt

Returns:

  • (Fixnum)


47821
47822
47823
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 47821

def samples_per_prompt
  @samples_per_prompt
end

#step_countFixnum

Optional. Number of steps for the tuning job (mutually exclusive with epoch_count). Corresponds to the JSON property stepCount

Returns:

  • (Fixnum)


47827
47828
47829
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 47827

def step_count
  @step_count
end

#thinking_budgetFixnum

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). Corresponds to the JSON property thinkingBudget

Returns:

  • (Fixnum)


47834
47835
47836
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 47834

def thinking_budget
  @thinking_budget
end

#thinking_levelString

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. Corresponds to the JSON property thinkingLevel

Returns:

  • (String)


47842
47843
47844
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 47842

def thinking_level
  @thinking_level
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



47849
47850
47851
47852
47853
47854
47855
47856
47857
47858
47859
47860
47861
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 47849

def update!(**args)
  @adapter_size = args[:adapter_size] if args.key?(:adapter_size)
  @batch_size = args[:batch_size] if args.key?(:batch_size)
  @checkpoint_interval = args[:checkpoint_interval] if args.key?(:checkpoint_interval)
  @epoch_count = args[:epoch_count] if args.key?(:epoch_count)
  @evaluate_interval = args[:evaluate_interval] if args.key?(:evaluate_interval)
  @learning_rate_multiplier = args[:learning_rate_multiplier] if args.key?(:learning_rate_multiplier)
  @max_output_tokens = args[:max_output_tokens] if args.key?(:max_output_tokens)
  @samples_per_prompt = args[:samples_per_prompt] if args.key?(:samples_per_prompt)
  @step_count = args[:step_count] if args.key?(:step_count)
  @thinking_budget = args[:thinking_budget] if args.key?(:thinking_budget)
  @thinking_level = args[:thinking_level] if args.key?(:thinking_level)
end