| { | |
| "add_bos_token": false, | |
| "add_dummy_prefix_space": false, | |
| "add_eos_token": false, | |
| "add_prefix_space": false, | |
| "added_tokens_decoder": { | |
| "0": { | |
| "content": "<unk>", | |
| "lstrip": false, | |
| "normalized": false, | |
| "rstrip": false, | |
| "single_word": false, | |
| "special": true | |
| }, | |
| "1": { | |
| "content": "<s>", | |
| "lstrip": false, | |
| "normalized": false, | |
| "rstrip": false, | |
| "single_word": false, | |
| "special": true | |
| }, | |
| "2": { | |
| "content": "</s>", | |
| "lstrip": false, | |
| "normalized": false, | |
| "rstrip": false, | |
| "single_word": false, | |
| "special": true | |
| }, | |
| "3": { | |
| "content": "<pad>", | |
| "lstrip": false, | |
| "normalized": false, | |
| "rstrip": false, | |
| "single_word": false, | |
| "special": true | |
| }, | |
| "4": { | |
| "content": "<sep>", | |
| "lstrip": false, | |
| "normalized": false, | |
| "rstrip": false, | |
| "single_word": false, | |
| "special": true | |
| }, | |
| "5": { | |
| "content": "<mask>", | |
| "lstrip": false, | |
| "normalized": false, | |
| "rstrip": false, | |
| "single_word": false, | |
| "special": true | |
| }, | |
| "6": { | |
| "content": "<cls>", | |
| "lstrip": false, | |
| "normalized": false, | |
| "rstrip": false, | |
| "single_word": false, | |
| "special": true | |
| }, | |
| "7": { | |
| "content": "<|system|>", | |
| "lstrip": false, | |
| "normalized": false, | |
| "rstrip": false, | |
| "single_word": false, | |
| "special": false | |
| }, | |
| "8": { | |
| "content": "<|assistant|>", | |
| "lstrip": false, | |
| "normalized": false, | |
| "rstrip": false, | |
| "single_word": false, | |
| "special": false | |
| }, | |
| "9": { | |
| "content": "<|user|>", | |
| "lstrip": false, | |
| "normalized": false, | |
| "rstrip": false, | |
| "single_word": false, | |
| "special": false | |
| }, | |
| "10": { | |
| "content": "<|available_tools|>", | |
| "lstrip": false, | |
| "normalized": false, | |
| "rstrip": false, | |
| "single_word": false, | |
| "special": false | |
| }, | |
| "11": { | |
| "content": "<|tool_calls|>", | |
| "lstrip": false, | |
| "normalized": false, | |
| "rstrip": false, | |
| "single_word": false, | |
| "special": false | |
| }, | |
| "12": { | |
| "content": "<|tool_results|>", | |
| "lstrip": false, | |
| "normalized": false, | |
| "rstrip": false, | |
| "single_word": false, | |
| "special": false | |
| }, | |
| "13": { | |
| "content": "<|code|>", | |
| "lstrip": false, | |
| "normalized": false, | |
| "rstrip": false, | |
| "single_word": false, | |
| "special": false | |
| }, | |
| "14": { | |
| "content": "<|file|>", | |
| "lstrip": false, | |
| "normalized": false, | |
| "rstrip": false, | |
| "single_word": false, | |
| "special": false | |
| }, | |
| "102397": { | |
| "content": "<|prefix|>", | |
| "lstrip": false, | |
| "normalized": false, | |
| "rstrip": false, | |
| "single_word": false, | |
| "special": false | |
| }, | |
| "102398": { | |
| "content": "<|suffix|>", | |
| "lstrip": false, | |
| "normalized": false, | |
| "rstrip": false, | |
| "single_word": false, | |
| "special": false | |
| }, | |
| "102399": { | |
| "content": "<|middle|>", | |
| "lstrip": false, | |
| "normalized": false, | |
| "rstrip": false, | |
| "single_word": false, | |
| "special": false | |
| } | |
| }, | |
| "bos_token": "<s>", | |
| "chat_template": "\n{%- set user_messages = messages | selectattr('role', 'equalto', 'user') | list %}\n{%- macro output_available_tools(tools, message) %}\n{%- if tools and (message == user_messages[-1]) %}\n {{- '<|available_tools|>[' }}\n {%- for tool in tools %}\n {%- set tool = tool.function %}\n {{- \"{\" }}\n {%- for key, val in tool.items() if key != \"return\" %}\n {%- if val is string %}\n {{- \"'\" + key + \"': '\" + val + \"'\" }}\n {%- else %}\n {{- \"'\" + key + \"': \" + val|string }}\n {%- endif %}\n {%- if not loop.last %}\n {{- \", \" }}\n {%- endif %}\n {%- endfor %}\n {{- \"}\" }}\n {%- if not loop.last %}\n {{- \", \" }}\n {%- else %}\n {{- \"]\" }}\n {%- endif %}\n {%- endfor %}\n {{- eos_token -}}\n{%- endif %}\n{%- endmacro %}\n\n{%- macro output_tool_results(tool_results) %}\n{{- '<|tool_results|>[' }}\n{%- for tool_result in tool_results %}\n {{- \"{'content': \" + tool_result.content|string + \", 'call_id': '\" + tool_result.call_id + \"'}\" }}\n{%- endfor %}\n{{- ']' }}\n{{- eos_token -}}\n{%- endmacro %}\n\n{%- macro output_tool_calls(tool_calls) %}\n{{- '<|tool_calls|>[' }}\n{%- for tool_call in tool_calls %}\n {{- \"{'id': '\" + tool_call.id + \"', 'name': '\" + tool_call.name + \"', 'arguments': \" + tool_call.arguments|string + '}' }}\n{%- endfor %}\n{{- ']' }}\n{%- endmacro %}\n\n{%- for message in messages %}\n {%- if message['role'] == 'user' %}\n {%- if tools is defined %}\n {{- output_available_tools(tools, message) }}\n {%- endif %}\n {{- '<|user|>' + message['content'] + eos_token -}}\n {%- elif message['role'] == 'system' %}\n {{- '<|system|>' + message['content'] + eos_token -}}\n {%- elif message['role'] == 'assistant' %}\n {% set assistant_content = \"\" %}\n {%- if message.content is defined %}\n {% set assistant_content = message.content %}\n {%- endif %}\n {%- if message.tool_calls is defined and message.tool_calls -%}\n {{- '<|assistant|>' + assistant_content + output_tool_calls(message['tool_calls']) + eos_token -}}\n {%- else %}\n {{- '<|assistant|>' + assistant_content + eos_token }}\n {%- endif %}\n {%- elif message['role'] == 'tool_results' %}\n {{- output_tool_results(message.tool_results) }}\n {%- endif %}\n{%- if loop.last and add_generation_prompt -%}\n {{- '<|assistant|>' -}}\n{%- endif -%}\n{%- endfor %}\n", | |
| "clean_up_tokenization_spaces": false, | |
| "cls_token": "<cls>", | |
| "do_lower_case": false, | |
| "eos_token": "</s>", | |
| "extra_ids": 0, | |
| "keep_accents": true, | |
| "legacy": false, | |
| "mask_token": "<mask>", | |
| "model_max_length": 1000000000000000019884624838656, | |
| "pad_token": "<pad>", | |
| "padding_side": "right", | |
| "sep_token": "<sep>", | |
| "sp_model_kwargs": {}, | |
| "spaces_between_special_tokens": false, | |
| "tokenizer_class": "LlamaTokenizer", | |
| "unk_token": "<unk>", | |
| "use_default_system_prompt": false | |
| } | |