Class SupervisedHyperParameters
Hyperparameters for SFT. This data type is not supported in Gemini API.
public record SupervisedHyperParameters : IEquatable<SupervisedHyperParameters>
- Inheritance
-
SupervisedHyperParameters
- Implements
- Inherited Members
Properties
AdapterSize
Optional. Adapter size for tuning.
[JsonPropertyName("adapterSize")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public AdapterSize? AdapterSize { get; set; }
Property Value
BatchSize
Optional. Batch size for tuning. This feature is only available for open source models.
[JsonPropertyName("batchSize")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonConverter(typeof(StringToNullableLongConverter))]
public long? BatchSize { get; set; }
Property Value
- long?
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?
LearningRate
Optional. Learning rate for tuning. Mutually exclusive with learning_rate_multiplier. This
feature is only available for open source models.
[JsonPropertyName("learningRate")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public double? LearningRate { get; set; }
Property Value
LearningRateMultiplier
Optional. Multiplier for adjusting the default learning rate. Mutually exclusive with
learning_rate. This feature is only available for 1P models.
[JsonPropertyName("learningRateMultiplier")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public double? LearningRateMultiplier { get; set; }
Property Value
Methods
FromJson(string, JsonSerializerOptions?)
Deserializes a JSON string to a SupervisedHyperParameters object.
public static SupervisedHyperParameters? FromJson(string jsonString, JsonSerializerOptions? options = null)
Parameters
jsonStringstringThe JSON string to deserialize.
optionsJsonSerializerOptionsOptional JsonSerializerOptions.
Returns
- SupervisedHyperParameters
The deserialized SupervisedHyperParameters object, or null if deserialization fails.