I’m encountering an error that says my fine-tune via the CLI will exceed my billing hard limit, even though my calculation for how much the fine-tune should cost is lower than my billing hard limit. I’ve reached out to OpenAI via email and their support “chat” to see if I can get an estimate for how much it will cost to fine-tune the davinci model, but it’s been over a week without a response from OpenAI.
The training file contains 11,125 lines, with a prompt and completion pair on each line. The file is 23.8 MB. The file contains 23,426,369 characters. According to OpenAI, fine-tuning the davinci model costs $0.0300 / 1K tokens.
According to OpenAI, 1 token equals approximately 4 characters (What are tokens and how to count them? | OpenAI Help Center). So if I did my math right, my training file contains 5,856,592.25 tokens and should equate to a cost of $175.70. My soft billing limit is $200, and my hard billing limit is $500.
However, when I run the fine-tune command via the command line, I receive the following error:
"[2023-05-17 13:41:53] Fine-tune failed. Fine-tune will exceed billing hard limit
Conditional generation is a problem where the content needs to be generated given some kind of input. This includes paraphrasing, summarizing, entity extraction, product description writing given specifications, chatbots and many others. For this type of problem we recommend:
Use a separator at the end of the prompt, e.g. \n\n###\n\n. Remember to also append this separator when you eventually make requests to your model.
Use an ending token at the end of the completion, e.g. END
Remember to add the ending token as a stop sequence during inference, e.g. stop=[" END"]
Aim for at least ~500 examples
Ensure that the prompt + completion doesn’t exceed 2048 tokens, including the separator
Ensure the examples are of high quality and follow the same desired format
Ensure that the dataset used for finetuning is very similar in structure and type of task as what the model will be used for
Using Lower learning rate and only 1-2 epochs tends to work better for these use cases