Upload 3 files
Browse files- special_tokens_map.json +1 -1
- tokenizer_config.json +12 -2
    	
        special_tokens_map.json
    CHANGED
    
    | @@ -7,7 +7,7 @@ | |
| 7 | 
             
                "single_word": false
         | 
| 8 | 
             
              },
         | 
| 9 | 
             
              "eos_token": {
         | 
| 10 | 
            -
                "content": "<| | 
| 11 | 
             
                "lstrip": false,
         | 
| 12 | 
             
                "normalized": false,
         | 
| 13 | 
             
                "rstrip": false,
         | 
|  | |
| 7 | 
             
                "single_word": false
         | 
| 8 | 
             
              },
         | 
| 9 | 
             
              "eos_token": {
         | 
| 10 | 
            +
                "content": "<|eot_id|>",
         | 
| 11 | 
             
                "lstrip": false,
         | 
| 12 | 
             
                "normalized": false,
         | 
| 13 | 
             
                "rstrip": false,
         | 
    	
        tokenizer_config.json
    CHANGED
    
    | @@ -2051,9 +2051,19 @@ | |
| 2051 | 
             
                }
         | 
| 2052 | 
             
              },
         | 
| 2053 | 
             
              "bos_token": "<|begin_of_text|>",
         | 
| 2054 | 
            -
              "chat_template":  | 
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
| 2055 | 
             
              "clean_up_tokenization_spaces": true,
         | 
| 2056 | 
            -
              "eos_token": "<| | 
| 2057 | 
             
              "extra_special_tokens": {},
         | 
| 2058 | 
             
              "model_input_names": [
         | 
| 2059 | 
             
                "input_ids",
         | 
|  | |
| 2051 | 
             
                }
         | 
| 2052 | 
             
              },
         | 
| 2053 | 
             
              "bos_token": "<|begin_of_text|>",
         | 
