Fine tuning with function calling capability

Hi, I am trying to fine tune gpt 3.5 turbo with optional function calling as required by the context. I get duplicate responses and the function calling is also not working as well. When I comment out the functions=some_function and function_call=‘auto’ part, the responses are on point but as soon as I include them in the responses i get duplicate responses in this format (answer +\n+answer2). It doesn’t matter if i include function calling examples in the dataset or not, whether i use gpt-3.5-turbo-0613 or gpt-3.5-turbo-1106, it’s the same. Is anyone looking into it, if not then kindly suggest me an alternative or a workaround because I have wasted an entire moth on this now. Thanks

1 Like

This has been reported before - continuing since the release of functions.

The assistant response in normal function calling is for it only to emit the to= message to the function recipient, so the only thing you should have the final assistant response be is the function call json when the user input would trigger it.

The function may be over-training on the function stop token (or an oversight absence of one), having the AI produce it for normal chat.

One workaround that could be considered is to train on your own stop sequence at the end of assistant responses, such as ######, so that you get that before the repeat. It would be removed from the response when stop= is used.

Personal stop sequence would only workaround when the AI could infer that, so you might also need some coverage into other user input scenarios or tasks than you anticipate. More training on non-function calls also could get the AI back on track.

1 Like

Thanks, it worked. It saved a lot of time for me thanks