NAME
Google::Ai::Generativelanguage::V1beta::TunedModel - Compiled Protocol Buffers messages for google/ai/generativelanguage/v1beta/tuned_model.proto
SYNOPSIS
use Google::Ai::Generativelanguage::V1beta::TunedModel;
my $msg = Google::Ai::Generativelanguage::V1beta::TunedModel::TunedModel->new({
tuned_model_source => $tuned_model_source,
base_model => $base_model,
name => $name,
display_name => $display_name,
});
# Read or update a field
my $val = $msg->tuned_model_source();
# Binary wire-format roundtrip
my $bytes = $msg->serialize();
my $decoded = Google::Ai::Generativelanguage::V1beta::TunedModel::TunedModel->parse($bytes);
# Canonical ProtoJSON
my $json = $msg->to_json();
DESCRIPTION
Auto-generated Protobuf message classes compiled from google/ai/generativelanguage/v1beta/tuned_model.proto. All message classes inherit from Protobuf::Message and support new(), serialize(), parse(), to_json(), from_json(), to_text(), and to_perl().
MESSAGES
Google::Ai::Generativelanguage::V1beta::TunedModel::TunedModel
A fine-tuned model created using ModelService.CreateTunedModel.
Inherits from Protobuf::Message.
Accessors
$msg->tuned_model_source()/$msg->tuned_model_source($value)Type:
Message(Google::Ai::Generativelanguage::V1beta::TunedModel::TunedModelSource)Optional. TunedModel to use as the starting point for training the new model.
$msg->base_model()/$msg->base_model($value)Type:
StringImmutable. The name of the `Model` to tune. Example: `models/gemini-1.5-flash-001`
$msg->name()/$msg->name($value)Type:
StringOutput only. The tuned model name. A unique name will be generated on create. Example: `tunedModels/az2mb0bpw6i` If display_name is set on create, the id portion of the name will be set by concatenating the words of the display_name with hyphens and adding a random portion for uniqueness.
Example:
* display_name = `Sentence Translator` * name = `tunedModels/sentence-translator-u3b7m`$msg->display_name()/$msg->display_name($value)Type:
StringOptional. The name to display for this model in user interfaces. The display name must be up to 40 characters including spaces.
$msg->description()/$msg->description($value)Type:
StringOptional. A short description of this model.
$msg->temperature()/$msg->temperature($value)Type:
FloatOptional. Controls the randomness of the output.
Values can range over `[0.0,1.0]`, inclusive. A value closer to `1.0` will produce responses that are more varied, while a value closer to `0.0` will typically result in less surprising responses from the model.
This value specifies default to be the one used by the base model while creating the model.
$msg->top_p()/$msg->top_p($value)Type:
FloatOptional. For Nucleus sampling.
Nucleus sampling considers the smallest set of tokens whose probability sum is at least `top_p`.
This value specifies default to be the one used by the base model while creating the model.
$msg->top_k()/$msg->top_k($value)Type:
Int32Optional. For Top-k sampling.
Top-k sampling considers the set of `top_k` most probable tokens. This value specifies default to be used by the backend while making the call to the model.
This value specifies default to be the one used by the base model while creating the model.
$msg->state()/$msg->state($value)Type:
Enum(Google::Ai::Generativelanguage::V1beta::TunedModel::State)Output only. The state of the tuned model.
$msg->create_time()/$msg->create_time($value)Type:
Message(Google::Protobuf::Timestamp::Timestamp)Output only. The timestamp when this model was created.
$msg->update_time()/$msg->update_time($value)Type:
Message(Google::Protobuf::Timestamp::Timestamp)Output only. The timestamp when this model was updated.
$msg->tuning_task()/$msg->tuning_task($value)Type:
Message(Google::Ai::Generativelanguage::V1beta::TunedModel::TuningTask)Required. The tuning task that creates the tuned model.
$msg->reader_project_numbers()/$msg->reader_project_numbers($value)Type:
Int64Optional. List of project numbers that have read access to the tuned model.
Enum: TunedModel::State
STATE_UNSPECIFIED=>0CREATING=>1ACTIVE=>2FAILED=>3
Google::Ai::Generativelanguage::V1beta::TunedModel::TunedModelSource
Tuned model as a source for training a new model.
Inherits from Protobuf::Message.
Accessors
$msg->tuned_model()/$msg->tuned_model($value)Type:
StringImmutable. The name of the `TunedModel` to use as the starting point for training the new model. Example: `tunedModels/my-tuned-model`
$msg->base_model()/$msg->base_model($value)Type:
StringOutput only. The name of the base `Model` this `TunedModel` was tuned from. Example: `models/gemini-1.5-flash-001`
Google::Ai::Generativelanguage::V1beta::TunedModel::TuningTask
Tuning tasks that create tuned models.
Inherits from Protobuf::Message.
Accessors
$msg->start_time()/$msg->start_time($value)Type:
Message(Google::Protobuf::Timestamp::Timestamp)Output only. The timestamp when tuning this model started.
$msg->complete_time()/$msg->complete_time($value)Type:
Message(Google::Protobuf::Timestamp::Timestamp)Output only. The timestamp when tuning this model completed.
$msg->snapshots()/$msg->snapshots($value)Type:
Message(Google::Ai::Generativelanguage::V1beta::TunedModel::TuningSnapshot)Output only. Metrics collected during tuning.
$msg->training_data()/$msg->training_data($value)Type:
Message(Google::Ai::Generativelanguage::V1beta::TunedModel::Dataset)Required. Input only. Immutable. The model training data.
$msg->hyperparameters()/$msg->hyperparameters($value)Type:
Message(Google::Ai::Generativelanguage::V1beta::TunedModel::Hyperparameters)Immutable. Hyperparameters controlling the tuning process. If not provided, default values will be used.
Google::Ai::Generativelanguage::V1beta::TunedModel::Hyperparameters
Hyperparameters controlling the tuning process. Read more at https://ai.google.dev/docs/model_tuning_guidance
Inherits from Protobuf::Message.
Accessors
$msg->learning_rate()/$msg->learning_rate($value)Type:
FloatOptional. Immutable. The learning rate hyperparameter for tuning. If not set, a default of 0.001 or 0.0002 will be calculated based on the number of training examples.
$msg->learning_rate_multiplier()/$msg->learning_rate_multiplier($value)Type:
FloatOptional. Immutable. The learning rate multiplier is used to calculate a final learning_rate based on the default (recommended) value. Actual learning rate := learning_rate_multiplier * default learning rate Default learning rate is dependent on base model and dataset size. If not set, a default of 1.0 will be used.
$msg->epoch_count()/$msg->epoch_count($value)Type:
Int32Immutable. The number of training epochs. An epoch is one pass through the training data. If not set, a default of 5 will be used.
$msg->batch_size()/$msg->batch_size($value)Type:
Int32Immutable. The batch size hyperparameter for tuning. If not set, a default of 4 or 16 will be used based on the number of training examples.
Google::Ai::Generativelanguage::V1beta::TunedModel::Dataset
Dataset for training or validation.
Inherits from Protobuf::Message.
Accessors
$msg->examples()/$msg->examples($value)Type:
Message(Google::Ai::Generativelanguage::V1beta::TunedModel::TuningExamples)Optional. Inline examples with simple input/output text.
Google::Ai::Generativelanguage::V1beta::TunedModel::TuningExamples
A set of tuning examples. Can be training or validation data.
Inherits from Protobuf::Message.
Accessors
$msg->examples()/$msg->examples($value)Type:
Message(Google::Ai::Generativelanguage::V1beta::TunedModel::TuningExample)The examples. Example input can be for text or discuss, but all examples in a set must be of the same type.
Google::Ai::Generativelanguage::V1beta::TunedModel::TuningExample
A single example for tuning.
Inherits from Protobuf::Message.
Accessors
$msg->text_input()/$msg->text_input($value)Type:
StringOptional. Text model input.
$msg->output()/$msg->output($value)Type:
StringRequired. The expected model output.
Google::Ai::Generativelanguage::V1beta::TunedModel::TuningSnapshot
Record for a single tuning step.
Inherits from Protobuf::Message.
Accessors
$msg->step()/$msg->step($value)Type:
Int32Output only. The tuning step.
$msg->epoch()/$msg->epoch($value)Type:
Int32Output only. The epoch this step was part of.
$msg->mean_loss()/$msg->mean_loss($value)Type:
FloatOutput only. The mean loss of the training examples for this step.
$msg->compute_time()/$msg->compute_time($value)Type:
Message(Google::Protobuf::Timestamp::Timestamp)Output only. The timestamp when this metric was computed.
SEE ALSO
Protobuf, Protobuf::Message, Google::Ai::Generativelanguage::V1beta::TunedModel::Types, https://protobuf.dev/
LICENSE AND COPYRIGHT
Copyright (C) 2026 Google LLC
This program is released under the Apache 2.0 license.