Class PreferenceOptimizationHyperParameters
Hyperparameters for Preference Optimization. This data type is not supported in Gemini API.
public record PreferenceOptimizationHyperParameters : IEquatable<PreferenceOptimizationHyperParameters>
- Inheritance
-
PreferenceOptimizationHyperParameters
- Implements
- Inherited Members
Properties
AdapterSize
Optional. Adapter size for preference optimization.
[JsonPropertyName("adapterSize")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public AdapterSize? AdapterSize { get; set; }
Property Value
Beta
Optional. Weight for KL Divergence regularization.
[JsonPropertyName("beta")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public double? Beta { get; set; }
Property Value
EpochCount
Optional. Number of complete passes the model makes over the entire training dataset during training.
[JsonPropertyName("epochCount")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonConverter(typeof(StringToNullableLongConverter))]
public long? EpochCount { get; set; }
Property Value
- long?
LearningRateMultiplier
Optional. Multiplier for adjusting the default learning rate.
[JsonPropertyName("learningRateMultiplier")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public double? LearningRateMultiplier { get; set; }
Property Value
Methods
FromJson(string, JsonSerializerOptions?)
Deserializes a JSON string to a PreferenceOptimizationHyperParameters object.
public static PreferenceOptimizationHyperParameters? FromJson(string jsonString, JsonSerializerOptions? options = null)
Parameters
jsonStringstringThe JSON string to deserialize.
optionsJsonSerializerOptionsOptional JsonSerializerOptions.
Returns
- PreferenceOptimizationHyperParameters
The deserialized PreferenceOptimizationHyperParameters object, or null if deserialization fails.