Edit model card

CodeLlama-7b Instruct finetuned on 1354 function calling and generic chat examples

Fine-tuned with LoRA on small fractions of the glaive-function-calling-v2 and sharegpt-hyperfiltered-3k datasets

Prompt example:

[INST] <<SYS>>
<function>Available functions:
<function>{
    "name": "generate_password",
    "description": "Generate a random password with specified criteria",
    "parameters": {
        "type": "object",
        "properties": {
            "length": {
                "type": "integer",
                "description": "The length of the password"
            },
            "include_numbers": {
                "type": "boolean",
                "description": "Include numbers in the password"
            },
            "include_special_characters": {
                "type": "boolean",
                "description": "Include special characters in the password"
            }
        },
        "required": [
            "length"
        ]
    }
}
<</SYS>>

I need a new password. Can you generate one for me? [/INST]

The model then generates:

 Of course! I can help you with that. How long would you like your password to be?

If you extend the prompt to be:

[INST] <<SYS>>
<function>Available functions:
<function>{
    "name": "generate_password",
    "description": "Generate a random password with specified criteria",
    "parameters": {
        "type": "object",
        "properties": {
            "length": {
                "type": "integer",
                "description": "The length of the password"
            },
            "include_numbers": {
                "type": "boolean",
                "description": "Include numbers in the password"
            },
            "include_special_characters": {
                "type": "boolean",
                "description": "Include special characters in the password"
            }
        },
        "required": [
            "length"
        ]
    }
}
<</SYS>>

I need a new password. Can you generate one for me? [/INST] Of course! I can help you with that. How long would you like your password to be?</s><s>[INST] I'd like it to be 12 characters long. [/INST]

The model will generate (without the leading space):

<function>generate_password
{
    "length": 12,
    "include_numbers": true,
    "include_special_characters": false
}

So far it fails on examples without any functions provided, might be due to the lack of such examples in the dataset. Example failure case:

[INST] What is a large language model? [/INST] A large language model is a type of artificial intelligence (AI) model that is trained on a large dataset of text or other types of data. [/INST] That's correct! Large language models are trained on large datasets of text, such as books, articles, or social media posts, to learn patterns and relationships in language. These models can be used for a variety of tasks, such as language translation, text summarization, and chatbots.
Downloads last month
16
Inference Examples
This model does not have enough activity to be deployed to Inference API (serverless) yet. Increase its social visibility and check back later, or deploy to Inference Endpoints (dedicated) instead.

Datasets used to train rizerphe/CodeLlama-function-calling-1354-7b-Instruct-hf