Davinci-002 is not available for fine-tuning or does not exist

I am attempting to finetune a davinci-002 through the fine-tuning API but am getting an error:

BadRequestError: Error code: 400 - {'error': {'message': 'Model davinci-002 is not available for fine-tuning or does not exist.', 'type': 'invalid_request_error', 'param': None, 'code': 'model_not_available'}}

My code is as follows:

from openai import OpenAI

OPENAI_API_KEY = os.getenv("OPENAI_API_KEY")
client = OpenAI(api_key=OPENAI_API_KEY)

job_truth = client.fine_tuning.jobs.create(
  training_file='file-...', 
  model="davinci-002",
  suffix="truthful",
  hyperparameters={
    "n_epochs":5,
    "batch_size":21,
    "learning_rate_multiplier":0.1
  }
)

I am using openai version 1.65.2 in python. davinci-002 shows up as a fine-tunable model in the docs, any suggestions?

obi-wan-star-wars

2024-08-29: Fine-tuning training on babbage-002 and davinci-002 models

On August 29th, 2024, we notified developers fine-tuning babbage-002 and davinci-002 that new fine-tuning training runs on these models will no longer be supported starting October 28, 2024.

Fine-tuned models created from these base models are not affected by this deprecation, but you will no longer be able to create new fine-tuned versions with these models.

Shutdown date Model / system Recommended replacement
2024-10-28 New fine-tuning training on babbage-002 gpt-4o-mini
2024-10-28 New fine-tuning training on davinci-002 gpt-4o-mini

https://platform.openai.com/docs/deprecations

1 Like