Function calling format

#3
by RangerMauve - opened

Hey there, what format was being used for the function calling? Is it OpenAI style? Would be great to access the training data to understand more.

Hey @RangerMauve ,
We used augmented data based on https://huggingface.co/datasets/glaiveai/glaive-function-calling-v2 in German. So the structure is based on glaive-function-calling-v2.

Thanks! Would a PR to add some example prompts in the README be welcome?

It seems the training dataset acidentally misformatted the arguments to have extra ' characters around them. This breaks JSON parsing. You may wish to clean the data and retrain

RangerMauve changed discussion status to closed

Whoops, meant to comment not close. Gonna send the pr later this week after some testing :)

RangerMauve changed discussion status to open

Did you end up converting the training data to ChatML? Seems the model is fixated on function calling and isn't processing responses

I've got it working in my mind-goblin repo for anyone curious on how one can instrument this model.

https://github.com/RangerMauve/mind-goblin

Hey @RangerMauve thanks for your interest and support!

Actually we trained the model with the following structure:

<|im_start|>system
You are Dolphin, a helpful AI assistant.<|im_end|>
<|im_start|>user
SYSTEM: You are a helpful assistant with access to the following functions. Use them if required -\n{\n \"name\": \"get_time\",\n \"description\": \"Get the current time\",\n \"parameters\": {}\n}\nHello, can you tell me what time it is now?<|im_end|>
<|im_start|>assistant
<functioncall> {"name": "get_time", "arguments": {}}
<|im_start|>user
 <function_response> {\"time\": \"10:30 AM\"}<|im_end|>
<|im_start|>assistant The current time is 10:30 AM.

Regards!

I went ahead and merged the pull request as it seems to work based on the repository and if @DavidGF you wan to edit it to the canonical structure that would be appreciated otherwise I think people are totally lost on how to use the model.

Oh good to know. I'll try updating my mind goblin template to reflect it. Was there a specific reason you decided to remove the <functioncall> token? It seems the model is still making use of it somehow.

no sorry, I forgot to put the template in ''' which meant the <functioncall> wasn't displayed

Sign up or log in to comment