Resource: TuningJob
Represents a TuningJob that runs with Google owned models.
name 
 
  string 
 
Output only. Identifier. Resource name of a TuningJob. Format: projects/{project}/locations/{location}/tuningJobs/{tuningJob} 
tunedModelDisplayName 
 
  string 
 
Optional. The display name of the  TunedModel 
 
. The name can be up to 128 characters long and can consist of any UTF-8 characters. For continuous tuning, tunedModelDisplayName will by default use the same display name as the pre-tuned model. If a new display name is provided, the tuning job will create a new model instead of a new version.
description 
 
  string 
 
Optional. The description of the  TuningJob 
 
.
customBaseModel 
 
  string 
 
Optional. The user-provided path to custom model weights. Set this field to tune a custom model. The path must be a Cloud Storage directory that contains the model weights in .safetensors format along with associated model metadata files. If this field is set, the baseModel field must still be set to indicate which base model the custom model is derived from. This feature is only available for open source models.
state 
 
  enum (  JobState 
 
) 
 
Output only. The detailed state of the job.
createTime 
 
  string (  Timestamp 
 
format) 
 
Output only. time when the  TuningJob 
 
was created.
Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: "2014-10-02T15:01:23Z" 
, "2014-10-02T15:01:23.045123456Z" 
or "2014-10-02T15:01:23+05:30" 
.
startTime 
 
  string (  Timestamp 
 
format) 
 
Output only. time when the  TuningJob 
 
for the first time entered the JOB_STATE_RUNNING 
state.
Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: "2014-10-02T15:01:23Z" 
, "2014-10-02T15:01:23.045123456Z" 
or "2014-10-02T15:01:23+05:30" 
.
endTime 
 
  string (  Timestamp 
 
format) 
 
Output only. time when the TuningJob entered any of the following  JobStates 
 
: JOB_STATE_SUCCEEDED 
, JOB_STATE_FAILED 
, JOB_STATE_CANCELLED 
, JOB_STATE_EXPIRED 
.
Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: "2014-10-02T15:01:23Z" 
, "2014-10-02T15:01:23.045123456Z" 
or "2014-10-02T15:01:23+05:30" 
.
updateTime 
 
  string (  Timestamp 
 
format) 
 
Output only. time when the  TuningJob 
 
was most recently updated.
Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: "2014-10-02T15:01:23Z" 
, "2014-10-02T15:01:23.045123456Z" 
or "2014-10-02T15:01:23+05:30" 
.
error 
 
  object (  Status 
 
) 
 
Output only. Only populated when job's state is JOB_STATE_FAILED 
or JOB_STATE_CANCELLED 
.
labels 
 
  map (key: string, value: string) 
 
Optional. The labels with user-defined metadata to organize  TuningJob 
 
and generated resources such as  Model 
 
and  Endpoint 
 
.
label keys and values can be no longer than 64 characters (Unicode codepoints), can only contain lowercase letters, numeric characters, underscores and dashes. International characters are allowed.
See https://goo.gl/xmQnxf for more information and examples of labels.
experiment 
 
  string 
 
Output only. The Experiment associated with this  TuningJob 
 
.
tunedModel 
 
  object (  TunedModel 
 
) 
 
Output only. The tuned model resources associated with this  TuningJob 
 
.
tuningDataStats 
 
  object (  TuningDataStats 
 
) 
 
Output only. The tuning data statistics associated with this  TuningJob 
 
.
pipelineJob
 (deprecated) 
 
 
  string 
 
Output only. The resource name of the PipelineJob associated with the  TuningJob 
 
. Format: projects/{project}/locations/{location}/pipelineJobs/{pipelineJob} 
.
encryptionSpec 
 
  object (  EncryptionSpec 
 
) 
 
Customer-managed encryption key options for a TuningJob. If this is set, then all resources created by the TuningJob will be encrypted with the provided encryption key.
serviceAccount 
 
  string 
 
The service account that the tuningJob workload runs as. If not specified, the Vertex AI Secure Fine-Tuned service Agent in the project will be used. See https://cloud.google.com/iam/docs/service-agents#vertex-ai-secure-fine-tuning-service-agent
Users starting the pipeline must have the iam.serviceAccounts.actAs 
permission on this service account.
outputUri 
 
  string 
 
Optional. Cloud Storage path to the directory where tuning job outputs are written to. This field is only available and required for open source models.
evaluateDatasetRuns[] 
 
  object (  EvaluateDatasetRun 
 
) 
 
Output only. Evaluation runs for the Tuning Job.
satisfiesPzs 
 
  boolean 
 
Output only. reserved for future use.
satisfiesPzi 
 
  boolean 
 
Output only. reserved for future use.
source_model 
 
  Union type 
 
 source_model 
can be only one of the following:baseModel 
 
  string 
 
The base model that is being tuned. See Supported models .
tuning_spec 
 
  Union type 
 
 tuning_spec 
can be only one of the following:supervisedTuningSpec 
 
  object (  SupervisedTuningSpec 
 
) 
 
Tuning Spec for Supervised Fine Tuning.
distillationSpec 
 
  object (  DistillationSpec 
 
) 
 
Tuning Spec for Distillation.
partnerModelTuningSpec 
 
  object (  PartnerModelTuningSpec 
 
) 
 
Tuning Spec for open sourced and third party Partner models.
veoTuningSpec 
 
  object (  VeoTuningSpec 
 
) 
 
