Table of Contents

Class Hyperparameters

Namespace
GenerativeAI.Types
Assembly
GenerativeAI.dll

Hyperparameters controlling the tuning process. Read more at https://ai.google.dev/docs/model_tuning_guidance

public class Hyperparameters
Inheritance
Hyperparameters
Inherited Members
Extension Methods

Properties

AdapterSize

Optional. Adapter size for tuning.

[JsonPropertyName("adapterSize")]
public AdapterSize? AdapterSize { get; set; }

Property Value

AdapterSize?

BatchSize

Immutable. 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.

[JsonPropertyName("batchSize")]
public int? BatchSize { get; set; }

Property Value

int?

EpochCount

Immutable. The number of training epochs. An epoch is one pass through the training data. If not set, a default of 5 will be used.

[JsonPropertyName("epochCount")]
public int? EpochCount { get; set; }

Property Value

int?

LearningRate

Optional. Immutable. 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.

[JsonPropertyName("learningRate")]
public double? LearningRate { get; set; }

Property Value

double?

LearningRateMultiplier

Optional. Immutable. The learning rate multiplier is used to calculate a final learningRate based on the default (recommended) value. Actual learning rate := learningRateMultiplier * default learning rate Default learning rate is dependent on base model and dataset size. If not set, a default of 1.0 will be used.

[JsonPropertyName("learningRateMultiplier")]
public double? LearningRateMultiplier { get; set; }

Property Value

double?

See Also