| 2054 | 
            +
              "chat_template": [
         | 
| 2055 | 
            +
                {
         | 
| 2056 | 
            +
                  "name": "default",
         | 
| 2057 | 
            +
                  "template": "{% if not add_generation_prompt is defined %}{% set add_generation_prompt = false %}{% endif %}{% set loop_messages = messages %}{% for message in loop_messages %}{% set content = '<|start_header_id|>' + message['role'] + '<|end_header_id|>\n\n'+ message['content'] | trim + '<|eot_id|>' %}{% if loop.index0 == 0 %}{% set content = bos_token + content %}{% endif %}{{ content }}{% endfor %}{% if add_generation_prompt %}{{ '<|start_header_id|>assistant<|end_header_id|>\n\n' }}{% endif %}"
         | 
| 2058 | 
            +
                },
         | 
| 2059 | 
            +
                {
         | 
| 2060 | 
            +
                  "name": "tool_use",
         | 
| 2061 | 
            +
                  "template": "{%- macro json_to_python_type(json_spec) %}\n{%- set basic_type_map = {\n    \"string\": \"str\",\n    \"number\": \"float\",\n    \"integer\": \"int\",\n    \"boolean\": \"bool\"\n} %}\n\n{%- if basic_type_map[json_spec.type] is defined %}\n    {{- basic_type_map[json_spec.type] }}\n{%- elif json_spec.type == \"array\" %}\n    {{- \"list[\" +  json_to_python_type(json_spec|items) + \"]\"}}\n{%- elif json_spec.type == \"object\" %}\n    {%- if json_spec.additionalProperties is defined %}\n        {{- \"dict[str, \" + json_to_python_type(json_spec.additionalProperties) + ']'}}\n    {%- else %}\n        {{- \"dict\" }}\n    {%- endif %}\n{%- elif json_spec.type is iterable %}\n    {{- \"Union[\" }}\n    {%- for t in json_spec.type %}\n      {{- json_to_python_type({\"type\": t}) }}\n      {%- if not loop.last %}\n        {{- \",\" }} \n    {%- endif %}\n    {%- endfor %}\n    {{- \"]\" }}\n{%- else %}\n    {{- \"Any\" }}\n{%- endif %}\n{%- endmacro %}\n\n\n{{- bos_token }}\n{{- '<|im_start|>system\n' }}\n{{- \"You are a function calling AI model. You are provided with function signatures within <tools></tools> XML tags. You may call one or more functions to assist with the user query. Don't make assumptions about what values to plug into functions. Here are the available tools: <tools> \" }}\n{%- for tool in tools %}\n    {%- if tool.function is defined %}\n        {%- set tool = tool.function %}\n    {%- endif %}\n    {{- '{\"type\": \"function\", \"function\": ' }}\n    {{- '{\"name\": \"' + tool.name + '\", ' }}\n    {{- '\"description\": \"' + tool.name + '(' }}\n    {%- for param_name, param_fields in tool.parameters.properties|items %}\n        {{- param_name + \": \" + json_to_python_type(param_fields) }}\n        {%- if not loop.last %}\n            {{- \", \" }}\n        {%- endif %}\n    {%- endfor %}\n    {{- \")\" }}\n    {%- if tool.return is defined %}\n        {{- \" -> \" + json_to_python_type(tool.return) }}\n    {%- endif %}\n    {{- \" - \" + tool.description + \"\n\n\" }}\n    {%- for param_name, param_fields in tool.parameters.properties|items %}\n        {%- if loop.first %}\n            {{- \"    Args:\n\" }}\n        {%- endif %}\n        {{- \"        \" + param_name + \"(\" + json_to_python_type(param_fields) + \"): \" + param_fields.description|trim }}\n    {%- endfor %}\n    {%- if tool.return is defined and tool.return.description is defined %}\n        {{- \"\n    Returns:\n        \" + tool.return.description }}\n    {%- endif %}\n    {{- '\"' }}\n    {{- ', \"parameters\": ' }}\n    {%- if tool.parameters.properties | length == 0 %}\n        {{- \"{}\" }}\n    {%- else %}\n        {{- tool.parameters|tojson }}\n    {%- endif %}\n    {{- \"}\" }}\n    {%- if not loop.last %}\n        {{- \"\n\" }}\n    {%- endif %}\n{%- endfor %}\n{{- \" </tools>\" }}\n{{- 'Use the following pydantic model json schema for each tool call you will make: {\"properties\": {\"name\": {\"title\": \"Name\", \"type\": \"string\"}, \"arguments\": {\"title\": \"Arguments\", \"type\": \"object\"}}, \"required\": [\"name\", \"arguments\"], \"title\": \"FunctionCall\", \"type\": \"object\"}}\n' }}\n{{- \"For each function call return a json object with function name and arguments within <tool_call></tool_call> XML tags as follows:\n\" }}\n{{- \"<tool_call>\n\" }}\n{{- '{\"name\": <function-name>, \"arguments\": <args-dict>}\n' }}\n{{- '</tool_call><|im_end|>\n' }}\n{%- for message in messages %}\n    {%- if message.role == \"user\" or message.role == \"system\" or (message.role == \"assistant\" and message.tool_calls is not defined) %}\n        {{- '<|im_start|>' + message.role + '\n' + message.content + '<|im_end|>' + '\n' }}\n    {%- elif message.role == \"assistant\" %}\n        {{- '<|im_start|>' + message.role }}\n    {%- for tool_call in message.tool_calls %}\n       {{- '\n<tool_call>\n' }}           {%- if tool_call.function is defined %}\n                {%- set tool_call = tool_call.function %}\n            {%- endif %}\n            {{- '{' }}\n            {{- '\"name\": \"' }}\n            {{- tool_call.name }}\n            {{- '\"' }}\n            {{- ', '}}\n            {%- if tool_call.arguments is defined %}\n                {{- '\"arguments\": ' }}\n                {%- if tool_call.arguments is string %}\n                    {{- tool_call.arguments }}\n                {%- else %}\n                    {{- tool_call.arguments|tojson }}\n                {%- endif %}\n            {%- endif %}\n             {{- '}' }}\n            {{- '\n</tool_call>' }}\n    {%- endfor %}\n        {{- '<|im_end|>\n' }}\n    {%- elif message.role == \"tool\" %}\n        {%- if loop.previtem and loop.previtem.role != \"tool\" %}\n            {{- '<|im_start|>tool\n' }}\n        {%- endif %}\n        {{- '<tool_response>\n' }}\n        {{- message.content }}\n        {%- if not loop.last %}\n            {{- '\n</tool_response>\n' }}\n        {%- else %}\n            {{- '\n</tool_response>' }}\n        {%- endif %}\n        {%- if not loop.last and loop.nextitem.role != \"tool\" %}\n            {{- '<|im_end|>' }}\n        {%- elif loop.last %}\n            {{- '<|im_end|>' }}\n        {%- endif %}\n    {%- endif %}\n{%- endfor %}\n{%- if add_generation_prompt %}\n    {{- '<|im_start|>assistant\n' }}\n{%- endif %}\n"
         | 
| 2062 | 
            +
                }
         | 
| 2063 | 
            +
              ],
         | 
| 2064 | 
            +
              
         | 
| 2065 | 
             
              "clean_up_tokenization_spaces": true,
         | 
| 2066 | 
            +
              "eos_token": "<|eot_id|>",
         | 
| 2067 | 
             
              "extra_special_tokens": {},
         | 
| 2068 | 
             
              "model_input_names": [
         | 
| 2069 | 
             
                "input_ids",
         | 

