Foundation Models Tuning Service API, gRPC: TuningService.Tune
- gRPC request
- TuningRequest
- WeightedDataset
- TextToTextCompletionTuningParams
- TuningTypeLora
- TuningTypePromptTune
- Scheduler
- SchedulerLinear
- SchedulerConstant
- SchedulerCosine
- Optimizer
- OptimizerAdamw
- TextClassificationMultilabelParams
- Scheduler
- Optimizer
- TextClassificationMulticlassParams
- Scheduler
- Optimizer
- yandex.cloud.operation.Operation
- TuningMetadata
- TuningResponse
gRPC request
rpc Tune (TuningRequest) returns (yandex.cloud.operation.Operation)
TuningRequest
{
"base_model_uri": "string",
"train_datasets": [
{
"dataset_id": "string",
"weight": "double"
}
],
"validation_datasets": [
{
"dataset_id": "string",
"weight": "double"
}
],
// Includes only one of the fields `text_to_text_completion`, `text_classification_multilabel`, `text_classification_multiclass`
"text_to_text_completion": {
"seed": "int64",
"lr": "double",
"n_samples": "int64",
"additional_arguments": "string",
// Includes only one of the fields `lora`, `prompt_tune`
"lora": {
"rank": "int64",
"alpha": "double",
"initialization": "string",
"type": "string"
},
"prompt_tune": {
"virtual_tokens": "int64"
},
// end of the list of possible fields
"scheduler": {
// Includes only one of the fields `linear`, `constant`, `cosine`
"linear": {
"min_lr": "double"
},
"constant": "SchedulerConstant",
"cosine": {
"min_lr": "double"
},
// end of the list of possible fields
"warmup_ratio": "double"
},
"optimizer": {
// Includes only one of the fields `adamw`
"adamw": {
"beta1": "double",
"beta2": "double",
"eps": "double",
"weight_decay": "double"
}
// end of the list of possible fields
}
},
"text_classification_multilabel": {
"seed": "int64",
"lr": "double",
"n_samples": "int64",
"additional_arguments": "string",
// Includes only one of the fields `lora`, `prompt_tune`
"lora": {
"rank": "int64",
"alpha": "double",
"initialization": "string",
"type": "string"
},
"prompt_tune": {
"virtual_tokens": "int64"
},
// end of the list of possible fields
"scheduler": {
// Includes only one of the fields `linear`, `constant`, `cosine`
"linear": {
"min_lr": "double"
},
"constant": "SchedulerConstant",
"cosine": {
"min_lr": "double"
},
// end of the list of possible fields
"warmup_ratio": "double"
},
"optimizer": {
// Includes only one of the fields `adamw`
"adamw": {
"beta1": "double",
"beta2": "double",
"eps": "double",
"weight_decay": "double"
}
// end of the list of possible fields
}
},
"text_classification_multiclass": {
"seed": "int64",
"lr": "double",
"n_samples": "int64",
"additional_arguments": "string",
// Includes only one of the fields `lora`, `prompt_tune`
"lora": {
"rank": "int64",
"alpha": "double",
"initialization": "string",
"type": "string"
},
"prompt_tune": {
"virtual_tokens": "int64"
},
// end of the list of possible fields
"scheduler": {
// Includes only one of the fields `linear`, `constant`, `cosine`
"linear": {
"min_lr": "double"
},
"constant": "SchedulerConstant",
"cosine": {
"min_lr": "double"
},
// end of the list of possible fields
"warmup_ratio": "double"
},
"optimizer": {
// Includes only one of the fields `adamw`
"adamw": {
"beta1": "double",
"beta2": "double",
"eps": "double",
"weight_decay": "double"
}
// end of the list of possible fields
}
},
// end of the list of possible fields
"name": "string",
"description": "string",
"labels": "map<string, string>"
}
Field |
Description |
base_model_uri |
string Required field. Format like a gpt://{folder_id}/yandex-gpt/latest |
train_datasets[] |
|
validation_datasets[] |
|
text_to_text_completion |
TextToTextCompletionTuningParams Includes only one of the fields |
text_classification_multilabel |
TextClassificationMultilabelParams Includes only one of the fields |
text_classification_multiclass |
TextClassificationMulticlassParams Includes only one of the fields |
name |
string common params |
description |
string |
labels |
object (map<string, string>) |
WeightedDataset
Field |
Description |
dataset_id |
string Required field. |
weight |
double |
TextToTextCompletionTuningParams
Field |
Description |
seed |
int64 |
lr |
double |
n_samples |
int64 |
additional_arguments |
string |
lora |
Includes only one of the fields |
prompt_tune |
Includes only one of the fields |
scheduler |
|
optimizer |
TuningTypeLora
Field |
Description |
rank |
int64 |
alpha |
double |
initialization |
string |
type |
string |
TuningTypePromptTune
Field |
Description |
virtual_tokens |
int64 |
Scheduler
Field |
Description |
linear |
Includes only one of the fields |
constant |
Includes only one of the fields |
cosine |
Includes only one of the fields |
warmup_ratio |
double |
SchedulerLinear
Field |
Description |
min_lr |
double |
SchedulerConstant
Field |
Description |
Empty |
SchedulerCosine
Field |
Description |
min_lr |
double |
Optimizer
Field |
Description |
adamw |
Includes only one of the fields |
OptimizerAdamw
Field |
Description |
beta1 |
double |
beta2 |
double |
eps |
double |
weight_decay |
double |
TextClassificationMultilabelParams
Field |
Description |
seed |
int64 |
lr |
double |
n_samples |
int64 |
additional_arguments |
string |
lora |
Includes only one of the fields |
prompt_tune |
Includes only one of the fields |
scheduler |
|
optimizer |
Scheduler
Field |
Description |
linear |
Includes only one of the fields |
constant |
Includes only one of the fields |
cosine |
Includes only one of the fields |
warmup_ratio |
double |
Optimizer
Field |
Description |
adamw |
Includes only one of the fields |
TextClassificationMulticlassParams
Field |
Description |
seed |
int64 |
lr |
double |
n_samples |
int64 |
additional_arguments |
string |
lora |
Includes only one of the fields |
prompt_tune |
Includes only one of the fields |
scheduler |
|
optimizer |
Scheduler
Field |
Description |
linear |
Includes only one of the fields |
constant |
Includes only one of the fields |
cosine |
Includes only one of the fields |
warmup_ratio |
double |
Optimizer
Field |
Description |
adamw |
Includes only one of the fields |
yandex.cloud.operation.Operation
{
"id": "string",
"description": "string",
"created_at": "google.protobuf.Timestamp",
"created_by": "string",
"modified_at": "google.protobuf.Timestamp",
"done": "bool",
"metadata": {
"tuning_task_id": "string",
"status": "Status",
"total_steps": "int64",
"current_step": "int64"
},
// Includes only one of the fields `error`, `response`
"error": "google.rpc.Status",
"response": {
"tuning_task_id": "string",
"status": "Status",
"target_model_uri": "string"
}
// end of the list of possible fields
}
An Operation resource. For more information, see Operation.
Field |
Description |
id |
string ID of the operation. |
description |
string Description of the operation. 0-256 characters long. |
created_at |
Creation timestamp. |
created_by |
string ID of the user or service account who initiated the operation. |
modified_at |
The time when the Operation resource was last modified. |
done |
bool If the value is |
metadata |
Service-specific metadata associated with the operation. |
error |
The error result of the operation in case of failure or cancellation. Includes only one of the fields The operation result. |
response |
The normal response of the operation in case of success. Includes only one of the fields The operation result. |
TuningMetadata
Field |
Description |
tuning_task_id |
string |
status |
enum Status
|
total_steps |
int64 |
current_step |
int64 |
TuningResponse
Field |
Description |
tuning_task_id |
string |
status |
enum Status
|
target_model_uri |
string |