Tuning Spec for Veo Tuning.
| JSON representation | 
|---|
| { "name" : string , "tunedModelDisplayName" : string , "description" : string , "customBaseModel" : string , "state" : enum ( | 
SupervisedTuningSpec
Tuning Spec for Supervised Tuning for first party models.
trainingDatasetUri 
 
  string 
 
Required. Training dataset used for tuning. The dataset can be specified as either a Cloud Storage path to a JSONL file or as the resource name of a Vertex Multimodal Dataset.
validationDatasetUri 
 
  string 
 
Optional. Validation dataset used for tuning. The dataset can be specified as either a Cloud Storage path to a JSONL file or as the resource name of a Vertex Multimodal Dataset.
hyperParameters 
 
  object (  SupervisedHyperParameters 
 
) 
 
Optional. Hyperparameters for SFT.
exportLastCheckpointOnly 
 
  boolean 
 
Optional. If set to true, disable intermediate checkpoints for SFT and only the last checkpoint will be exported. Otherwise, enable intermediate checkpoints for SFT. Default is false.
evaluationConfig 
 
  object (  EvaluationConfig 
 
) 
 
Optional. Evaluation Config for Tuning Job.
tuningMode 
 
  enum (  TuningMode 
 
) 
 
Tuning mode.
| JSON representation | 
|---|
| { "trainingDatasetUri" : string , "validationDatasetUri" : string , "hyperParameters" : { object ( | 
SupervisedHyperParameters
Hyperparameters for SFT.
epochCount 
 
  string ( int64 
format) 
 
Optional. Number of complete passes the model makes over the entire training dataset during training.
learningRateMultiplier 
 
  number 
 
Optional. Multiplier for adjusting the default learning rate. Mutually exclusive with learningRate 
. This feature is only available for 1P models.
learningRate 
 
  number 
 
Optional. Learning rate for tuning. Mutually exclusive with learningRateMultiplier 
. This feature is only available for open source models.
adapterSize 
 
  enum (  AdapterSize 
 
) 
 
Optional. Adapter size for tuning.
batchSize 
 
  string ( int64 
format) 
 
Optional. Batch size for tuning. This feature is only available for open source models.
| JSON representation | 
|---|
|  { 
 "epochCount" 
 : 
 string 
 , 
 "learningRateMultiplier" 
 : 
 number 
 , 
 "learningRate" 
 : 
 number 
 , 
 "adapterSize" 
 : 
 enum (  | 
AdapterSize
Supported adapter sizes for tuning.
| Enums | |
|---|---|
| ADAPTER_SIZE_UNSPECIFIED | Adapter size is unspecified. | 
| ADAPTER_SIZE_ONE | Adapter size 1. | 
| ADAPTER_SIZE_TWO | Adapter size 2. | 
| ADAPTER_SIZE_FOUR | Adapter size 4. | 
| ADAPTER_SIZE_EIGHT | Adapter size 8. | 
| ADAPTER_SIZE_SIXTEEN | Adapter size 16. | 
| ADAPTER_SIZE_THIRTY_TWO | Adapter size 32. | 
EvaluationConfig
Evaluation Config for Tuning Job.
metrics[] 
 
  object (  Metric 
 
) 
 
Required. The metrics used for evaluation.
outputConfig 
 
  object (  OutputConfig 
 
) 
 
Required. Config for evaluation output.
autoraterConfig 
 
  object (  AutoraterConfig 
 
) 
 
Optional. Autorater config for evaluation.
| JSON representation | 
|---|
| { "metrics" : [ { object ( | 
Metric
The metric used for running evaluations.
aggregationMetrics[] 
 
  enum (  AggregationMetric 
 
) 
 
Optional. The aggregation metrics to use.
metric_spec 
 
  Union type 
 
 metric_spec 
can be only one of the following:pointwiseMetricSpec 
 
  object (  PointwiseMetricSpec 
 
) 
 
Spec for pointwise metric.
pairwiseMetricSpec 
 
  object (  PairwiseMetricSpec 
 
) 
 
Spec for pairwise metric.
exactMatchSpec 
 
  object (  ExactMatchSpec 
 
) 
 
Spec for exact match metric.
bleuSpec 
 
  object (  BleuSpec 
 
) 
 
Spec for bleu metric.
rougeSpec 
 
  object (  RougeSpec 
 
) 
 
Spec for rouge metric.
| JSON representation | 
|---|
| { "aggregationMetrics" : [ enum ( | 
PointwiseMetricSpec
Spec for pointwise metric.
customOutputFormatConfig 
 
  object (  CustomOutputFormatConfig 
 
) 
 
Optional. CustomOutputFormatConfig allows customization of metric output. By default, metrics return a score and explanation. When this config is set, the default output is replaced with either:  - The raw output string.  - A parsed output based on a user-defined schema. If a custom format is chosen, the score 
and explanation 
fields in the corresponding metric result will be empty.
metricPromptTemplate 
 
  string 
 
Required. Metric prompt template for pointwise metric.
systemInstruction 
 
  string 
 
Optional. System instructions for pointwise metric.
| JSON representation | 
|---|
|  { 
 "customOutputFormatConfig" 
 : 
 { 
 object (  | 
CustomOutputFormatConfig
Spec for custom output format configuration.
custom_output_format_config 
 
  Union type 
 
 custom_output_format_config 
can be only one of the following:returnRawOutput 
 
  boolean 
 
Optional. Whether to return raw output.
| JSON representation | 
|---|
| { // custom_output_format_config "returnRawOutput" : boolean // Union type } | 
PairwiseMetricSpec
Spec for pairwise metric.
candidateResponseFieldName 
 
  string 
 
Optional. The field name of the candidate response.
baselineResponseFieldName 
 
  string 
 
Optional. The field name of the baseline response.
customOutputFormatConfig 
 
  object (  CustomOutputFormatConfig 
 
) 
 
Optional. CustomOutputFormatConfig allows customization of metric output. When this config is set, the default output is replaced with the raw output string. If a custom format is chosen, the pairwiseChoice 
and explanation 
fields in the corresponding metric result will be empty.
metricPromptTemplate 
 
  string 
 
Required. Metric prompt template for pairwise metric.
systemInstruction 
 
  string 
 
Optional. System instructions for pairwise metric.
| JSON representation | 
|---|
|  { 
 "candidateResponseFieldName" 
 : 
 string 
 , 
 "baselineResponseFieldName" 
 : 
 string 
 , 
 "customOutputFormatConfig" 
 : 
 { 
 object (  | 
ExactMatchSpec
This type has no fields.
Spec for exact match metric - returns 1 if prediction and reference exactly matches, otherwise 0.
BleuSpec
Spec for bleu score metric - calculates the precision of n-grams in the prediction as compared to reference - returns a score ranging between 0 to 1.
useEffectiveOrder 
 
  boolean 
 
Optional. Whether to useEffectiveOrder to compute bleu score.
| JSON representation | 
|---|
| { "useEffectiveOrder" : boolean } | 
RougeSpec
Spec for rouge score metric - calculates the recall of n-grams in prediction as compared to reference - returns a score ranging between 0 and 1.
rougeType 
 
  string 
 
Optional. Supported rouge types are rougen[1-9], rougeL, and rougeLsum.
useStemmer 
 
  boolean 
 
Optional. Whether to use stemmer to compute rouge score.
splitSummaries 
 
  boolean 
 
Optional. Whether to split summaries while using rougeLsum.
| JSON representation | 
|---|
| { "rougeType" : string , "useStemmer" : boolean , "splitSummaries" : boolean } | 
AggregationMetric
The aggregation metrics supported by EvaluationService.EvaluateDataset.
| Enums | |
|---|---|
| AGGREGATION_METRIC_UNSPECIFIED | Unspecified aggregation metric. | 
| AVERAGE | Average aggregation metric. Not supported for Pairwise metric. | 
| MODE | Mode aggregation metric. | 
| STANDARD_DEVIATION | Standard deviation aggregation metric. Not supported for pairwise metric. | 
| VARIANCE | Variance aggregation metric. Not supported for pairwise metric. | 
| MINIMUM | Minimum aggregation metric. Not supported for pairwise metric. | 
| MAXIMUM | Maximum aggregation metric. Not supported for pairwise metric. | 
| MEDIAN | Median aggregation metric. Not supported for pairwise metric. | 
| PERCENTILE_P90 | 90th percentile aggregation metric. Not supported for pairwise metric. | 
| PERCENTILE_P95 | 95th percentile aggregation metric. Not supported for pairwise metric. | 
| PERCENTILE_P99 | 99th percentile aggregation metric. Not supported for pairwise metric. | 
OutputConfig
Config for evaluation output.
destination 
 
  Union type 
 
 destination 
can be only one of the following:gcsDestination 
 
  object (  GcsDestination 
 
) 
 
Cloud storage destination for evaluation output.
| JSON representation | 
|---|
|  { 
 // destination 
 "gcsDestination" 
 : 
 { 
 object (  | 
AutoraterConfig
The configs for autorater. This is applicable to both EvaluateInstances and EvaluateDataset.
autoraterModel 
 
  string 
 
Optional. The fully qualified name of the publisher model or tuned autorater endpoint to use.
Publisher model format: projects/{project}/locations/{location}/publishers/*/models/* 
Tuned model endpoint format: projects/{project}/locations/{location}/endpoints/{endpoint} 
generationConfig 
 
  object (  GenerationConfig 
 
) 
 
Optional. Configuration options for model generation and outputs.
samplingCount 
 
  integer 
 
Optional. Number of samples for each instance in the dataset. If not specified, the default is 4. Minimum value is 1, maximum value is 32.
flipEnabled 
 
  boolean 
 
Optional. Default is true. Whether to flip the candidate and baseline responses. This is only applicable to the pairwise metric. If enabled, also provide PairwiseMetricSpec.candidate_response_field_name and PairwiseMetricSpec.baseline_response_field_name. When rendering PairwiseMetricSpec.metric_prompt_template, the candidate and baseline fields will be flipped for half of the samples to reduce bias.
| JSON representation | 
|---|
|  { 
 "autoraterModel" 
 : 
 string 
 , 
 "generationConfig" 
 : 
 { 
 object (  | 
GenerationConfig
Generation config.
stopSequences[] 
 
  string 
 
Optional. Stop sequences.
responseMimeType 
 
  string 
 
Optional. Output response mimetype of the generated candidate text. Supported mimetype: - text/plain 
: (default) Text output. - application/json 
: JSON response in the candidates. The model needs to be prompted to output the appropriate response type, otherwise the behavior is undefined. This is a preview feature.
responseModalities[] 
 
  enum (  Modality 
 
) 
 
Optional. The modalities of the response.
thinkingConfig 
 
  object (  ThinkingConfig 
 
) 
 
Optional. Config for thinking features. An error will be returned if this field is set for models that don't support thinking.
modelConfig
 (deprecated) 
 
 
  object (  ModelConfig 
 
) 
 
Optional. Config for model selection.
temperature 
 
  number 
 
Optional. Controls the randomness of predictions.
topP 
 
  number 
 
Optional. If specified, nucleus sampling will be used.
topK 
 
  number 
 
Optional. If specified, top-k sampling will be used.
candidateCount 
 
  integer 
 
Optional. Number of candidates to generate.
maxOutputTokens 
 
  integer 
 
Optional. The maximum number of output tokens to generate per message.
responseLogprobs 
 
  boolean 
 
Optional. If true, export the logprobs results in response.
logprobs 
 
  integer 
 
Optional. Logit probabilities.
presencePenalty 
 
  number 
 
Optional. Positive penalties.
frequencyPenalty 
 
  number 
 
Optional. Frequency penalties.
seed 
 
  integer 
 
Optional. Seed.
responseSchema 
 
  object (  Schema 
 
) 
 
Optional. The Schema 
object allows the definition of input and output data types. These types can be objects, but also primitives and arrays. Represents a select subset of an OpenAPI 3.0 schema object 
. If set, a compatible responseMimeType must also be set. Compatible mimetypes: application/json 
: Schema for JSON response.
responseJsonSchema 
 
  value (  Value 
 
format) 
 
Optional. Output schema of the generated response. This is an alternative to responseSchema 
that accepts JSON Schema 
.
If set, responseSchema 
must be omitted, but responseMimeType 
is required.
While the full JSON Schema may be sent, not all features are supported. Specifically, only the following properties are supported:
-  $id
-  $defs
-  $ref
-  $anchor
-  type
-  format
-  title
-  description
-  enum(for strings and numbers)
-  items
-  prefixItems
-  minItems
-  maxItems
-  minimum
-  maximum
-  anyOf
-  oneOf(interpreted the same asanyOf)
-  properties
-  additionalProperties
-  required
The non-standard propertyOrdering 
property may also be set.
Cyclic references are unrolled to a limited degree and, as such, may only be used within non-required properties. (Nullable properties are not sufficient.) If $ref 
is set on a sub-schema, no other properties, except for than those starting as a $ 
, may be set.
routingConfig 
 
  object (  RoutingConfig 
 
) 
 
Optional. Routing configuration.
mediaResolution 
 
  enum (  MediaResolution 
 
) 
 
Optional. If specified, the media resolution specified will be used.
speechConfig 
 
  object (  SpeechConfig 
 
) 
 
Optional. The speech generation config.
enableAffectiveDialog 
 
  boolean 
 
Optional. If enabled, the model will detect emotions and adapt its responses accordingly.
| JSON representation | 
|---|
| { "stopSequences" : [ string ] , "responseMimeType" : string , "responseModalities" : [ enum ( | 
RoutingConfig
The configuration for routing the request to a specific model.
routing_config 
 
  Union type 
 
 routing_config 
can be only one of the following:autoMode 
 
  object (  AutoRoutingMode 
 
) 
 
Automated routing.
manualMode 
 
  object (  ManualRoutingMode 
 
) 
 
Manual routing.
| JSON representation | 
|---|
| { // routing_config "autoMode" : { object ( | 
AutoRoutingMode
When automated routing is specified, the routing will be determined by the pretrained routing model and customer provided model routing preference.
modelRoutingPreference 
 
  enum (  ModelRoutingPreference 
 
) 
 
The model routing preference.
| JSON representation | 
|---|
|  { 
 "modelRoutingPreference" 
 : 
 enum (  | 
ModelRoutingPreference
The model routing preference.
| Enums | |
|---|---|
| UNKNOWN | Unspecified model routing preference. | 
| PRIORITIZE_QUALITY | Prefer higher quality over low cost. | 
| BALANCED | Balanced model routing preference. | 
| PRIORITIZE_COST | Prefer lower cost over higher quality. | 
ManualRoutingMode
When manual routing is set, the specified model will be used directly.
modelName 
 
  string 
 
The model name to use. Only the public LLM models are accepted. See Supported models .
| JSON representation | 
|---|
| { "modelName" : string } | 
Modality
The modalities of the response.
| Enums | |
|---|---|
| MODALITY_UNSPECIFIED | Unspecified modality. Will be processed as text. | 
| TEXT | Text modality. | 
| IMAGE | Image modality. | 
| AUDIO | Audio modality. | 
MediaResolution
Media resolution for the input media.
| Enums | |
|---|---|
| MEDIA_RESOLUTION_UNSPECIFIED | Media resolution has not been set. | 
| MEDIA_RESOLUTION_LOW | Media resolution set to low (64 tokens). | 
| MEDIA_RESOLUTION_MEDIUM | Media resolution set to medium (256 tokens). | 
| MEDIA_RESOLUTION_HIGH | Media resolution set to high (zoomed reframing with 256 tokens). | 
SpeechConfig
The speech generation config.
voiceConfig 
 
  object (  VoiceConfig 
 
) 
 
The configuration for the speaker to use.
languageCode 
 
  string 
 
Optional. Language code (ISO 639. e.g. en-US) for the speech synthesization.
| JSON representation | 
|---|
|  { 
 "voiceConfig" 
 : 
 { 
 object (  | 
VoiceConfig
The configuration for the voice to use.
voice_config 
 
  Union type 
 
 voice_config 
can be only one of the following:prebuiltVoiceConfig 
 
  object (  PrebuiltVoiceConfig 
 
) 
 
The configuration for the prebuilt voice to use.
| JSON representation | 
|---|
|  { 
 // voice_config 
 "prebuiltVoiceConfig" 
 : 
 { 
 object (  | 
PrebuiltVoiceConfig
The configuration for the prebuilt speaker to use.
voiceName 
 
  string 
 
The name of the preset voice to use.
| JSON representation | 
|---|
| { "voiceName" : string } | 
ThinkingConfig
Config for thinking features.
includeThoughts 
 
  boolean 
 
Optional. Indicates whether to include thoughts in the response. If true, thoughts are returned only when available.
thinkingBudget 
 
  integer 
 
Optional. Indicates the thinking budget in tokens.
| JSON representation | 
|---|
| { "includeThoughts" : boolean , "thinkingBudget" : integer } | 
ModelConfig
Config for model selection.
featureSelectionPreference 
 
  enum (  FeatureSelectionPreference 
 
) 
 
Required. feature selection preference.
| JSON representation | 
|---|
|  { 
 "featureSelectionPreference" 
 : 
 enum (  | 
FeatureSelectionPreference
Options for feature selection preference.
| Enums | |
|---|---|
| FEATURE_SELECTION_PREFERENCE_UNSPECIFIED | Unspecified feature selection preference. | 
| PRIORITIZE_QUALITY | Prefer higher quality over lower cost. | 
| BALANCED | Balanced feature selection preference. | 
| PRIORITIZE_COST | Prefer lower cost over higher quality. | 
TuningMode
Supported tuning modes.
| Enums | |
|---|---|
| TUNING_MODE_UNSPECIFIED | Tuning mode is unspecified. | 
| TUNING_MODE_FULL | Full fine-tuning mode. | 
| TUNING_MODE_PEFT_ADAPTER | PEFT adapter tuning mode. | 
DistillationSpec
Tuning Spec for Distillation.
trainingDatasetUri
 (deprecated) 
 
 
  string 
 
Deprecated. Cloud Storage path to file containing training dataset for tuning. The dataset must be formatted as a JSONL file.
hyperParameters 
 
  object (  DistillationHyperParameters 
 
) 
 
Optional. Hyperparameters for Distillation.
studentModel
 (deprecated) 
 
 
  string 
 
The student model that is being tuned, e.g., "google/gemma-2b-1.1-it". Deprecated. Use baseModel instead.
pipelineRootDirectory
 (deprecated) 
 
 
  string 
 
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.
teacher_model 
 
  Union type 
 
 teacher_model 
can be only one of the following:baseTeacherModel 
 
  string 
 
The base teacher model that is being distilled. See Supported models .
tunedTeacherModelSource 
 
  string 
 
The resource name of the Tuned teacher model. Format: projects/{project}/locations/{location}/models/{model} 
.
validationDatasetUri 
 
  string 
 
Optional. Cloud Storage path to file containing validation dataset for tuning. The dataset must be formatted as a JSONL file.
| JSON representation | 
|---|
|  { 
 "trainingDatasetUri" 
 : 
 string 
 , 
 "hyperParameters" 
 : 
 { 
 object (  | 
DistillationHyperParameters
Hyperparameters for Distillation.
adapterSize 
 
  enum (  AdapterSize 
 
) 
 
Optional. Adapter size for distillation.
epochCount 
 
  string ( int64 
format) 
 
Optional. Number of complete passes the model makes over the entire training dataset during training.
learningRateMultiplier 
 
  number 
 
Optional. Multiplier for adjusting the default learning rate.
| JSON representation | 
|---|
|  { 
 "adapterSize" 
 : 
 enum (  | 
PartnerModelTuningSpec
Tuning spec for Partner models.
trainingDatasetUri 
 
  string 
 
Required. Cloud Storage path to file containing training dataset for tuning. The dataset must be formatted as a JSONL file.
validationDatasetUri 
 
  string 
 
Optional. Cloud Storage path to file containing validation dataset for tuning. The dataset must be formatted as a JSONL file.
hyperParameters 
 
  map (key: string, value: value (  Value 
 
format)) 
 
Hyperparameters for tuning. The accepted hyperParameters and their valid range of values will differ depending on the base model.
| JSON representation | 
|---|
| { "trainingDatasetUri" : string , "validationDatasetUri" : string , "hyperParameters" : { string : value , ... } } | 
VeoTuningSpec
Tuning Spec for Veo Model Tuning.
trainingDatasetUri 
 
  string 
 
Required. Training dataset used for tuning. The dataset can be specified as either a Cloud Storage path to a JSONL file or as the resource name of a Vertex Multimodal Dataset.
validationDatasetUri 
 
  string 
 
Optional. Validation dataset used for tuning. The dataset can be specified as either a Cloud Storage path to a JSONL file or as the resource name of a Vertex Multimodal Dataset.
hyperParameters 
 
  object (  VeoHyperParameters 
 
) 
 
Optional. Hyperparameters for Veo.
| JSON representation | 
|---|
|  { 
 "trainingDatasetUri" 
 : 
 string 
 , 
 "validationDatasetUri" 
 : 
 string 
 , 
 "hyperParameters" 
 : 
 { 
 object (  | 
VeoHyperParameters
Hyperparameters for Veo.
epochCount 
 
  string ( int64 
format) 
 
Optional. Number of complete passes the model makes over the entire training dataset during training.
learningRateMultiplier 
 
  number 
 
Optional. Multiplier for adjusting the default learning rate.
tuningTask 
 
  enum (  TuningTask 
 
) 
 
Optional. The tuning task. Either I2V or T2V.
| JSON representation | 
|---|
|  { 
 "epochCount" 
 : 
 string 
 , 
 "learningRateMultiplier" 
 : 
 number 
 , 
 "tuningTask" 
 : 
 enum (  | 
TuningTask
An enum defining the tuning task used for Veo.
| Enums | |
|---|---|
| TUNING_TASK_UNSPECIFIED | Default value. This value is unused. | 
| TUNING_TASK_I2V | Tuning task for image to video. | 
| TUNING_TASK_T2V | Tuning task for text to video. | 
| TUNING_TASK_R2V | Tuning task for reference to video. | 
TunedModel
The Model Registry Model and Online Prediction Endpoint associated with this  TuningJob 
 
.
model 
 
  string 
 
Output only. The resource name of the TunedModel. Format:
 projects/{project}/locations/{location}/models/{model}@{versionId} 
When tuning from a base model, the version id will be 1.
For continuous tuning, if the provided tunedModelDisplayName is set and different from parent model's display name, the tuned model will have a new parent model with version 1. Otherwise the version id will be incremented by 1 from the last version id in the parent model. E.g.,
 projects/{project}/locations/{location}/models/{model}@{last_version_id +
                    1} 
endpoint 
 
  string 
 
Output only. A resource name of an Endpoint. Format: projects/{project}/locations/{location}/endpoints/{endpoint} 
.
checkpoints[] 
 
  object (  TunedModelCheckpoint 
 
) 
 
Output only. The checkpoints associated with this TunedModel. This field is only populated for tuning jobs that enable intermediate checkpoints.
| JSON representation | 
|---|
|  { 
 "model" 
 : 
 string 
 , 
 "endpoint" 
 : 
 string 
 , 
 "checkpoints" 
 : 
 [ 
 { 
 object (  | 
TunedModelCheckpoint
TunedModelCheckpoint for the Tuned Model of a Tuning Job.
checkpointId 
 
  string 
 
The id of the checkpoint.
epoch 
 
  string ( int64 
format) 
 
The epoch of the checkpoint.
step 
 
  string ( int64 
format) 
 
The step of the checkpoint.
endpoint 
 
  string 
 
The Endpoint resource name that the checkpoint is deployed to. Format: projects/{project}/locations/{location}/endpoints/{endpoint} 
.
| JSON representation | 
|---|
| { "checkpointId" : string , "epoch" : string , "step" : string , "endpoint" : string } | 
TuningDataStats
The tuning data statistic values for  TuningJob 
 
.
tuning_data_stats 
 
  Union type 
 
 tuning_data_stats 
can be only one of the following:supervisedTuningDataStats 
 
  object (  SupervisedTuningDataStats 
 
) 
 
The SFT Tuning data stats.
distillationDataStats 
 
  object (  DistillationDataStats 
 
) 
 
Output only. Statistics for distillation.
| JSON representation | 
|---|
| { // tuning_data_stats "supervisedTuningDataStats" : { object ( | 
SupervisedTuningDataStats
Tuning data statistics for Supervised Tuning.
tuningDatasetExampleCount 
 
  string ( int64 
format) 
 
Output only. Number of examples in the tuning dataset.
totalTuningCharacterCount 
 
  string ( int64 
format) 
 
Output only. Number of tuning characters in the tuning dataset.
totalBillableCharacterCount
 (deprecated) 
 
 
  string ( int64 
format) 
 
Output only. Number of billable characters in the tuning dataset.
totalBillableTokenCount 
 
  string ( int64 
format) 
 
Output only. Number of billable tokens in the tuning dataset.
tuningStepCount 
 
  string ( int64 
format) 
 
Output only. Number of tuning steps for this Tuning Job.
userInputTokenDistribution 
 
  object (  SupervisedTuningDatasetDistribution 
 
) 
 
Output only. Dataset distributions for the user input tokens.
userOutputTokenDistribution 
 
  object (  SupervisedTuningDatasetDistribution 
 
) 
 
Output only. Dataset distributions for the user output tokens.
userDatasetExamples[] 
 
  object (  Content 
 
) 
 
Output only. Sample user messages in the training dataset uri.
totalTruncatedExampleCount 
 
  string ( int64 
format) 
 
Output only. The number of examples in the dataset that have been dropped. An example can be dropped for reasons including: too many tokens, contains an invalid image, contains too many images, etc.
truncatedExampleIndices[] 
 
  string ( int64 
format) 
 
Output only. A partial sample of the indices (starting from 1) of the dropped examples.
droppedExampleReasons[] 
 
  string 
 
Output only. For each index in truncatedExampleIndices 
, the user-facing reason why the example was dropped.
| JSON representation | 
|---|
| { "tuningDatasetExampleCount" : string , "totalTuningCharacterCount" : string , "totalBillableCharacterCount" : string , "totalBillableTokenCount" : string , "tuningStepCount" : string , "userInputTokenDistribution" : { object ( | 
SupervisedTuningDatasetDistribution
Dataset distribution for Supervised Tuning.
sum 
 
  string ( int64 
format) 
 
Output only. Sum of a given population of values.
billableSum 
 
  string ( int64 
format) 
 
Output only. Sum of a given population of values that are billable.
min 
 
  number 
 
Output only. The minimum of the population values.
max 
 
  number 
 
Output only. The maximum of the population values.
mean 
 
  number 
 
Output only. The arithmetic mean of the values in the population.
median 
 
  number 
 
Output only. The median of the values in the population.
p5 
 
  number 
 
Output only. The 5th percentile of the values in the population.
p95 
 
  number 
 
Output only. The 95th percentile of the values in the population.
buckets[] 
 
  object (  DatasetBucket 
 
) 
 
Output only. Defines the histogram bucket.
| JSON representation | 
|---|
|  { 
 "sum" 
 : 
 string 
 , 
 "billableSum" 
 : 
 string 
 , 
 "min" 
 : 
 number 
 , 
 "max" 
 : 
 number 
 , 
 "mean" 
 : 
 number 
 , 
 "median" 
 : 
 number 
 , 
 "p5" 
 : 
 number 
 , 
 "p95" 
 : 
 number 
 , 
 "buckets" 
 : 
 [ 
 { 
 object (  | 
DatasetBucket
Dataset bucket used to create a histogram for the distribution given a population of values.
count 
 
  number 
 
Output only. Number of values in the bucket.
left 
 
  number 
 
Output only. left bound of the bucket.
right 
 
  number 
 
Output only. Right bound of the bucket.
| JSON representation | 
|---|
| { "count" : number , "left" : number , "right" : number } | 
DistillationDataStats
Statistics computed for datasets used for distillation.
trainingDatasetStats 
 
  object (  DatasetStats 
 
) 
 
Output only. Statistics computed for the training dataset.
| JSON representation | 
|---|
|  { 
 "trainingDatasetStats" 
 : 
 { 
 object (  | 
DatasetStats
Statistics computed over a tuning dataset.
tuningDatasetExampleCount 
 
  string ( int64 
format) 
 
Output only. Number of examples in the tuning dataset.
totalTuningCharacterCount 
 
  string ( int64 
format) 
 
Output only. Number of tuning characters in the tuning dataset.
totalBillableCharacterCount 
 
  string ( int64 
format) 
 
Output only. Number of billable characters in the tuning dataset.
tuningStepCount 
 
  string ( int64 
format) 
 
Output only. Number of tuning steps for this Tuning Job.
userInputTokenDistribution 
 
  object (  DatasetDistribution 
 
) 
 
Output only. Dataset distributions for the user input tokens.
userDatasetExamples[] 
 
  object (  Content 
 
) 
 
Output only. Sample user messages in the training dataset uri.
droppedExampleIndices[] 
 
  string ( int64 
format) 
 
Output only. A partial sample of the indices (starting from 1) of the dropped examples.
droppedExampleReasons[] 
 
  string 
 
Output only. For each index in droppedExampleIndices 
, the user-facing reason why the example was dropped.
userOutputTokenDistribution 
 
  object (  DatasetDistribution 
 
) 
 
Output only. Dataset distributions for the user output tokens.
| JSON representation | 
|---|
| { "tuningDatasetExampleCount" : string , "totalTuningCharacterCount" : string , "totalBillableCharacterCount" : string , "tuningStepCount" : string , "userInputTokenDistribution" : { object ( | 
DatasetDistribution
Distribution computed over a tuning dataset.
sum 
 
  number 
 
Output only. Sum of a given population of values.
min 
 
  number 
 
Output only. The minimum of the population values.
max 
 
  number 
 
Output only. The maximum of the population values.
mean 
 
  number 
 
Output only. The arithmetic mean of the values in the population.
median 
 
  number 
 
Output only. The median of the values in the population.
p5 
 
  number 
 
Output only. The 5th percentile of the values in the population.
p95 
 
  number 
 
Output only. The 95th percentile of the values in the population.
buckets[] 
 
  object (  DistributionBucket 
 
) 
 
Output only. Defines the histogram bucket.
| JSON representation | 
|---|
|  { 
 "sum" 
 : 
 number 
 , 
 "min" 
 : 
 number 
 , 
 "max" 
 : 
 number 
 , 
 "mean" 
 : 
 number 
 , 
 "median" 
 : 
 number 
 , 
 "p5" 
 : 
 number 
 , 
 "p95" 
 : 
 number 
 , 
 "buckets" 
 : 
 [ 
 { 
 object (  | 
DistributionBucket
Dataset bucket used to create a histogram for the distribution given a population of values.
count 
 
  string ( int64 
format) 
 
Output only. Number of values in the bucket.
left 
 
  number 
 
Output only. left bound of the bucket.
right 
 
  number 
 
Output only. Right bound of the bucket.
| JSON representation | 
|---|
| { "count" : string , "left" : number , "right" : number } | 
EvaluateDatasetRun
Evaluate Dataset Run result for Tuning Job.
operationName 
 
  string 
 
Output only. The operation id of the evaluation run. Format: projects/{project}/locations/{location}/operations/{operationId} 
.
checkpointId 
 
  string 
 
Output only. The checkpoint id used in the evaluation run. Only populated when evaluating checkpoints.
evaluateDatasetResponse 
 
  object (  EvaluateDatasetResponse 
 
) 
 
Output only. Results for EvaluationService.EvaluateDataset.
error 
 
  object (  Status 
 
) 
 
Output only. The error of the evaluation run if any.
| JSON representation | 
|---|
| { "operationName" : string , "checkpointId" : string , "evaluateDatasetResponse" : { object ( | 
EvaluateDatasetResponse
Response in LRO for EvaluationService.EvaluateDataset.
aggregationOutput 
 
  object (  AggregationOutput 
 
) 
 
Output only. Aggregation statistics derived from results of EvaluationService.EvaluateDataset.
outputInfo 
 
  object (  OutputInfo 
 
) 
 
Output only. Output info for EvaluationService.EvaluateDataset.
| JSON representation | 
|---|
| { "aggregationOutput" : { object ( | 
AggregationOutput
The aggregation result for the entire dataset and all metrics.
dataset 
 
  object (  EvaluationDataset 
 
) 
 
The dataset used for evaluation & aggregation.
aggregationResults[] 
 
  object (  AggregationResult 
 
) 
 
One AggregationResult per metric.
| JSON representation | 
|---|
| { "dataset" : { object ( | 
EvaluationDataset
The dataset used for evaluation.
source 
 
  Union type 
 
 source 
can be only one of the following:gcsSource 
 
  object (  GcsSource 
 
) 
 
Cloud storage source holds the dataset. Currently only one Cloud Storage file path is supported.
bigquerySource 
 
  object (  BigQuerySource 
 
) 
 
BigQuery source holds the dataset.
| JSON representation | 
|---|
| { // source "gcsSource" : { object ( | 
AggregationResult
The aggregation result for a single metric.
aggregationMetric 
 
  enum (  AggregationMetric 
 
) 
 
Aggregation metric.
aggregation_result 
 
  Union type 
 
 aggregation_result 
can be only one of the following:pointwiseMetricResult 
 
  object (  PointwiseMetricResult 
 
) 
 
result for pointwise metric.
pairwiseMetricResult 
 
  object (  PairwiseMetricResult 
 
) 
 
result for pairwise metric.
exactMatchMetricValue 
 
  object (  ExactMatchMetricValue 
 
) 
 
Results for exact match metric.
bleuMetricValue 
 
  object (  BleuMetricValue 
 
) 
 
Results for bleu metric.
rougeMetricValue 
 
  object (  RougeMetricValue 
 
) 
 
Results for rouge metric.
| JSON representation | 
|---|
| { "aggregationMetric" : enum ( | 
PointwiseMetricResult
Spec for pointwise metric result.
explanation 
 
  string 
 
Output only. Explanation for pointwise metric score.
customOutput 
 
  object (  CustomOutput 
 
) 
 
Output only. Spec for custom output.
score 
 
  number 
 
Output only. Pointwise metric score.
| JSON representation | 
|---|
|  { 
 "explanation" 
 : 
 string 
 , 
 "customOutput" 
 : 
 { 
 object (  | 
CustomOutput
RawOutput
Raw output.
rawOutput[] 
 
  string 
 
Output only. Raw output string.
| JSON representation | 
|---|
| { "rawOutput" : [ string ] } | 
PairwiseMetricResult
Spec for pairwise metric result.
pairwiseChoice 
 
  enum (  PairwiseChoice 
 
) 
 
Output only. Pairwise metric choice.
explanation 
 
  string 
 
Output only. Explanation for pairwise metric score.
customOutput 
 
  object (  CustomOutput 
 
) 
 
Output only. Spec for custom output.
| JSON representation | 
|---|
| { "pairwiseChoice" : enum ( | 
PairwiseChoice
Pairwise prediction autorater preference.
| Enums | |
|---|---|
| PAIRWISE_CHOICE_UNSPECIFIED | Unspecified prediction choice. | 
| BASELINE | baseline prediction wins | 
| CANDIDATE | Candidate prediction wins | 
| TIE | Winner cannot be determined | 
ExactMatchMetricValue
Exact match metric value for an instance.
score 
 
  number 
 
Output only. Exact match score.
| JSON representation | 
|---|
| { "score" : number } | 
BleuMetricValue
Bleu metric value for an instance.
score 
 
  number 
 
Output only. Bleu score.
| JSON representation | 
|---|
| { "score" : number } | 
RougeMetricValue
Rouge metric value for an instance.
score 
 
  number 
 
Output only. Rouge score.
| JSON representation | 
|---|
| { "score" : number } | 
OutputInfo
Describes the info for output of EvaluationService.EvaluateDataset.
output_location 
 
  Union type 
 
 output_location 
can be only one of the following:gcsOutputDirectory 
 
  string 
 
Output only. The full path of the Cloud Storage directory created, into which the evaluation results and aggregation results are written.
| JSON representation | 
|---|
| { // output_location "gcsOutputDirectory" : string // Union type } | 
| Methods | |
|---|---|
|   | Cancels a TuningJob. | 
|   | Creates a TuningJob. | 
|   | Gets a TuningJob. | 
|   | Lists TuningJobs in a Location. | 
|   | Rebase a TunedModel. | 

