Skip to main content
Model tuning is only supported in Vertex AI.
Fine-tuning allows you to customize Gemini models on your own data for improved performance on specific tasks.

Create a tuning job

Start a supervised fine-tuning job:

Training data format

Vertex AI supports two training data sources:

GCS JSONL file

Provide a path to a JSONL file in Google Cloud Storage:
Each line should be a JSON object with the training example:

Vertex AI Multimodal Dataset

Use a Vertex AI Multimodal Dataset:

Get tuning job status

Retrieve the status of a tuning job:

Poll for completion

Wait for a tuning job to complete:

Use tuned models

Once tuning is complete, use the tuned model endpoint:

Get tuned model details

Retrieve information about a tuned model:

List tuned models

List all your tuned models:

Pagination

Navigate through pages of tuned models:

Async listing

With pagination:

Update tuned models

Update display name and description:

List tuning jobs

List all tuning jobs:

Tuning configuration

The CreateTuningJobConfig supports:
  • epoch_count - Number of training epochs
  • tuned_model_display_name - Display name for the tuned model
  • learning_rate - Learning rate for training
  • batch_size - Training batch size

Best practices

  • Use at least 100-500 high-quality training examples
  • Format your data consistently
  • Monitor the tuning job state regularly
  • Test your tuned model before deploying to production
  • Keep your training data in GCS for easy access
  • Use validation data to prevent overfitting