
The model was finetuned using the glaive dataset using qlora and full finetuning using FSDP. 

Dataset link : [Link here](https://huggingface.co/datasets/glaiveai/glaive-function-calling-v2)


For training , inference and evalaution kindly check this repository:

https://github.com/Srini-98/Function-Calling-Using-Mistral

Use the following prompt format
```
SYSTEM: You are a helpful assistant with access to the following functions. Use them if required -
{
    "name": "function_name",
    "description": "description",
    "parameters": {
        "type": "object",
        "properties": {
            "param_name1": {
                "type": "string",
                "description": "description of param"
            },
            "param_name2": {
                "type": "string",
                "description": "description of param"
            },
            "param_name3":{
                "type: "string",
                "description" : "description of param"
            }
        },
        "required": [
            "param_name1",
        ]
    }
}
USER: {question here}


ASSISTANT: {model answer} <|endoftext|>
```

The answer generation can be stopped with the <|endoftext|> token. You can add multiple functions as well and set param names. "Required" field forces model to always call that param. 
{"language": ["en"], "datasets": ["glaiveai/glaive-function-calling-v2"]}
transformers safetensors mistral text-generation en dataset:glaiveai/glaive-function-calling-v2 autotrain_compatible endpoints_compatible text-generation-inference region:us