Gemini 1.5 Flash tuning support removed on free tier?

I am using import google.generativeai as genai library and creating tuning job but it is giving error:
google.api_core.exceptions.FailedPrecondition: 400 models/gemini-1.5-flash-001-tuning is not found for CREATE TUNED MODEL at API version v1beta.

Code:

genai.configure(api_key="")
with open("file.json", "r")  as f:
    training_dataset = json.load(f)

base_model_name = "models/gemini-1.5-flash-001-tuning"
operation = genai.create_tuned_model(
    source_model=base_model_name,
    training_data=training_dataset,
    id="trial1-13-06-25",
    epoch_count=5,
    batch_size=8,
    learning_rate=0.001,
)

print("Metadata: ", operation.metadata)

Welcome to the forum!

When it comes to fine-tuning, I would highly recommend considering Vertex AI. It’s a great tool for that.

Best Regards

We are facing the same issue - Gemini-1.5-flash-001-tuning is not found for API version v1beta. The worst part is that we can’t access our finetunes, and as far as I know, there is no option to move them to Vertex. We are yet to receive an explanation. Here is our GitHub issue, we may get an update there: Gemini-1.5-flash-001-tuning is not found for API version v1beta · Issue #969 · googleapis/python-genai · GitHub.

I think they have removed the support. There were some alerts regarding discontinuation gemini 1.5 flash tunining.

1 Like

Hi,

We wanted to let you know that the tuning feature has been deprecated from AI Studio. For tuning we recommend using Vertex AI instead.