Resource: TuningJob
Represents a TuningJob that runs with Google owned models.
JSON representation |
---|
{ "name": string, "tunedModelDisplayName": string, "description": string, "state": enum ( |
Fields | |
---|---|
name |
Output only. Identifier. Resource name of a TuningJob. Format: |
tunedModelDisplayName |
Optional. The display name of the |
description |
Optional. The description of the |
state |
Output only. The detailed state of the job. |
createTime |
Output only. time when the A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: |
startTime |
Output only. time when the A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: |
endTime |
Output only. time when the TuningJob entered any of the following A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: |
updateTime |
Output only. time when the A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: |
error |
Output only. Only populated when job's state is |
labels |
Optional. The labels with user-defined metadata to organize 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 |
Output only. The Experiment associated with this |
tunedModel |
Output only. The tuned model resources assiociated with this |
tuningDataStats |
Output only. The tuning data statistics associated with this |
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. |
Union field
|
|
baseModel |
The base model that is being tuned, e.g., "gemini-1.0-pro-002". |
Union field
|
|
supervisedTuningSpec |
Tuning Spec for Supervised Fine Tuning. |
SupervisedTuningSpec
Tuning Spec for Supervised Tuning.
JSON representation |
---|
{
"trainingDatasetUri": string,
"validationDatasetUri": string,
"hyperParameters": {
object ( |
Fields | |
---|---|
trainingDatasetUri |
Required. Cloud Storage path to file containing training dataset for tuning. The dataset must be formatted as a JSONL file. |
validationDatasetUri |
Optional. Cloud Storage path to file containing validation dataset for tuning. The dataset must be formatted as a JSONL file. |
hyperParameters |
Optional. Hyperparameters for SFT. |
SupervisedHyperParameters
Hyperparameters for SFT.
JSON representation |
---|
{
"epochCount": string,
"learningRateMultiplier": number,
"adapterSize": enum ( |
Fields | |
---|---|
epochCount |
Optional. Number of complete passes the model makes over the entire training dataset during training. |
learningRateMultiplier |
Optional. Multiplier for adjusting the default learning rate. |
adapterSize |
Optional. Adapter size for tuning. |
AdapterSize
Supported adapter sizes for tuning.
Enums | |
---|---|
ADAPTER_SIZE_UNSPECIFIED |
Adapter size is unspecified. |
ADAPTER_SIZE_ONE |
Adapter size 1. |
ADAPTER_SIZE_FOUR |
Adapter size 4. |
ADAPTER_SIZE_EIGHT |
Adapter size 8. |
ADAPTER_SIZE_SIXTEEN |
Adapter size 16. |
TunedModel
The Model Registry Model and Online Prediction Endpoint assiociated with this TuningJob
.
JSON representation |
---|
{ "model": string, "endpoint": string } |
Fields | |
---|---|
model |
Output only. The resource name of the TunedModel. Format: |
endpoint |
Output only. A resource name of an Endpoint. Format: |
TuningDataStats
The tuning data statistic values for TuningJob
.
JSON representation |
---|
{ // Union field |
Fields | |
---|---|
Union field
|
|
supervisedTuningDataStats |
The SFT Tuning data stats. |
SupervisedTuningDataStats
Tuning data statistics for Supervised Tuning.
JSON representation |
---|
{ "tuningDatasetExampleCount": string, "totalTuningCharacterCount": string, "totalBillableCharacterCount": string, "totalBillableTokenCount": string, "tuningStepCount": string, "userInputTokenDistribution": { object ( |
Fields | |
---|---|
tuningDatasetExampleCount |
Output only. Number of examples in the tuning dataset. |
totalTuningCharacterCount |
Output only. Number of tuning characters in the tuning dataset. |
totalBillableCharacterCount |
Output only. Number of billable characters in the tuning dataset. |
totalBillableTokenCount |
Output only. Number of billable tokens in the tuning dataset. |
tuningStepCount |
Output only. Number of tuning steps for this Tuning Job. |
userInputTokenDistribution |
Output only. Dataset distributions for the user input tokens. |
userOutputTokenDistribution |
Output only. Dataset distributions for the user output tokens. |
userMessagePerExampleDistribution |
Output only. Dataset distributions for the messages per example. |
userDatasetExamples[] |
Output only. Sample user messages in the training dataset uri. |
SupervisedTuningDatasetDistribution
Dataset distribution for Supervised Tuning.
JSON representation |
---|
{
"sum": string,
"billableSum": string,
"min": number,
"max": number,
"mean": number,
"median": number,
"p5": number,
"p95": number,
"buckets": [
{
object ( |
Fields | |
---|---|
sum |
Output only. Sum of a given population of values. |
billableSum |
Output only. Sum of a given population of values that are billable. |
min |
Output only. The minimum of the population values. |
max |
Output only. The maximum of the population values. |
mean |
Output only. The arithmetic mean of the values in the population. |
median |
Output only. The median of the values in the population. |
p5 |
Output only. The 5th percentile of the values in the population. |
p95 |
Output only. The 95th percentile of the values in the population. |
buckets[] |
Output only. Defines the histogram bucket. |
DatasetBucket
Dataset bucket used to create a histogram for the distribution given a population of values.
JSON representation |
---|
{ "count": number, "left": number, "right": number } |
Fields | |
---|---|
count |
Output only. Number of values in the bucket. |
left |
Output only. left bound of the bucket. |
right |
Output only. Right bound of the bucket. |
Content
The base structured datatype containing multi-part content of a message.
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.
JSON representation |
---|
{
"role": string,
"parts": [
{
object ( |
Fields | |
---|---|
role |
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. |
parts[] |
Required. Ordered |
Part
A datatype containing media that is part of a multi-part Content
message.
A Part
consists of data which has an associated datatype. A Part
can only contain one of the accepted types in Part.data
.
A Part
must have a fixed IANA MIME type identifying the type and subtype of the media if inlineData
or fileData
field is filled with raw bytes.
JSON representation |
---|
{ // Union field |
Fields | |
---|---|
Union field
|
|
text |
Optional. Text part (can be code). |
inlineData |
Optional. Inlined bytes data. |
fileData |
Optional. URI based data. |
functionCall |
Optional. A predicted [FunctionCall] returned from the model that contains a string representing the [FunctionDeclaration.name] with the parameters and their values. |
functionResponse |
Optional. The result output of a [FunctionCall] that contains a string representing the [FunctionDeclaration.name] and a structured JSON object containing any output from the function call. It is used as context to the model. |
Union field
|
|
videoMetadata |
Optional. Video metadata. The metadata should only be specified while the video data is presented in inlineData or fileData. |
Blob
Content blob.
It's preferred to send as text
directly rather than raw bytes.
JSON representation |
---|
{ "mimeType": string, "data": string } |
Fields | |
---|---|
mimeType |
Required. The IANA standard MIME type of the source data. |
data |
Required. Raw bytes. A base64-encoded string. |
FileData
URI based data.
JSON representation |
---|
{ "mimeType": string, "fileUri": string } |
Fields | |
---|---|
mimeType |
Required. The IANA standard MIME type of the source data. |
fileUri |
Required. URI. |
FunctionCall
A predicted [FunctionCall] returned from the model that contains a string representing the [FunctionDeclaration.name] and a structured JSON object containing the parameters and their values.
JSON representation |
---|
{ "name": string, "args": { object } } |
Fields | |
---|---|
name |
Required. The name of the function to call. Matches [FunctionDeclaration.name]. |
args |
Optional. Required. The function parameters and values in JSON object format. See [FunctionDeclaration.parameters] for parameter details. |
FunctionResponse
The result output from a [FunctionCall] that contains a string representing the [FunctionDeclaration.name] and a structured JSON object containing any output from the function is used as context to the model. This should contain the result of a [FunctionCall] made based on model prediction.
JSON representation |
---|
{ "name": string, "response": { object } } |
Fields | |
---|---|
name |
Required. The name of the function to call. Matches [FunctionDeclaration.name] and [FunctionCall.name]. |
response |
Required. The function response in JSON object format. |
VideoMetadata
metadata describes the input video content.
JSON representation |
---|
{ "startOffset": string, "endOffset": string } |
Fields | |
---|---|
startOffset |
Optional. The start offset of the video. A duration in seconds with up to nine fractional digits, ending with ' |
endOffset |
Optional. The end offset of the video. A duration in seconds with up to nine fractional digits, ending with ' |
Methods |
|
---|---|
|
Cancels a TuningJob. |
|
Creates a TuningJob. |
|
Gets a TuningJob. |
|
Lists TuningJobs in a Location. |