NAME

Google::Ai::Generativelanguage::V1alpha::TunedModel - Compiled Protocol Buffers messages for google/ai/generativelanguage/v1alpha/tuned_model.proto

SYNOPSIS

use Google::Ai::Generativelanguage::V1alpha::TunedModel;

my $msg = Google::Ai::Generativelanguage::V1alpha::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::V1alpha::TunedModel::TunedModel->parse($bytes);

# Canonical ProtoJSON
my $json = $msg->to_json();

DESCRIPTION

Auto-generated Protobuf message classes compiled from google/ai/generativelanguage/v1alpha/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::V1alpha::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::V1alpha::TunedModel::TunedModelSource)

    Optional. TunedModel to use as the starting point for training the new model.

  • $msg->base_model() / $msg->base_model($value)

    Type: String

    Immutable. The name of the `Model` to tune. Example: `models/gemini-1.5-flash-001`

  • $msg->name() / $msg->name($value)

    Type: String

    Output 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: String

    Optional. 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: String

    Optional. A short description of this model.

  • $msg->temperature() / $msg->temperature($value)

    Type: Float

    Optional. 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: Float

    Optional. 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: Int32

    Optional. 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::V1alpha::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::V1alpha::TunedModel::TuningTask)

    Required. The tuning task that creates the tuned model.

  • $msg->reader_project_numbers() / $msg->reader_project_numbers($value)

    Type: Int64

    Optional. List of project numbers that have read access to the tuned model.

Enum: TunedModel::State

  • STATE_UNSPECIFIED => 0

  • CREATING => 1

  • ACTIVE => 2

  • FAILED => 3

Google::Ai::Generativelanguage::V1alpha::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: String

    Immutable. 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: String

    Output only. The name of the base `Model` this `TunedModel` was tuned from. Example: `models/gemini-1.5-flash-001`

Google::Ai::Generativelanguage::V1alpha::TunedModel::TuningTask

Tuning tasks that create tuned models.

Inherits from Protobuf::Message.

Accessors

Google::Ai::Generativelanguage::V1alpha::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: Float

    Optional. 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: Float

    Optional. 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: Int32

    Immutable. 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: Int32

    Immutable. 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::V1alpha::TunedModel::Dataset

Dataset for training or validation.

Inherits from Protobuf::Message.

Accessors

Google::Ai::Generativelanguage::V1alpha::TunedModel::TuningExamples

A set of tuning examples. Can be training or validation data.

Inherits from Protobuf::Message.

Accessors

Google::Ai::Generativelanguage::V1alpha::TunedModel::TuningPart

A datatype containing data that is part of a multi-part `TuningContent` message.

This is a subset of the Part used for model inference, with limited type support.

A `Part` consists of data which has an associated datatype. A `Part` can only contain one of the accepted types in `Part.data`.

Inherits from Protobuf::Message.

Accessors

  • $msg->text() / $msg->text($value)

    Type: String

    Inline text.

Google::Ai::Generativelanguage::V1alpha::TunedModel::TuningContent

The structured datatype containing multi-part content of an example message.

This is a subset of the Content proto used during model inference with limited type support. A `Content` includes a `role` field designating the producer of the `Content` and a `parts` field containing multi-part data that contains the content of the message turn.

Inherits from Protobuf::Message.

Accessors

  • $msg->parts() / $msg->parts($value)

    Type: Message (Google::Ai::Generativelanguage::V1alpha::TunedModel::TuningPart)

    Ordered `Parts` that constitute a single message. Parts may have different MIME types.

  • $msg->role() / $msg->role($value)

    Type: String

    Optional. The producer of the content. Must be either 'user' or 'model'.

    Useful to set for multi-turn conversations, otherwise can be left blank or unset.

Google::Ai::Generativelanguage::V1alpha::TunedModel::TuningMultiturnExample

A tuning example with multiturn input.

Inherits from Protobuf::Message.

Accessors

Google::Ai::Generativelanguage::V1alpha::TunedModel::TuningExample

A single example for tuning.

Inherits from Protobuf::Message.

Accessors

  • $msg->text_input() / $msg->text_input($value)

    Type: String

    Optional. Text model input.

  • $msg->output() / $msg->output($value)

    Type: String

    Required. The expected model output.

Google::Ai::Generativelanguage::V1alpha::TunedModel::TuningSnapshot

Record for a single tuning step.

Inherits from Protobuf::Message.

Accessors

  • $msg->step() / $msg->step($value)

    Type: Int32

    Output only. The tuning step.

  • $msg->epoch() / $msg->epoch($value)

    Type: Int32

    Output only. The epoch this step was part of.

  • $msg->mean_loss() / $msg->mean_loss($value)

    Type: Float

    Output 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::V1alpha::TunedModel::Types, https://protobuf.dev/

LICENSE AND COPYRIGHT

Copyright (C) 2026 Google LLC

This program is released under the Apache 2.0 license.