Module sft (1.67.0)

Classes for supervised tuning.

Classes

SupervisedTuningJob

SupervisedTuningJob(tuning_job_name: str)

Initializes class with project, location, and api_client.

Parameters
Name Description
project str

Project of the resource noun.

location str

The location of the resource noun.

credentials google.auth.credentials.Credentials

Optional custom credentials to use when accessing interacting with resource noun.

resource_name str

A fully-qualified resource name or ID.

Modules Functions

train

train(
    *,
    source_model: typing.Union[str, vertexai.generative_models.GenerativeModel],
    train_dataset: str,
    validation_dataset: typing.Optional[str] = None,
    tuned_model_display_name: typing.Optional[str] = None,
    epochs: typing.Optional[int] = None,
    learning_rate_multiplier: typing.Optional[float] = None,
    adapter_size: typing.Optional[typing.Literal[1, 4, 8, 16]] = None,
    labels: typing.Optional[typing.Dict[str, str]] = None
) -> vertexai.tuning._supervised_tuning.SupervisedTuningJob

Tunes a model using supervised training.

Parameter
Name Description
source_model str

Model name for tuning, e.g., "gemini-1.0-pro-002".