Validation for File Upload for Fine-Tune

I tried to use fine-tunning with function calling, as described here. But the documentation is not aligned with the latest function-calling message structure. So I logged the messages from function call sample (using the gpt-3-turbo) to a JSONL file. Then used the exact same message format to train a new model. But I cannot upload the file, it gives validation errors. Validation rules are not updated to support the latest format of function calling. For example “function_call” parameter is deprecated and replaced by “tool_calls” in the latest chat completions API, but validation checks for “function_call” and gives error for “tool_calls”.

Here is the code I tried to run. Check " Fine-Tuning with Function Calls" section.

And here is the JSONL file I try to upload for fine-tuning.

1 Like

Hi!

You probably did see this remark in the first link you posted:

function_call and functions have been deprecated in favor of tools, however, the fine-tuning API still requires the legacy format at this time.

So you should be able to use the old instructions to validate the file:
https://platform.openai.com/docs/guides/fine-tuning/fine-tuning-examples

I am not sure how often the cheat-sheet is being updated. Following the docs is likely the safer route.

Thanks for responding. Yes I noticed that remark.

Does this mean I need to have the file in legacy format, but still I can use it to train a model with function calls and use it with the latest version of chat completion?

Or does it mean “Fine-tuning a model with function calling with the latest API is not yet possible”?

Yes. For fine-tuning the model use the legacy format.
Then you can use it with the latest version of chat completions.

1 Like