- Resource: TunedModel
- TunedModelSource
- State
- TuningTask
- TuningSnapshot
- Dataset
- TuningExamples
- TuningExample
- Hyperparameters
- Methods
Resource: TunedModel
A fine-tuned model created using ModelService.CreateTunedModel.
JSON representation |
---|
{ "name": string, "displayName": string, "description": string, "state": enum ( |
Fields | |
---|---|
name |
Output only. The tuned model name. A unique name will be generated on create. Example: |
displayName |
Optional. The name to display for this model in user interfaces. The display name must be up to 40 characters including spaces. |
description |
Optional. A short description of this model. |
state |
Output only. The state of the tuned model. |
createTime |
Output only. The timestamp when this model was created. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: |
updateTime |
Output only. The timestamp when this model was updated. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: |
tuningTask |
Required. The tuning task that creates the tuned model. |
Union field source_model . The model used as the starting point for tuning. source_model can be only one of the following: |
|
tunedModelSource |
Optional. TunedModel to use as the starting point for training the new model. |
baseModel |
Immutable. The name of the |
temperature |
Optional. Controls the randomness of the output. Values can range over This value specifies default to be the one used by the base model while creating the model. |
topP |
Optional. For Nucleus sampling. Nucleus sampling considers the smallest set of tokens whose probability sum is at least This value specifies default to be the one used by the base model while creating the model. |
topK |
Optional. For Top-k sampling. Top-k sampling considers the set of This value specifies default to be the one used by the base model while creating the model. |
TunedModelSource
Tuned model as a source for training a new model.
JSON representation |
---|
{ "tunedModel": string, "baseModel": string } |
Fields | |
---|---|
tunedModel |
Immutable. The name of the |
baseModel |
Output only. The name of the base |
State
The state of the tuned model.
Enums | |
---|---|
STATE_UNSPECIFIED |
The default value. This value is unused. |
CREATING |
The model is being created. |
ACTIVE |
The model is ready to be used. |
FAILED |
The model failed to be created. |
TuningTask
Tuning tasks that create tuned models.
JSON representation |
---|
{ "startTime": string, "completeTime": string, "snapshots": [ { object ( |
Fields | |
---|---|
startTime |
Output only. The timestamp when tuning this model started. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: |
completeTime |
Output only. The timestamp when tuning this model completed. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: |
snapshots[] |
Output only. Metrics collected during tuning. |
trainingData |
Required. Input only. Immutable. The model training data. |
hyperparameters |
Immutable. Hyperparameters controlling the tuning process. If not provided, default values will be used. |
TuningSnapshot
Record for a single tuning step.
JSON representation |
---|
{ "step": integer, "epoch": integer, "meanLoss": number, "computeTime": string } |
Fields | |
---|---|
step |
Output only. The tuning step. |
epoch |
Output only. The epoch this step was part of. |
meanLoss |
Output only. The mean loss of the training examples for this step. |
computeTime |
Output only. The timestamp when this metric was computed. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: |
Dataset
Dataset for training or validation.
JSON representation |
---|
{ // Union field |
Fields | |
---|---|
Union field dataset . Inline data or a reference to the data. dataset can be only one of the following: |
|
examples |
Optional. Inline examples. |
TuningExamples
A set of tuning examples. Can be training or validatation data.
JSON representation |
---|
{
"examples": [
{
object ( |
Fields | |
---|---|
examples[] |
Required. The examples. Example input can be for text or discuss, but all examples in a set must be of the same type. |
TuningExample
A single example for tuning.
JSON representation |
---|
{ "output": string, // Union field |
Fields | |
---|---|
output |
Required. The expected model output. |
Union field model_input . The input to the model for this example. model_input can be only one of the following: |
|
textInput |
Optional. Text model input. |
Hyperparameters
Hyperparameters controlling the tuning process.
JSON representation |
---|
{ "epochCount": integer, "batchSize": integer, "learningRate": number } |
Fields | |
---|---|
epochCount |
Immutable. The number of training epochs. An epoch is one pass through the training data. If not set, a default of 10 will be used. |
batchSize |
Immutable. The batch size hyperparameter for tuning. If not set, a default of 16 or 64 will be used based on the number of training examples. |
learningRate |
Immutable. The learning rate hyperparameter for tuning. If not set, a default of 0.0002 or 0.002 will be calculated based on the number of training examples. |
Methods |
|
---|---|
|
Creates a tuned model. |
|
Deletes a tuned model. |
|
Generates a response from the model given an input message. |
|
Gets information about a specific TunedModel. |
|
Lists tuned models owned by the user. |
|
Updates a tuned model. |
|
Transfers ownership of the tuned model. |