thanks for this model, tokens special fuction call

#15
by NickyNicky - opened

"<|function_call|>": 32005,
"<|function_list|>": 32011,
"<|function_output|>": 32003,

https://huggingface.co/microsoft/Phi-3-mini-128k-instruct/blob/main/added_tokens.json

I would like to know the template for these tokens, etc.

thank you so much.

Microsoft org

These tokens have not been used during fine-tuning, i.e., they will be removed in the future.

We used: <|endoftext|>, <|assistant|>, <|system|>, <|end|> and <|user|>

gugarosa changed discussion status to closed

Was he really not trained?

image.png

inference:

<s><|system|> eres un asistente util que responde a lo que el usuario te pide y tienes que escribir en español.
<function_list>
[
    {
        "name": "calculate_bmi",
        "description": "Calculate the Body Mass Index (BMI)",
        "parameters": {
            "type": "object",
            "properties": {
                "weight": {
                    "type": "number",
                    "description": "The weight in kilograms"
                },
                "height": {
                    "type": "number",
                    "description": "The height in meters"
                }
            },
            "required": [
                "weight",
                "height"
            ]
        }
    },
    {
        "name": "check_word_count",
        "description": "Check the word count of a given text",
        "parameters": {
            "type": "object",
            "properties": {
                "text": {
                    "type": "string",
                    "description": "The text to count the words"
                }
            },
            "required": [
                "text"
            ]
        }
    }
]
<function_list>

tienes acceso a function_call, usalo si lo requieres:
<function_call> {"name": "function_name", "arguments": {"arg_1": "value_1", "arg_2": "value_2", ...}} <function_call>

Edge cases you must handle:
 - If there are no functions that match the user request, you will respond politely that you cannot help.<|end|><|user|> quiero calcular mi peso 90 kg y mi altura es 1.79 cm , como calculo mi masa corporal (BMI)<|end|><|assistant|> Para calcular el BMI con los datos proporcionados, primero necesitamos ajustar la medida de la altura de centímetros a metros. La altura de 1.79 cm es equivalente a 0.179 metros. Ahora podemos utilizar la función "calculate_bmi" con los argumentos correspondientes.

<function_call> {"name": "calculate_bmi", "arguments": {"weight": 90, "height": 0.179}}<|end|>

Was he really not trained?

image.png
inference:


<s><|system|> eres un asistente util que responde a lo que el usuario te pide y tienes que escribir en español.
<function_list>
[
    {
        "name": "calculate_bmi",
        "description": "Calculate the Body Mass Index (BMI)",
        "parameters": {
            "type": "object",
            "properties": {
                "weight": {
                    "type": "number",
                    "description": "The weight in kilograms"
                },
                "height": {
                    "type": "number",
                    "description": "The height in meters"
                }
            },
            "required": [
                "weight",
                "height"
            ]
        }
    },
    {
        "name": "check_word_count",
        "description": "Check the word count of a given text",
        "parameters": {
            "type": "object",
            "properties": {
                "text": {
                    "type": "string",
                    "description": "The text to count the words"
                }
            },
            "required": [
                "text"
            ]
        }
    }
]

tienes acceso a function_call, usalo y solo responde si lo requieres:
<function_call> {"name": "function_name", "arguments": {"arg_1": "value_1", "arg_2": "value_2", ...}}

Edge cases you must handle:
 - If there are no functions that match the user request, you will respond politely that you cannot help.<|end|><|user|> quiero calcular mi peso 90 kg y mi altura es 1.79 cm , como calculo mi masa corporal (BMI)<|end|><|assistant|> <function_call> {"name": "calculate_bmi", "arguments": {"weight": 90, "height": 1.79}}<|end|>
CPU times: user 2.39 s, sys: 2.95 ms, total: 2.39 s
Wall time: 2.38 s

Sign up or log in to comment