Table of Contents

Class DistillationSamplingSpec

Namespace
Google.GenAI.Types
Assembly
Google.GenAI.dll

Distillation sampling spec for tuning.

public record DistillationSamplingSpec : IEquatable<DistillationSamplingSpec>
Inheritance
DistillationSamplingSpec
Implements
Inherited Members

Properties

BaseTeacherModel

The base teacher model that is being distilled. See Supported models (https://cloud.google.com/vertex-ai/generative-ai/docs/model-reference/tuning#supported_models).

[JsonPropertyName("baseTeacherModel")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public string? BaseTeacherModel { get; set; }

Property Value

string

Hyperparameters

Hyperparameters for distillation tuning.

[JsonPropertyName("hyperparameters")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public DistillationHyperParameters? Hyperparameters { get; set; }

Property Value

DistillationHyperParameters

PromptDatasetUri

Cloud Storage path to file containing prompt dataset for distillation. The dataset must be formatted as a JSONL file.

[JsonPropertyName("promptDatasetUri")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public string? PromptDatasetUri { get; set; }

Property Value

string

TunedTeacherModelSource

The resource name of the Tuned teacher model. Format: projects/{project}/locations/{location}/models/{model}.

[JsonPropertyName("tunedTeacherModelSource")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public string? TunedTeacherModelSource { get; set; }

Property Value

string

ValidationDatasetUri

Cloud Storage path to file containing validation dataset for distillation. The dataset must be formatted as a JSONL file.

[JsonPropertyName("validationDatasetUri")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public string? ValidationDatasetUri { get; set; }

Property Value

string

Methods

FromJson(string, JsonSerializerOptions?)

Deserializes a JSON string to a DistillationSamplingSpec object.

public static DistillationSamplingSpec? FromJson(string jsonString, JsonSerializerOptions? options = null)

Parameters

jsonString string

The JSON string to deserialize.

options JsonSerializerOptions

Optional JsonSerializerOptions.

Returns

DistillationSamplingSpec

The deserialized DistillationSamplingSpec object, or null if deserialization fails.