Class CreateTuningJobConfig
- Namespace
- GenerativeAI.Types
- Assembly
- GenerativeAI.dll
Optional configuration for TuneAsync(string, TuningDataset, CreateTuningJobConfig?, CancellationToken), mirroring
CreateTuningJobConfig of the google-genai SDK.
public class CreateTuningJobConfig
- Inheritance
-
CreateTuningJobConfig
- Inherited Members
- Extension Methods
Remarks
Most options are Vertex AI only. On the Gemini API only TunedModelDisplayName, EpochCount, LearningRateMultiplier, BatchSize and LearningRate are supported; setting any other option throws NotSupportedException.
Properties
AdapterSize
Adapter size for tuning.
public AdapterSize? AdapterSize { get; set; }
Property Value
BaseTeacherModel
The base teacher model that is being distilled. Distillation only.
public string? BaseTeacherModel { get; set; }
Property Value
BatchSize
The batch size hyperparameter.
public int? BatchSize { get; set; }
Property Value
- int?
Beta
Weight for KL Divergence regularization. Preference tuning only.
public double? Beta { get; set; }
Property Value
CheckpointInterval
How often, in steps, to save checkpoints. Reinforcement tuning only.
public int? CheckpointInterval { get; set; }
Property Value
- int?
CompositeRewardConfig
Composite reward function configuration. Reinforcement tuning only.
public CompositeReinforcementTuningRewardConfig? CompositeRewardConfig { get; set; }
Property Value
CustomBaseModel
Custom base model weights (Cloud Storage path). Open source models only.
public string? CustomBaseModel { get; set; }
Property Value
Description
The description of the tuning job.
public string? Description { get; set; }
Property Value
EncryptionSpec
Customer-managed encryption key options for the tuning job.
public EncryptionSpec? EncryptionSpec { get; set; }
Property Value
EpochCount
Number of complete passes over the training dataset.
public int? EpochCount { get; set; }
Property Value
- int?
EvaluateInterval
How often, in steps, to evaluate during training. Reinforcement tuning only.
public int? EvaluateInterval { get; set; }
Property Value
- int?
EvaluationConfig
Evaluation config for the tuning job. Requires at least one metric and an output config.
public EvaluationConfig? EvaluationConfig { get; set; }
Property Value
ExportLastCheckpointOnly
If true, disable intermediate checkpoints and only export the last checkpoint.
public bool? ExportLastCheckpointOnly { get; set; }
Property Value
- bool?
Labels
User-defined labels for the tuning job and the resources it creates.
public Dictionary<string, string>? Labels { get; set; }
Property Value
LearningRate
The learning rate. Mutually exclusive with LearningRateMultiplier.
public double? LearningRate { get; set; }
Property Value
LearningRateMultiplier
Multiplier for adjusting the default learning rate. Mutually exclusive with LearningRate.
public double? LearningRateMultiplier { get; set; }
Property Value
MaxOutputTokens
The maximum number of tokens to generate per prompt. Reinforcement tuning only.
public int? MaxOutputTokens { get; set; }
Property Value
- int?
Method
The tuning method. Defaults to SUPERVISED_FINE_TUNING.
public TuningMethod? Method { get; set; }
Property Value
OutputUri
The Cloud Storage location where the tuning job outputs are written.
public string? OutputUri { get; set; }
Property Value
PreTunedModelCheckpointId
The checkpoint id of the pre-tuned model to continue tuning from (when the base model is a tuned model).
public string? PreTunedModelCheckpointId { get; set; }
Property Value
RewardConfig
Single reward function configuration. Reinforcement tuning only.
public SingleReinforcementTuningRewardConfig? RewardConfig { get; set; }
Property Value
SamplesPerPrompt
Number of different responses to generate per prompt. Reinforcement tuning only.
public int? SamplesPerPrompt { get; set; }
Property Value
- int?
SftLossWeightMultiplier
Multiplier for adjusting the weight of the SFT loss. Distillation only.
public double? SftLossWeightMultiplier { get; set; }
Property Value
ThinkingLevel
The maximum thinking depth. Reinforcement tuning only.
public ReinforcementTuningThinkingLevel? ThinkingLevel { get; set; }
Property Value
TunedModelDisplayName
The display name of the tuned model (up to 128 UTF-8 characters).
public string? TunedModelDisplayName { get; set; }
Property Value
TunedTeacherModelSource
The resource name of the tuned teacher model. Distillation only.
public string? TunedTeacherModelSource { get; set; }
Property Value
TuningMode
Tuning mode (supervised fine tuning and distillation only).
public TuningMode? TuningMode { get; set; }
Property Value
ValidationDataset
Validation dataset for tuning (JSONL).
public TuningValidationDataset? ValidationDataset { get; set; }
Property Value
ValidationDatasetUri
Cloud Storage path of the JSONL validation dataset. Reinforcement tuning only.
public string? ValidationDatasetUri { get; set; }