Package tuning (1.153.1)
Stay organized with collections
Save and categorize content based on your preferences.
API documentation for tuning package.
Classes
A model that is used in managed OSS supervised tuning.
Usage:
model = SourceModel(
base_model="meta/llama3.1-8b", # OSS model name <publisher>/<model_name>
custom_base_model="gs://user-bucket/custom-weights",
)
sft_tuning_job = sft.train(
source_model=model,
train_dataset="gs://my-bucket/train.jsonl",
validation_dataset="gs://my-bucket/validation.jsonl",
epochs=4,
tuned_model_display_name="my-tuned-model",
output_uri="gs://user-bucket/tuned-model"
)
while not sft_tuning_job.has_ended:
time.sleep(60)
sft_tuning_job.refresh()
tuned_model = aiplatform.Model(sft_tuning_job.tuned_model_name)
```
Represents a TuningJob that runs with Google owned models.
Modules
Classes for supervised tuning.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2026-05-30 UTC.
[null,null,["Last updated 2026-05-30 UTC."],[],[]]