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.



49027
49028
49029
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 49027

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)


48963
48964
48965
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 48963

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)


48969
48970
48971
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 48969

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)


48976
48977
48978
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 48976

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)


48981
48982
48983
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 48981

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)


48988
48989
48990
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 48988

def evaluate_interval
  @evaluate_interval
end

#learning_rate_multiplierFloat

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

Returns:

  • (Float)


48993
48994
48995
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 48993

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)


48999
49000
49001
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 48999

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)


49004
49005
49006
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 49004

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)


49010
49011
49012
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 49010

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)


49017
49018
49019
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 49017

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)


49025
49026
49027
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 49025

def thinking_level
  @thinking_level
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



49032
49033
49034
49035
49036
49037
49038
49039
49040
49041
49042
49043
49044
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 49032

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