Class: OpenAI::Models::FineTuning::SupervisedHyperparameters

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/openai/models/fine_tuning/supervised_hyperparameters.rb

Defined Under Namespace

Modules: BatchSize, LearningRateMultiplier, NEpochs

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Internal::Type::BaseModel

==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml

Methods included from Internal::Type::Converter

#coerce, coerce, #dump, dump, #inspect, inspect, type_info

Methods included from Internal::Util::SorbetRuntimeSupport

#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type

Constructor Details

#initialize(batch_size: nil, learning_rate_multiplier: nil, n_epochs: nil) ⇒ Object

Some parameter documentations has been truncated, see OpenAI::Models::FineTuning::SupervisedHyperparameters for more details.

The hyperparameters used for the fine-tuning job.

Parameters:

  • batch_size (Symbol, :auto, Integer) (defaults to: nil)

    Number of examples in each batch. A larger batch size means that model parameter

  • learning_rate_multiplier (Symbol, :auto, Float) (defaults to: nil)

    Scaling factor for the learning rate. A smaller learning rate may be useful to a

  • n_epochs (Symbol, :auto, Integer) (defaults to: nil)

    The number of epochs to train the model for. An epoch refers to one full cycle t



# File 'lib/openai/models/fine_tuning/supervised_hyperparameters.rb', line 29

Instance Attribute Details

#batch_sizeSymbol, ...

Number of examples in each batch. A larger batch size means that model parameters are updated less frequently, but with lower variance.

Returns:

  • (Symbol, :auto, Integer, nil)


12
# File 'lib/openai/models/fine_tuning/supervised_hyperparameters.rb', line 12

optional :batch_size, union: -> { OpenAI::FineTuning::SupervisedHyperparameters::BatchSize }

#learning_rate_multiplierSymbol, ...

Scaling factor for the learning rate. A smaller learning rate may be useful to avoid overfitting.

Returns:

  • (Symbol, :auto, Float, nil)


19
20
# File 'lib/openai/models/fine_tuning/supervised_hyperparameters.rb', line 19

optional :learning_rate_multiplier,
union: -> { OpenAI::FineTuning::SupervisedHyperparameters::LearningRateMultiplier }

#n_epochsSymbol, ...

The number of epochs to train the model for. An epoch refers to one full cycle through the training dataset.

Returns:

  • (Symbol, :auto, Integer, nil)


27
# File 'lib/openai/models/fine_tuning/supervised_hyperparameters.rb', line 27

optional :n_epochs, union: -> { OpenAI::FineTuning::SupervisedHyperparameters::NEpochs }

Class Method Details

.variantsArray(Symbol, :auto, Float)

Returns:

  • (Array(Symbol, :auto, Float))


# File 'lib/openai/models/fine_tuning/supervised_hyperparameters.rb', line 52