Class DistillationSpec
Distillation tuning spec for tuning.
public record DistillationSpec : IEquatable<DistillationSpec>
- Inheritance
-
DistillationSpec
- 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
HyperParameters
Optional. Hyperparameters for Distillation.
[JsonPropertyName("hyperParameters")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public DistillationHyperParameters? HyperParameters { get; set; }
Property Value
PipelineRootDirectory
Deprecated. A path in a Cloud Storage bucket, which will be treated as the root output directory of the distillation pipeline. It is used by the system to generate the paths of output artifacts.
[JsonPropertyName("pipelineRootDirectory")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public string? PipelineRootDirectory { get; set; }
Property Value
PromptDatasetUri
Optional. 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
StudentModel
The student model that is being tuned, e.g., "google/gemma-2b-1.1-it". Deprecated. Use base_model instead.
[JsonPropertyName("studentModel")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public string? StudentModel { get; set; }
Property Value
TrainingDatasetUri
Deprecated. Cloud Storage path to file containing training dataset for tuning. The dataset must be formatted as a JSONL file.
[JsonPropertyName("trainingDatasetUri")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public string? TrainingDatasetUri { get; set; }
Property Value
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
TuningMode
Optional. Specifies the tuning mode for distillation (sft part). This feature is only available for open source models.
[JsonPropertyName("tuningMode")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public TuningMode? TuningMode { get; set; }
Property Value
ValidationDatasetUri
Optional. Cloud Storage path to file containing validation dataset for tuning. The dataset must be formatted as a JSONL file.
[JsonPropertyName("validationDatasetUri")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public string? ValidationDatasetUri { get; set; }
Property Value
Methods
FromJson(string, JsonSerializerOptions?)
Deserializes a JSON string to a DistillationSpec object.
public static DistillationSpec? FromJson(string jsonString, JsonSerializerOptions? options = null)
Parameters
jsonStringstringThe JSON string to deserialize.
optionsJsonSerializerOptionsOptional JsonSerializerOptions.
Returns
- DistillationSpec
The deserialized DistillationSpec object, or null if deserialization fails.